LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to find the PXI card for an SCXI card

I have a generic Linux app using NIDAQmx and I'm trying to figure out how to instantiate tasks based on a channel configuration file.  Basically I want a single task per PXI card.  This works fine if all I have are PXI cards.  But if I have SCXI cards, they are being sampled by a PXI card.  And I could have multiple SCXI chasses sampled by multiple PXI cards.  But the channel configuration only has the physical channel address (e.g. Dev1/ai5 or SC1Mod1/ai13).  Is there a programmatic way of querying the physical name or device name and getting the PXI card that is sampling it?

 

0 Kudos
Message 1 of 9
(3,299 Views)

If you’re using DAQmx, there is a Task Properly node where you can read the device in a task. This will tell you what PXI device is connected to your SCXI chassis after you configure the task.

Devices Propery node.PNG

Matt
Applications Engineer
National Instruments
0 Kudos
Message 2 of 9
(3,267 Views)

So I need to set up a task first?  That creates a sort of chicken-and-egg problem.  I start with a physical channel string that contains the device name.  The code currently creates a task based on the device name, but of course if the device name is a SCXI card, then CreateTask will fail on the second SCXI card because there is already a task for the device.  I need to know the PXI card for it before I create the task.

 

0 Kudos
Message 3 of 9
(3,265 Views)

You could pull the devices from running task(s) and make sure that you don’t try to create a task on device already in use.  If you tried to access a second card in the same SCXI chassis they would use the same PXI card resources and you would know not to try that; you can tell that by the resource name of the SCXI card. Unless you have multiple SCXI chassis controlled by a single DAQ device, this should allow you to keep them separate from each other.

 Also, the  “resource reserved” error occurs at the Start task, so if you only created the channel you could then check to see what device are in this task before programmatically starting the task or clearing it.

Matt
Applications Engineer
National Instruments
0 Kudos
Message 4 of 9
(3,246 Views)
DAQmx 8.0.1 for Linux does not have the higher level system-style API entry points that later versions of DAQmx for Windows have (because those functions were added later ;-).

Since you're using SCXI on Linux, you have already explicitly told DAQmx which PXI cards are connected to which SCXI modules with the nidaqmxconfig utility [1]. If you want to query your system's PXI-to-SCXI configuration at run-time, you'll need to call this utility and parse its output.

[1] Using nidaqmxconfig for NI-DAQmx 8 for Linux
http://zone.ni.com/devzone/cda/tut/p/id/4620
Joe Friedchicken
NI Configuration Based Software
Get with your fellow OS users
[ Linux ] [ macOS ]
Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
0 Kudos
Message 5 of 9
(3,242 Views)

Hi Matt,

 

I have few questions.

 

1.You mean all the cards in the SCXI chassis has to be configured in single Task?

 

2.If the SCXI chasis use the PXI card resource, then how to create the task for the SCXI card & PXI card to acquire the data simulataneously(ie., all the tasks run parallely)?

I tried creating the task to run parallely but I got the 'resource reserved' error. I could come to a final solution that all the SCXI cards & PXI card(card in which the resource used by SCXI chasis)  should be configured in single task. Is that correct or any other possible solutions?

 

Please look in to my old post for instrument details.

 

Thanks,

Raja

0 Kudos
Message 6 of 9
(3,138 Views)

HI Rajaa,

Yes, your SCXI cards should be in the same task. Additionally if you would like to use the other input line of your PXI 6224 they will need to be in the task as well. As you mention, can you try adding the channels together into a single task?

Matt
Applications Engineer
National Instruments
0 Kudos
Message 7 of 9
(3,104 Views)

Hi Matt,

 

Thanks for your reply.

 

I tried configuring both SCXI-1102 & PXI-6224 in single task. The tasks runs successfully but there is a limitation in sampling rate.

 

The maximum sampling rate for SCXI-1102 is 333kS/s and for PXI- 6224 is 250kS/s. Since the SCXI chasis is controlled by the PXI-6224, the net sampling rate is taken as lowest of the combination ie., 250KS/s.

If there is one SCXI-1102 & PXI-6224 card configured in a single task, the total channel count is 48(32 TC + 16 AI). So the maximum sampling rate is reduced to 5.2kS/s(250k / 48).

 

If an SCXI-1102 card is added, then the sampling rate is still reduced to 3.12kS/s. The thing is I want to sample PXI-6224 channels at high sampling rate. Since PXI-6224 is configured in the same task along with SCXI cards, the sampling rate for PXI-6224 is also reduced. Is there any other way to do?

 

Thanks,

Raja

0 Kudos
Message 8 of 9
(3,085 Views)

Hi Rajaa,

You are correct in that using a DAQ card to control a SCXI chassis will limit you sampling rate. The best solution to needing to sample your 16 AI at a high sampling rate and to read a lot of thermocouples would be to a second PXI 6224 or other DAQ card.  What sort of rate do you need to sample the 16 AI?

Matt
Applications Engineer
National Instruments
0 Kudos
Message 9 of 9
(3,067 Views)