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.

Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Several hardware timed tasks performing DaqMxWriteDigitalU32 simultaneously

Solved!
Go to solution

Hello everybody, 

 

Until now, I had only one task which  was hardware timed cadenced by ctr0. I could write samples using DaqMxWriteDigitalU32 and everything work fine.

I want now to create another task to write on another channel at another frequency hardware timed : I have created another task hardware timed by ctr1.

 

The problem is : when Task1 is writing samples, i can't write with Task2

 

I have the error : 

Error -89137: Specified route cannot be satisfied, because it requires resources that are currently in use by another route.

 

This link 

http://digital.ni.com/public.nsf/websearch/28F2757575F9C77B862575C2005F36B4?OpenDocument

explains that it is not possible however i'm not sure that my problem is the same as explained in the link.

 

Can you confirm me that is not possible to write with two digital task hardware timed simultaneously ? (I'm using a 6259)

 

Thank you very much for your answer

 

 

 

0 Kudos
Message 1 of 5
(3,012 Views)

Here is a paragraph that I have read in the M Series documnetation : 

 

M Series devices do not have the ability to divide down a timebase to produce an internal DO Sample Clock for digital waveform generation. Therefore, you must route an external signal or one of many internal signals from another subsystem to be the DO Sample Clock

 

Is it enought to says that i can not make simultaneously two digital output write with for each DO  its own DO Sample clock ?

Thank you for your answers

 

0 Kudos
Message 2 of 5
(2,967 Views)
Solution
Accepted by topic author jank91

Hello,

Technically speaking, the M Series module have a STC2 ASIC which does not offer a timing engine for DIO. Because of that, hardware-timed single point DO are not supported on this type of device : http://digital.ni.com/public.nsf/allkb/B4E831774F29FB038625754C0081C050

 

It's true that you can use various workarounds (using an internal counter, or an external clock source) to be able to do a hardware-timed DO task with your M Series device :

http://digital.ni.com/public.nsf/allkb/51754212AD10BDCE862573BD007BFDD2, but you are still limited to a *single* hardware-timed DO : http://digital.ni.com/public.nsf/allkb/4118E8CE24F4101786257EAB00597A93?OpenDocument.

 

I hope this helps

 

Pierre-Emmanuel BELLES
Certified LabVIEW Developper
Certified TestStand Architect

0 Kudos
Message 3 of 5
(2,937 Views)

Thank you very much for your answer. I know now that i took the good decision for finding another way to do what I want.

 

Here is the solution that I have found : 

- A single counter for my hard timed DO

- An NI Task for the DO which runs continuously and generates waveforms

- Two thread accessing to this function and updating sample to be written (samples are protected with a mutex)

 

I have sometimes glitching phenomena because of waveforms which are generated continously (not an issue for what I need)

http://zone.ni.com/reference/en-XX/help/370466Y-01/mxcncpts/glitching/

 

Best regards

0 Kudos
Message 4 of 5
(2,895 Views)

Thank you very much for your answer. I know now that i took the good decision for finding another way to do what I want.

 

Here is the solution that I have found : 

- A single counter for my hard timed DO

- An NI Task for the DO which runs continuously and generates waveforms

- Two thread accessing to this function and updating sample to be written (samples are protected with a mutex)

 

I have sometimes glitching phenomena because of waveforms which are generated continously (not an issue for what I need)

http://zone.ni.com/reference/en-XX/help/370466Y-01/mxcncpts/glitching/

 

Best regards

0 Kudos
Message 5 of 5
(2,896 Views)