10-28-2012 07:48 PM
Hi,
I'm using cdaq 9188 system. it has connected by ethernet from PC. before start my application i need to check the initialization of my cdaq hardware.
i mean wheather all the i/o models are properly connected and working fine
need to check the cdaq controller is busy status or not.
need to check is reserve or unreserve the hardware or not.
if the condition are pass, then should start my application or quite application with message.
which is the best method to identify those task.?
Solved! Go to Solution.
10-29-2012 08:51 AM
DAQmx Reserve Network Device is a no-op if the device is already reserved by the host, so use that before your task to ensure that your device it reserved.
You can then use the DAQmx Device Property Node with the Chassis:Module Device Names property to get all the DAQmx device names for devices in the chassis; you can then iterate through this list to ensure that all the modules you expect to find are there. You can the DAQmx Device Property Node to look up specific attributes for a device to make sure it's what you expect: for example, that you have a device in slot 1 (Location:CompactDAQ:Slot Number is '1') that is a NI 9201 (Identification:Product Number is '0x72C5'). You may also want to run DAQmx Self Test Device.
If you're using the C API, the calls are similar: DAQmxReserveNetworkDevice() to reserve, DAQmxGetDevChassisModuleDevNames() to get the module devices, and DAQmxGetDevCompactDAQSlotNum() and DAQmxGetDevProductNum() to get the slot number and product number of a module. Self test is DAQmxSelfTestDevice().
10-29-2012 10:01 AM
but i need to check the device is now reserved for local client or not.... even if not done this from max. i need some property node to check this function before initialization.
the aim for this task basically for enduser, the product which we shipped to the customer some time some one failed to make those settings on max before shipment, for the need to track those function to before start the application.
Selftest for modules function which i have tested thats works fine.
hope you understand my question.
10-29-2012 10:15 AM
There are three cases:
1. The cDAQ-9188 is reserved by nobody.
2. The cDAQ-9188 is reserved by the host.
3. The cDAQ-9188 is reserved by some other host.
There isn't a direct way to query the reservation state, but you can infer it from Self Test, which will return an error:
1. You get an error. (-201388 'Network device is not reserved for this host.')
2. Self test will run normally.
3. You get an error. (-201288 'Network device is not reserved for this host.')
This may be sufficient for your needs. If you want to distingish between case #1 and case #3, then DAQmx Reserve Network Device with the 'override reservation' argument set to false has different side-effects:
1. The cDAQ-9188 becomes reserved by the host.
2. The cDAQ-9188 continues to be reserved by the host. (no change)
3. You get an error. (-201420 'The network device is currently reserved by another host.')
06-24-2013 03:21 AM
I am too having this Error -201388 "Network device is not reserved for this host" while doing Self Test of cDAQ 9188 in MAX. Can you please tell me how to remove this error?