01-07-2017 02:44 PM
I have a VI that initializes two counters using the DAQmx drivers, waits in a while loop until the exit button is pressed, and then shuts them down. I would like to alter the timing of these pulses which I can do just fine in a test VI, however when I use this as a sub VI in my main program I need to refference the DAQmx event. I can't figure out how to get this refference to my main VI so I can call a propertiy node. Does anyone know how to refference a DAQmx event outside of the VI it's created in? The only solution I have is use two VIs and outout the event refference from the first so the main can use it.
Hardware: PCI_6023E
DAQ_Test_Trigger_Outputs.vi works fine.
Ocean_TriggerSource.vi is the subvi in my main program.
counter.png shows where I'm calling Ocean_TriggerSourse.vi. The cluster contains the refference to the stop button.
I have an event loop in the main VI that handles any user input while the program is running, and is where I would like to alter the counter properties.
For the curious these counters are triggered on a pulse, then wait some amount of time (~1ms) before sending their own pulse that stays high for 1ms. The trigger pulse is coming every 5ms. I need to be able to exactly adjust each delay independantly while the program is running.
01-07-2017 04:09 PM
This is my current work around
01-09-2017 05:48 PM - last edited on 01-10-2024 01:30 PM by migration-bot
Have you tried using a call by reference node? Would this help your situation?
https://www.ni.com/en/support/documentation/supplemental/06/calling-a-labview-vi-by-reference.html
Eric Wang
Applications Engineering