LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Store Data in While Loop

Hi all,

I have a simple problem that I just can't solve. I am using a while loop to build an array, then selecting points from this array to be output as a signal. The problem is that the signal is sent and then the signal goes back to zero or no signal, and I would like this signal to persist for a given duration. I have tried using shift registers and feedback nodes to no avail. Is there a good way to make this number persist for more than an instant? I am on win xp, labview 7.1.1 and using a third party board for analog output (this may be the problem, I am working on that, assuming it is not though...) any ideas? Thanks in advance.

Anthony
0 Kudos
Message 1 of 6
(3,404 Views)
Sounds like it is in the way the third party board operates. You have to learn how to set up the output to persist a given time. If your board uses a buffer of data to output voltages, you can build the buffer to contain many instances of the voltage you would like to persist. Also, you should be able to control the timing of the outputs, like setting the frequency of output data. If you want to output 5 volts for 1 second, set the data to 5 volts square wave (50% duty cycle) and the frequency to 0.5 Hz. Then you will put out 5 v for one second and 0 v for one second.
- tbob

Inventor of the WORM Global
0 Kudos
Message 2 of 6
(3,397 Views)
Could you attach a simplified version of your attempt? How do you output the signal?
0 Kudos
Message 3 of 6
(3,397 Views)
Well I could try a square function at 100% duty cycle, but I don't really want the point to re-zero each time. As for buffering I will have to see how well I can get the board to buffer the 5V, 5.1V ... like in your example. As for the example VI, I am attaching one and have the array built with the function in the yellow box and the data out in the grey box. Thanks for any help. In the grey box I would like the "element X 2" to be held constant... and written to my board.
0 Kudos
Message 4 of 6
(3,386 Views)
So there isn't a buffering possibility as far as I know. Can anyone help me with the problem I am having? Is there a way to get a loop to output the same value for a given amount of time and then move to the next calc? Thanks in advance

A
0 Kudos
Message 5 of 6
(3,357 Views)

Anthony,

As tbob suggested, the problem really seems to be in your 3rd-party hardware driver. I looked over your code and there does not appear to be anything in there that could be causing the problem. For whatever reason, your data acquisition card does not seem to be latching the values you send it, so I would recommend contacting the manufacturer of your board to find out why this might be. Not to sound like a salesman, but in case you can't get things working, NI now offers some very low cost DAQ boards guaranteed to work properly with LabVIEW that might be worth checking out 🙂

Regards,

E. Sulzer
Applications Engineer
National Instruments
0 Kudos
Message 6 of 6
(3,329 Views)