From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Triggering a Laser using a TTL signal

Solved!
Go to solution

Hi all,

 

I am quite new to LabView and would like some guidance to help with my project. I am planning to use 3 lasers which can all be modulated by a TTL signal and I want to create a VI that lets me automate the control of these 3 lasers let's say I want the green laser to be on for this amount of time and the rest are off etc.. now I just want to know how I can make my DAQ trigger the lasers in the uni lab I have different DAQs I could make use of such as the myDAQ, USB-6008 and the PCI-6221 there are some others In another lab but these are the main ones. Is there like a tutorial or example that shows how to output a TTL signal from a DAQ? I googled this but couldn't find anything that made much sense to me.

 

Thanks,

Jaafar

0 Kudos
Message 1 of 6
(3,663 Views)

Hi Harari,

 

you need to look for DAQmx tutorials and output of digital signals.

LabVIEW comes with a huge example library including lots of VIs explaining DAQmx usage!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 6
(3,646 Views)

Thanks,

 

I will do that and If I find something that helps me solve my problem I will come back and post it.

 

Jaafar

0 Kudos
Message 3 of 6
(3,642 Views)
Solution
Accepted by topic author JaafarHarari

Figured everything out now Thanks GerdW for the guidance.

 

This post helped me to do what I wanted:

https://forums.ni.com/t5/NI-DAQmx-Examples/DAQmx-Write-Digital-Channel/gpm-p/3501608

0 Kudos
Message 4 of 6
(3,612 Views)

Could you share the final VI and DAQ instrument that you used for this? I have a similar issue.

0 Kudos
Message 5 of 6
(3,195 Views)

Hi Chait,

So I'm not sure how helpful my vi will be as the final version is quite different to the original goal. Attached you will find my VI which essentially sends a digital signal of 5v through a number of DAQ ports depending on what you input on the control panel. this sequence will then loop until you stop it. I have not commented my code very well as it was for my research project and for me alone to understand and also regarding the DAQ i can't quite remember which one i used in the final version but I know it works with the myDAQ and also the NI USB-6001 as I tested both of those options. Finally due to the NI USB-6001 only being able to output 2.5V in  the digital ports I went with another one, but the myDAQ can run my code perfectly fine aswell you just need to configure the DAQ assistant blocks.

Hope this is helpful for you.

 

Cheers,

Jaafar

0 Kudos
Message 6 of 6
(3,178 Views)