11-02-2016 07:28 AM
Hey,
I am trying to connect and disconnect a NI9188 cDAQ programmatically, I start by adding the device with "DAQmx Add Network Device.vi" followed by reserving it with "DAQmx Reserve Network Device.vi"
After the reservation I would like to spawn a few tasks on the chassis modules but this give me an error since the chassis has not yet descovered all its modules.
Adding a 10-15 second delay before creating the tasks removes this problem, but since this delay can very base on network I would like to find a better way to identify if the chassis is ready for use.
How do I veryfy programatically that all my modules have been added to the chassis and are ready for useage ?
I search on google and in this forum for a few hours without any luck and also tried several workaround like checking module types in a loop until all have been registered and running selftest on every module. Yet nothing seems stable so far and I am wondering what the correct way of doing it is.
11-02-2016 10:11 AM
11-03-2016 12:58 AM
Hey Ben64, thanks for the repply
This is one of the workaround I allready tried, the loop waiting for the modules names. It takes about 8 seconds before all are registered, but even though I can get the module names and types if I create a task right after this loop I will get in error on the last to modules not being avalible.
If I wait 3 seconds after this loop the task are created whitout any problems. It seem to me that they are not fully initialized when they are capable of sending out name and type information.
11-03-2016 01:06 AM
Here is how the VI was connected in that test
11-02-2018 07:44 AM
Good question. Unfortunately, not a satisfactory answer yet.
Basically I do the same as _Deks_ describes. Up to now, temperature readings are available once I polled for the Chassis.ModuleDevNames to exist.
I wonder how others distribute their executables? I you use static ModuleDevNames, then it won't work anymore as soon as your customer replaces the cDAQ chassis. It seems to me that it would also be difficult to update software for your customer, if you don't have your PC connected to the customer's hardware.