LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronizing 2 DO channels

Solved!
Go to solution

Please refrain from creating duplicate posts - https://forums.ni.com/t5/LabVIEW/Synchronizing-2-DO-channels/m-p/4275962#M1246507

 

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 11 of 18
(1,024 Views)

Hi hobbes,

 

no need for duplicate threads! (I merged them.)

 

And no need for crying out so loud…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 12 of 18
(1,010 Views)

Thanks a lot for your reply.

 

Best choices for #8 depend on what happens *outside of* the part of the timing diagram you've sketched.   Does something trigger the t=0 point?  What happens after the 100 msec pulse width?   Will you repeat the 2 pulse pattern sometime in the future?  When?  Is is based on a defined delay, a hardware trigger, or a software decision?

=>

Currently, nothing triggers the t=0 point. After the 100 msec pusle width, the signals are just turned off. These pulses will not be repeated in the future. I want to trigger these pulses by a software decision, such as a start button or something.

 

I would be really thankfull if you could provide an example of the steps 5~7 you have recommended.

 

Thank you once more for your kind and detailed reply.

Yoo

0 Kudos
Message 13 of 18
(984 Views)

Here is an example I modified from NI-DAQmx: Correlated Digital I/O with NI CompactDAQ and LabVIEW. The CO will keep providing the sample clocks to the DO task. The DO task will output a pulse of specified width when you press the Send button.

I used simulated devices as I don't have access to the real hardware. Don't forget to configure your RTSI.

 

Timing.png

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
Message 14 of 18
(966 Views)
Solution
Accepted by topic author hobbes4000

I kudo'ed ZYOng's example and am adding one of my own.  While there are a few similarities, our approaches are mostly pretty different.  See what you can learn by trying and studying both, then come back if you have questions about specific details.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
Message 15 of 18
(956 Views)

Thank you both for your wonderful vis. I really appreciate it.

 

I have one more question

=>

Do I have to use a NI RTSI cable? Can't I just use another non NI 34-pin ribbon cable instead? I'm asking because it takes so long for the shipping of the NI RTSI cable. Will there be any problems using a non-NI 34 pin ribbon cable?

* non NI ribbon cable means just a 34 pin ribbon cable that is not manufactured by NI.

 

Thank you again for your great reply.

0 Kudos
Message 16 of 18
(942 Views)

I'm actually trying to add more channels from the two daq devices: daq 1, daq 2. But it seems like when trying to add more channels from the same daq device, an error occurs.

hobbes8000_0-1673425908442.png

hobbes8000_2-1673425969232.png

what should I do? Can more channels be added using this type of code?

 

Thanks again for your effort. It's really helping me

0 Kudos
Message 17 of 18
(936 Views)

A port is a collection of digital lines and it works as a single entity. Use browse or syntax to select multiple lines from the same port in a single task.

ZYOng_0-1673445812541.png

 

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
0 Kudos
Message 18 of 18
(920 Views)