Jump to content


Photo
- - - - -

How to programmatically create multidevice tasks?


  • Please log in to reply
5 replies to this topic

#1 Ano Ano

Ano Ano

    Very Active

  • Members
  • PipPipPip
  • 97 posts
  • Version:LabVIEW 2010
  • Since:2009

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?

#2 Tim_S

Tim_S

    The 500 club

  • Members
  • PipPipPipPipPip
  • 516 posts
  • Location:Michigan
  • Version:LabVIEW 2011
  • Since:1994

Posted 04 May 2012 - 01:05 PM

When I try to use this set up I get a "One or more devices do not support multidevice tasks." warning.

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).
Tim

"If this was easy our kids would be doing it." - Coworker

#3 Jordan Kuehn

Jordan Kuehn

    Very Active

  • Premium Member
  • 223 posts
  • Location:Oklahoma
  • Version:LabVIEW 2011
  • Since:2009

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

#4 JamesMc86

JamesMc86

    Very Active

  • NI
  • 197 posts
  • Location:UK
  • Version:LabVIEW 2012
  • Since:2006

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!

James McNally

AE Specialist, NI UK & Ireland & CLA


#5 Ano Ano

Ano Ano

    Very Active

  • Members
  • PipPipPip
  • 97 posts
  • Version:LabVIEW 2010
  • Since:2009

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?

#6 asbo

asbo

    I have no idea what you're talking about... so:

  • V I Engineering, Inc.
  • 1,273 posts
  • Version:LabVIEW 2011
  • Since:2008

Posted 07 May 2012 - 02:15 PM

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?

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.