DQMH Consortium Toolkits Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Incorporating NI-DAQmx change detection (events) in DQMH module

Hi,

 

I tried implementing this solution, but LV crashed immediately.  I'm wondering if there is something in LV 2020 that prevents this type of implementation in which the events are registered outside the helper loop with an empty task.  Any ideas? 

0 Kudos
Message 11 of 16
(1,401 Views)

Hi speclabAI,

I have the same crash using daqmx event in a helper loop for reading data. Try the piece of code below to fix the crash. It works fine in my use case. The inconvenience is that you need to have a Daqmx device, if not it crashes even you are not starting the acquisition.

 

Olivier-JOURDAN_0-1606145441567.png

 

I think it's a Daqmx, not related to the LV version. I'm in LV2019.

I never took the time to report it back to NI...

 

Hope this helps.

 

Olivier

 


Olivier Jourdan

Wovalab founder | DQMH Consortium board member | LinkedIn |

Stop writing your LabVIEW code documentation, use Antidoc!
Message 12 of 16
(1,388 Views)

Thank you Olivier.  Your fix worked!  Very much appreciated.

0 Kudos
Message 13 of 16
(1,371 Views)

@speclabAI  a écrit :

Thank you Olivier.  Your fix worked!  Very much appreciated.


👍


Olivier Jourdan

Wovalab founder | DQMH Consortium board member | LinkedIn |

Stop writing your LabVIEW code documentation, use Antidoc!
0 Kudos
Message 14 of 16
(1,359 Views)

Hi, I know this is an old thread, but Olivier just pointed me to it from another and I though I'd post another option in case anybody finds it useful, plus in case I forget 🙂 as I found for myself a nice repeatable way to do this after quite a bit of pain.

 

I have been using this a while and works OK for me.

 

The highlighted Vi below creates and configures  a AI Voltage DAQmx task, I make this VI first.

 

danny_t_4-1645007221031.png

 

The from that Vi's DAQmx Task output I create a simple drop on a Create Event

 

danny_t_6-1645007704165.png

 

 

Then I click on the Event registration refnum wire and create a constant

 

danny_t_5-1645007433321.png

I can then use this constant for my registration.

 

danny_t_0-1645006973007.png

 

I then NEED TO REMEMBER (because I sometimes forget) that the tunnel into the Helper Loop needs to become a shift register and that every case needs to have the Event registration wire pass through.

Danny Thomson AshVire Ltd
Message 15 of 16
(1,109 Views)

@danny_t I implemented your solution, and it's working very well 🙂

Thanks.


Olivier Jourdan

Wovalab founder | DQMH Consortium board member | LinkedIn |

Stop writing your LabVIEW code documentation, use Antidoc!
0 Kudos
Message 16 of 16
(824 Views)