Why almost a minute and a half to get an error message from daqMX Create Virtual channel VI.
I need to find a way to have my executable bleep immediately if the underlying drivers are not installed.
For example, I have LV at home and supposedly have the drivers installed too but no hardware connected.
Sometimes I run a that uses daq, however when it encounter Creat Virtual Channel VI it appears to hang for a minute and a half before finally giving an error.
Anyone else been there, done that?
Where in your VI are you calling Create Virtual Channel?
You may want to add a DAQmx Control Task with the action enum set to "Verify" after Create Virtual Channel. This will verify whether the Create Virtual Channel has valid settings. Please let me know if this helps.
Thanks for replying D-cubed.
Actually Im calling create virtual channel in a state machine to set up the data acquisition.
When using on a machine that has a daq device installed its a piece of cake. no sweat.
However, when I am at home I have LabVIEW but possibly either no daq drivers or no daq hardware.
I believe it may be the second case since I can place a task on the BD so, I will assume the drivers are installed correctly.
There is just no daq hardware in the system.
WHen the create virtual channels Vi is called the PC appear to hang because that VI is executing internally (looking for a device I presume).
The timeout takes 1.5 mins and if not for me waiting the PC would appear to be hung up.
Finally some 'Mig error' message appear contact Ni about and so on.
WHat I am trying to do is have my program error out immediately instead of 1.5 mins later that there is no Daq device in the system.
I believe my previous suggestion will fix the problem. I have included a VI snippet -- see the below image -- which illustrates what I was suggesting. Once you force LabVIEW to verify the task, it will throw an error if there are no devices attached. Please try this step, and let me know if it helps.
I tried your suggestion but it did not remove the initial timeout, which is inside the acquire channel VI.
Here is the initial error I was talking about after about 90 secs of apparently hanging up the User interface
Error -229771 occurred at DAQmx Create Channel (AI-Voltage-Basic).vi:1
Internal Software Error occurred in MIG software. Please contact National Instruments Support.
Task Name: _unnamedTask<0>
After that no timeout is seen and error -229771 comes immediately. Only if I quit labVIEW then try again will
it go back to what I am describing.
By the way Im using 8.6.1 for this issue and in fact once LabVIEW throws the error once
it can be repeated with virtually no timeout (This is what I would want to happen on the first query to the DAQmx driver) . It is only on the first pass that this timeout and this particular error msg appears in my testing.