Jump to content

Multiple Task Aquisition


Ano Ano

Recommended Posts

Hello,

I need to have up to four WLS/ENET devices all connected to PC running Labview v10.

Each of these single module chassis will use the NI 9219 and for each of these devices I have a task that acquired voltage (2 channels) and temperature (2 channels)

The problem is that I will not have a steady number of these devices connected to the host PC. Depending on the experiment 1-4 devices (and possibly more in the future) need to be connected to the host PC.

If I write the code for 4 devices (hence 4 DAQmx acquisition sets) and I connect 3 devices, it will give me an error. "Error -201250 occurred at DAQmx Start Task.vi:2 Connection to the network device has timed out. The network device did not respond properly for a period of time. If timeouts persist, contact your system administrator."

Can this code be written in another way?

Or perhaps be able to group all tasks and feed them to one DAQmx acquisition set?

In the attached vi I have 3 devices (and hence 3 tasks)

post-20867-0-07306300-1314609263_thumb.j

post-20867-0-91669700-1314609272_thumb.j

3 tasks.vi

Link to comment
The problem is that I will not have a steady number of these devices connected to the host PC. Depending on the experiment 1-4 devices (and possibly more in the future) need to be connected to the host PC.

Hi Ano Ano

Can't you just use an Array of Tasks and a For Loop and configure the Array of Tasks at Run Time?

This is assuming you have enough time etc. to read and handle data for each device serially.

If not, maybe you will have to look at spawning clones that run in parallel (where the number of clones is determined at Run Time)?

This will make your code a bit more complex.

Cheers

-JG

Link to comment

You could make sections of code optional.

-George

You are still going to get an error Opening a reference to the Task if the device is not on the network.

You would have to disable the entire workflow (Open, Read, Close resources) if you wanted to to that.

Cheers

-JG

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