Jump to content

How to programmatically create multidevice tasks?


Recommended Posts

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?

Link to comment

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

Link to comment

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.

Link to comment

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!

Link to comment

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.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.