LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

cDAQ DIO External interrupt

Dear Forum,

 

I have an cDAQ-9174 connected to my win10 PC, with an NI-9403 card that reads hall sensors.

 

There is any way to make the digital input act as an "external interrupt" from a microcontroller rather than a "polling" by repeatedly reading it ?

 

Thank you

 

Andrei

0 Kudos
Message 1 of 7
(325 Views)

Hi Andrei,

 

what exactly do you want to trigger? (Which part of your system should react on this "interrupt"?)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 7
(309 Views)

Hi GerdW

 

Ideally I should be able to call a function to execute some tasks at the detection of a rising edge on the digital input . I need to read an absolute rotary encoder in this case with minimum time delay after the rising edge.

 

I am open to options if I can avoid continuously reading the DIO.

 

I expect to end up using an "event case".

 

From what I searched until now every time I need to execute a read of the digital input pin, and I hope is possible to avoid this.

 

Thank you

 

Andrei

 

Thank you

 

Andrei

0 Kudos
Message 3 of 7
(281 Views)

Hi Andrei,

 


@Andrei_Hapenciuc wrote:

Ideally I should be able to call a function to execute some tasks at the detection of a rising edge on the digital input .

I expect to end up using an "event case".


In the DAQmx functions palette there is a submenu on "DAQmx Events": here you can try to setup an event to detect a "change event".

As I didn't use this feature so far I cannot tell if your specific hardware supports such events…

 


@Andrei_Hapenciuc wrote:

I need to read an absolute rotary encoder in this case with minimum time delay after the rising edge.

From what I searched until now every time I need to execute a read of the digital input pin, and I hope is possible to avoid this.


Define "minimum time delay": using a continuous task you may read samples at 10ms intervals if that is ok for you.

How is your cDAQ connected to your computer? The communication bus also influences communication speed (latency, throughput, …)!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 7
(269 Views)

Thank you GerdW,

 

I was afraid I would end up studying these "DAQmx Event" functions.

 

the cDAQ uses USB to comm with the PC.

 

10ms would be a maximum value.

 

Best Regards,

 

Andrei 

0 Kudos
Message 5 of 7
(259 Views)

Hi Andrei,

 


@Andrei_Hapenciuc wrote:

10ms would be a maximum value.


When you need a reliable reaction time you should consider using a cRIO and even employing its FPGA capabilities. Especially for "maximal 10ms" time frames…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 7
(249 Views)

I agree with you, but I have a very limited buget and both FPGA license and cRIO are adding lots of K$ 

0 Kudos
Message 7 of 7
(232 Views)