LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Bringing a 1-D waveform signal into a sub-vi

Hello,
 
I am struggling with a program I've been writing for the last few days.  I'm trying to get away from express VI's and use sub-vi's more often.  However, I can't seem to bring a 1-D array of waveform data into the sub-vi.  When I run my program, it simply stops and a green arrow appears (in highlight execution mode).  Maybe I don't understand waveform data well enough.
 
Also, I have a ton of indicators in the program.  Is there a better way to do the coding so it looks/organized better?

Thanks,
Alex
 
 
Download All
0 Kudos
Message 1 of 3
(2,731 Views)
Simple! Remove the while loop in the subVI. Currently, your subVI just spins the while loop at a near infinite rate, processing the same stale data over and over again,  and never returns from the call.
 
The subVI needs to finish immediately to return the outputs to the calling program. Think dataflow! 😄
0 Kudos
Message 2 of 3
(2,729 Views)
Well, apparently I still have a lot to learn about waveforms, and now data flow.  So I removed the while loops in the sub-vi's, and am still having some problems running the program.  It worked initially, and the front panel was registering data real time.  I ran a test for about 10 minutes, and it seemed ok.  Then I stopped it, and tried restarting it, and now I can only get values to flash intermittently on the screen.  The indicators will randomly update, then reset to zero.  I didn't change anything.  What could be the problem here, programming or signal acquisition?

The way I am bringing in my data is through a 6063E DAQ card.  I set up a task in MAX for 16 analog voltages.  I don't have the DAQ card connected to anything, just reading the noise in order to see if my programming works.  The acquisition mode is set to continuous, with a rate of 1k, and number of samples set to 100.  I changed those numbers a couple times, but still seem to have the same results. 
 
In the future, I won't be able to rely on a program that works sometimes, and then sometimes not. 
 
Thanks,
Alex
0 Kudos
Message 3 of 3
(2,709 Views)