03-06-2010 02:18 PM
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?
03-08-2010 03:00 PM
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.
03-08-2010 03:09 PM
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.
03-09-2010 12:44 PM
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.
03-09-2010 12:52 PM
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)
04-19-2010 07:31 AM
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
04-20-2010 04:58 PM
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?
04-21-2010 12:00 AM
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
04-21-2010 05:13 PM
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?