How to programmatically create multidevice tasks?
Started by
Ano Ano
, May 04 2012 09:30 AM
5 replies to this topic
#1
Posted 04 May 2012 - 09:30 AM
Hello,
I have 4 WLS-9191 with 4 NI-9219 cards and I want from each card to acquire 2 voltage and 2 Temperature (Thermocouple) readings.
When I try to use this set up I get a "One or more devices do not support multidevice tasks." warning.
The end goal is to programmatically create taks in such a way that if a WLS-9191 is switched on or off the program to detect it and either create a task for it or not.
Any ideas on how to bypass this error?
I have 4 WLS-9191 with 4 NI-9219 cards and I want from each card to acquire 2 voltage and 2 Temperature (Thermocouple) readings.
When I try to use this set up I get a "One or more devices do not support multidevice tasks." warning.
The end goal is to programmatically create taks in such a way that if a WLS-9191 is switched on or off the program to detect it and either create a task for it or not.
Any ideas on how to bypass this error?
#2
Posted 04 May 2012 - 01:05 PM
Based on your error, you're trying to create one task for multiple devices. You will need to create four tasks for the four devices (9219s).When I try to use this set up I get a "One or more devices do not support multidevice tasks." warning.
Tim
"If this was easy our kids would be doing it." - Coworker
"If this was easy our kids would be doing it." - Coworker
#3
Posted 04 May 2012 - 01:14 PM
Any ideas on how to bypass this error?
Create a case structure after initializing your tasks to look for this specific error code. In the event that you see it, make new tasks. You can even check for errors after the creation of each task and handle them appropriately.
The Colex Group
Lead Software Engineer
Certified LabVIEW Developer
Lead Software Engineer
Certified LabVIEW Developer
#4
Posted 04 May 2012 - 09:37 PM
I've not come across this specific error but think I can explain it.
A DAQmx task is somewhat defined around it's timing engine i.e. one task will always have one time set up. The WLS devices has no way to share timing signals (naturally) so they cannot share one physical timing engine and that is why you cannot have them in a multi-device task. You will need one task for each device, although I would imagine this would actually help with your task!
A DAQmx task is somewhat defined around it's timing engine i.e. one task will always have one time set up. The WLS devices has no way to share timing signals (naturally) so they cannot share one physical timing engine and that is why you cannot have them in a multi-device task. You will need one task for each device, although I would imagine this would actually help with your task!
James McNally
AE Specialist, NI UK & Ireland & CLA
#5
Posted 07 May 2012 - 08:23 AM
Thank you for all the replies,
Since I need to create a task for each device, are there any ideas on how to implement this in perhaps a "For Loop" and create an identical task for each connected device?
Since I need to create a task for each device, are there any ideas on how to implement this in perhaps a "For Loop" and create an identical task for each connected device?
#6
Posted 07 May 2012 - 02:15 PM
I think you've kind of spelled it out right there. Since it's a task, you'll have to create global virtual channels configured how you like (but it sounds like you already do) and then use a Create Task node inside a loop which indexes off an array of those channels.Since I need to create a task for each device, are there any ideas on how to implement this in perhaps a "For Loop" and create an identical task for each connected device?












