10-06-2015 10:12 AM
I am trying to use a digital trigger to collect data on both its rising edge and falling edge. The design is shown as below. Right now, I save the voltage reading 1&2 through local variable within the while loop. Hoever, the while loop runs at a higer frequency compared with the triggered case structure. So I have got a lot of repetitive data. If I save the data directly from case structure, it will be saved as data-0-date-0 because of the false case unwired.
I am wondering how to revise it to save the voltage reading 1&2 at the same frequency of rising/falling edge triggered? Thank you! I have also attached my current version of Labview program, which runs Labview 2013 realtime.
Solved! Go to Solution.
10-06-2015 10:18 AM
@Mcdullna wrote:
Right now, I save the voltage reading 1&2 through local variable within the while loop.
I recommend using shift registers instead. They avoid interesting raceconditions.
Mcdullna wrote:
I am wondering how to revise it to save the voltage reading 1&2 at the same frequency of rising/falling edge triggered? Thank you! I have also attached my current version of Labview program, which runs Labview 2013 realtime.
Use another case structure so that you save when the trigger edge is rising OR falling (simple boolean logic there).
10-06-2015 10:38 AM
Thanks a lot for the reply. Could you be more specific about the shift register use? I have only learned that it can pass data to the next loop, but not sure how to use that to save data from each loop. Thank you.
10-06-2015 11:24 AM - edited 10-06-2015 11:24 AM
@Mcdullna wrote:
Thanks a lot for the reply. Could you be more specific about the shift register use?
The False case just passes the value through. With this setup, you are allowing the data to stay in the wires, avoiding race conditions. It is also more efficient than using local variables.
10-06-2015 02:04 PM
I see. That will make it. Thank you so much!!