LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

triggerd analog output

I try to make an analog output triggered by an analog input. It works but I have two problems :

The first one is that I have a little delay ; my analog output starts with a late between 12 and 25 ms which is too much for me.

The second is that when my analog output duration is shorter, my analog input is still on the "high" state i have defined and my analog output is repeated...

PLease !

Thannk you...
0 Kudos
Message 1 of 2
(2,401 Views)
The first problem is because your acquisition and triggering is software timed. With software timed operations, you simply cannot be very deterministic because Windows is not a real time operating system. If you need better determinism, you will have to change your program to incorporate hardware timing and triggering. Additionally, you will need to have a data acquistion board that supports analog triggering. If you only want to acquire and generate data when you input signal is above a certain level, you can use analog scan clock gating and share the analog input scan clock to driver you analog output operation. Below are a couple of links that illustrate how to setup these different operations.
As for the second problem, if you choose to keep your program
as it is, you can simply add some additional logic so the AO portion only executes once when the AI is in the high state. Or, if you rewrite your program according to my suggestion for problem one, you can control when your AO actually updates by sharing the AI sample clock. This way, when the AI is not acquiring, you will not be generating. I hope this information helps.

analog scan clock gating example
analog input and analog output
0 Kudos
Message 2 of 2
(2,401 Views)