Ano Ano Posted August 29, 2011 Report Posted August 29, 2011 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) 3 tasks.vi Quote
jgcode Posted August 29, 2011 Report Posted August 29, 2011 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 Quote
skilledengineer Posted August 29, 2011 Report Posted August 29, 2011 You could make sections of code optional. -George Quote
jgcode Posted August 29, 2011 Report Posted August 29, 2011 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 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.