06-10-2008 05:38 PM
06-11-2008 12:42 AM
06-11-2008 11:51 AM
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,
06-11-2008 01:58 PM
06-12-2008 10:09 AM
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,
06-12-2008 10:33 AM
07-18-2008 07:37 PM
07-21-2008 12:35 PM
07-21-2008 06:54 PM
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!
04-07-2011 02:49 PM
Hello,
I am looking to do something similar with a USB Digital I/O device. What I am looking to do is to drive relays, for now I'm using 2 USB-6009's - using the 12 digital I/O lines (for output). I have a couple of options for the count sequence: binary sequence, decimal sequence, all on/off, and random. If I'm only working with one device it's fine. The final target is to be capapble of driving 502 points - for now I'm working with low count quantities.
Driving one device gives me 12 lines to drive. I have been playing around with the line grouping configuration in the DAQ MX virtual channel. When I went to 2 devices I had to create separate digital output tasks and then split the number value in half. If I could group the digital output tasks so that the 2 USB devices are transparent to the user that would be super. But it's starting to look like I'll have to have one VI for a low device count, and for the high device count use a relay card so I don't have to build/buy relays - making the interfacing easier.
Thoughts / comments / suggetions?
Mike