Signal Conditioning

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically checking SCXI module type (ID) using NI-DAQmx

HI,


Using DAQmx (or MAX),  Within LabVIEW I need to know programmatically which (SCXI) tmodule type is connected to a given chassis’s slot, i.e. if there's a module connected to slot 1, if it's a SCXI-1102 or a SCXI-1104 module.

 

With NI-DAQ traditional I have been using the function SCXI_ModuleID_Read, which is exported by nidaq32.dll. Is there any similar functionalit but without NI-DAQ traditional drivers?

 

Thank you!

 

best regards,

 -- roberto j.

0 Kudos
Message 1 of 5
(4,134 Views)

Sorry!! I posted on the wrong forum. It was meant to LabVIEW's forum. If any moderator could move this message to LabVIEW's forum, I'll be glade.


Thanks.

0 Kudos
Message 2 of 5
(4,128 Views)

OK,

I made a provisory (?) solution to programmatically check whether a SCXI chassis's power is turned on or not, using DAQmx. The attached subvi also retrieves the module name/type. This subvi is based on:

http://zone.ni.com/devzone/cda/epd/p/id/3161

Attached are (made with LabVIEW 7.1):
test_SCXI_power.vi (the subvi itself)
test_power.vi (an example of how to call test_SCXI_power.vi).

I used an error handler as an example of how to handle a power off event.

 

Any suggestion, feel free to reply.


Regards,

-- roberto Janny.

Download All
0 Kudos
Message 3 of 5
(4,074 Views)
Just a couple of comments. The reason that this will work is because when a task is started for SCXI, information must be communicated to/from the module before the sample clock is started. If you get an error here due to the chassis being powered off it will occur at the beginning of the task at the DAQmx start task function. As a word of caution, if you are intending the detect a power failure in the middle of a task that is already sampling data, there is no reliable way to do this with SCXI if you are not using the SCXI-1600.

Also, the DAQmx device property is only reading data from MAX - I don't believe that it actually goes out and queries the physical device for its name.

For checking to see that the chassis is powered on, the DAQmx Reset Device function is an elegant way to accomplish this because it reads the device id from all devices and confirms that they match what is stored in MAX. This may also be a way for you to confirm that the device in slot 2, for example, matches what is stored in MAX for the SCXI chassis configuration.

Regards,
Logan K
0 Kudos
Message 4 of 5
(4,066 Views)

Logan K, thank you four you suggestion! Very elegant (clean) indeed. It wasn't my intention to deal with a power failure event in the middle of an data acquisition task, just to check if the chassis is turned on before starting the task itself.

Taking your advice, I've updated my version to use just "DAQmx Reset Device".

note: I'm using a ring control called "DAQmxDeviceSelect", to store a list of all my MAX devices, instead of using a DAQmx device (I/O) control (i.e., get MAX's current list of DAQmx devices).


Best regards,

-- roberto janny.

Download All
0 Kudos
Message 5 of 5
(4,062 Views)