LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Time delay.. for repeating array

I want to give an array lets say 3,4,6,9

then starts like this

send 3 digital signal to daq -- stay 15 second

send 4-3 = 1 digital signal to daq -- stay 15 second

send 6-4=2 digital signal to daq -- stay 15 second

send 9-6=3 digital signal to daq -- stay 15 second

 

currently, 15 second includes the time to get to the next level ( let's say it take 100 ms for daq to relay each signal to my device for each signal). how can i make it that at first runs the signal sending loop, then wait 15 second then read the next array value

0 Kudos
Message 1 of 4
(2,305 Views)

You probably want to initialize your shift registers.

 

What's the point of the inner loop? Can't you just create the entire pulse train at once and then play it back as boolean array?

 

 

(Sorry, I don't have DAQmx installed here, so I cannot look at your IO)

0 Kudos
Message 2 of 4
(2,294 Views)

Some comments:

  • Altenbach's suggestion to initialize the Shift Registers (False and 0, which are the defaults) is a good one, even if (by accident) the Defaults "work".  Next time, this might not be true.
  • Am I correct that when you say "Three digital signal", you mean "TFT" as fast as you can?  And then "One digital signal" would be "F"?
  • Have you thought about what happens if you use an input sequence 3, 6, 4, 9 instead of 3, 4, 6, 9?  If, instead, your sequence was "Number of Pulses this time" instead of "Cumulative Pulse Count", you could (more easily) avoid this mistake, and definitely simplify your code (would not need lower shift register and Subtract).

Bob Schor

0 Kudos
Message 3 of 4
(2,269 Views)

Sorry I meant 3 ( as in T F T). I'll try the suggestions . Thank you very much 

0 Kudos
Message 4 of 4
(2,264 Views)