LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger a digital TTL output

Solved!
Go to solution

I will also note that I have my DO connected to a multimeter which does receive a 5V reading when I activate my external trigger.

0 Kudos
Message 11 of 16
(451 Views)

Insert a pause after writing DO and then measure the signal Digital Output to ensure that the sw is doing what you requested. 

Then exececute the write FAlse to ensure that the signal is back to 0. 

LVNinja_0-1686851876144.png

 

0 Kudos
Message 12 of 16
(439 Views)

I don't think that will solve the issue. When I highlight the execution and activate the trigger, the Analog 2D DBL NChan NSamp goes off first and then the Digital Bool 1Line 1Point activates. Ideally I would want it to activate at near the same time as the Analog 2D DBL NChan NSamp block.

0 Kudos
Message 13 of 16
(428 Views)

@svazquez22 wrote:

I don't think that will solve the issue. When I highlight the execution and activate the trigger, the Analog 2D DBL NChan NSamp goes off first and then the Digital Bool 1Line 1Point activates. Ideally I would want it to activate at near the same time as the Analog 2D DBL NChan NSamp block.


Do you want the digital output to go high at the point the trigger occurs, or when the AI task finishes?  At the moment your code waits until all AI samples are acquired before leaving the flat sequence and writing to the DO.

 

If you want the DO to start "at near the same time", you can add a trigger from PFI0 to the DO task.  You'd need to write the digital pulse data to the DO task first, either as a 1D array of integers or a digital waveform, then start the AI and DO tasks in the first frame of the flat sequence (you can remove the second frame as both tasks are now waiting for the same trigger).

 

Andy

0 Kudos
Message 14 of 16
(414 Views)

How can I go about doing this? I have tried setting up a triggered digital waveform before, but it does not seem to work properly. In the example I have attached, it runs with no error but it does not seem to work off the trigger I specified. The voltage also isn't read on my multimeter. Thanks for your help so far.

0 Kudos
Message 15 of 16
(393 Views)
Solution
Accepted by topic author svazquez22

I think I managed to solve my problem so I am going to close this forum now, I'll include my solution.

 

0 Kudos
Message 16 of 16
(347 Views)