Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Can a DAQ-mx Task contain channels from a Pxi-6143 and a Pxi-4472?

7 views
Skip to first unread message

MikeS81

unread,
Jun 11, 2008, 2:10:13 AM6/11/08
to
Hi TimTower,
where do you read it? AFAIK you can create one task per device and I/O Type (AI, AO, DI, DO, ...).
Mike

Brooks_C

unread,
Jun 11, 2008, 1:10:15 PM6/11/08
to
Hello TimTower,

 

In general what Mike said is correct, you need to use a separate task for each device and I/O function.  There are three exceptions to this that are detailed in the NI-DAQmx help file--multiple DSA, S Series, or cDAQ modules.

 

You can view the details by going to Start» All Programs» National Instruments» NI-DAQ» NI-DAQmx Help.  Then in the NI-DAQmx Help window navigate to NI-DAQmx Device Considerations» Multidevice Tasks.

 

Basically there are special cases for these three classes of devices, but one of the requirements is that all of the analog input channels come from devices of the same series (i.e. all DSA or all S Series, and not a mix).  That is why you're able to use the automatic channel expansion with two PXI-6143's but not a PXI-6143 and a PXI-4472.

 

In order to use analog inputs from both devices you?ll need to create a separate task for each device.

 

Cheers,

Brooks_C

unread,
Jun 12, 2008, 11:10:16 AM6/12/08
to
Hello TimTower,

 

If your end setup only uses two PXI-6143's and/or a PXI-4472 then I think the easiest way to do this would be to copy the code and use a case statement to decide which tasks to run since at most you're going to need two tasks.  However, if you're going to be expanding this system and want to make a program that is expandable to have a large number of tasks then you can utilize for loops and auto indexing for arrays.

 

For instance, if you create an array of physical channel controls then you can pass this array into a for loop, enable indexing, and the loop will automatically run one time for each array element.  This will allow you to index through all of your devices and configure your tasks.  Utilizing for loops would be the cleanest way to implement this feature, but if you're going to synchronize the tasks and share sample clocks/start triggers between devices the implementation will get more difficult.  It is really up to you if you want to spend the time to do this rather than just copying and pasting the code for one channel.  In the end this would be very nice code, but it will almost certainly take longer to develop.

 

Another option would be to use only DSA or S Series cards and utilize the build in channel expansion capabilities of these cards.  This would require some different hardware (i.e. all S Series or all DSA cards), but would also be very easy to implement in software.

 

Cheers,

Brooks_C

unread,
Jun 12, 2008, 11:40:13 AM6/12/08
to
Hello TimTower,
 
I just realized I skipped over the last part of your question.  You can run as many different tasks as you like in the same VI as like as each task is for a unique device and I/O function (i.e. you can't run two analog input tasks on the same device).  The one exception is counter tasks--each counter, even on the same device, must be configured in a separate task.  That means that if you make one analog input task for your two PXI-6143's that you could copy and paste the same code into the same VI and select the PXI-4472.
 
Let me know if you'd like me to explain anything more.
 
Cheers,

TimTower

unread,
Jul 21, 2008, 1:40:17 PM7/21/08
to
Hi Brooks I have run into another issue with my DAQmx code. I am trying to read the Physical channel names of all the channels in the selected tasks. (As are displayed in MAX).  I wish to extract from these the Slot#, to display in the table of channel name and values. I find that I get error 200428 when I try to read the Physical channel names of an array of channels in the task. See attached VI. What is wrong?ThanksTim


ReadingPhysChanNames_DaqMXtask_Test.vi:
http://forums.ni.com/attachments/ni/270/5632/1/ReadingPhysChanNames_DaqMXtask_Test.vi

Brooks_C

unread,
Jul 21, 2008, 8:10:15 PM7/21/08
to
Hello Tim,

 

With regards to your timing question, this delay depends on how your tasks are configured.  In order to be completely synchronized you need to share a start trigger and sample clock.  For all of the channels within one task there will be no phase delay because they all share the start trigger and sample clock, however, unless you explicitly share these items between your two tasks there will be an unknown phase delay between the two channels.  In the best case you would configure both tasks and then use data flow to start one after the other--in this case you might have something on the order of 1-10 ms delay; however this will be highly dependent on what your computer is doing at the time.  The short story is that you're either synched on the order of 25-50 ns by sharing the clock or out of sync by 1-10 due to Windows software timing.

 

Unfortunately, there isn't a good way to avoid complications if you shut down the chassis while the computer is running.  While I wouldn't necessarily expect a BSOD it doesn?t surprise me that it happens--the chassis are not intended to be shut down in this way and it should just be avoided.  If you're interested, there is a way to disable the PCI bridge to turn the chassis off without turning the computer off, but it won't really help protect your customers since they'll need to be aware of it either way.

 

For your second post, take a look at the attached VI, I believe the issue is that you needed to wire a task reference to the second property node and not the channel.

 

I hope this helps, and have a great night!

0 new messages