04-22-2010 07:09 AM
04-22-2010 07:18 AM
04-22-2010 07:30 AM
You could use the DAQ assistant, it´s one of the very effective Express VIs, becuase for that what you configure inside the assistant wizard, after clicking ok, in the background LV code is scripted for exactly the functionality you need.
The screenshot I attached is based on the code that the Asisstant created, I added some managment and the splitting into 3 LEDs and the while loop.
In this example I used 3 AI channels (0 to 2 ). The 3 AI channels will be configuredone after the other, you could also use a for loop for doing that...
- Stefan
04-22-2010 07:32 AM
thank you,have any method to extract three signal from the task and fransfer to the indicator? Is possible to do that?
04-22-2010 07:36 AM
As you can see in my example, I extract the Booleans from the array and put them into indicators.
I do the checking for all the three AI channels, if you need only one or selected ones from all AIs you acquire, you can use the AI Read for reading ALL channels, and then use the Array subset / index Array for getting the channels you´re interested in.
04-22-2010 08:04 AM
04-22-2010 08:19 AM
SK@NIG wrote:You could use the DAQ assistant, it´s one of the very effective Express VIs, becuase for that what you configure inside the assistant wizard, after clicking ok, in the background LV code is scripted for exactly the functionality you need.
The screenshot I attached is based on the code that the Asisstant created, I added some managment and the splitting into 3 LEDs and the while loop.
In this example I used 3 AI channels (0 to 2 ). The 3 AI channels will be configuredone after the other, you could also use a for loop for doing that...
Is it not more easy to like described here http://digital.ni.com/public.nsf/allkb/9A2AF5E10E0C893386256FE8006807DF or use Physical Channel browse option and selecting channels by using Ctrl+left mouse button. Your method works fine, but it is somewhat awkward I would say
04-22-2010 09:21 AM
04-22-2010 09:44 AM
Yes, you´re right with using physical channel names and the ai0:2 symantic , which is less confusing and less code than my one.
But with the code above you are able to set channel names, resolution etc by channel.
Just for geeting an array of DBLs you one is smarter 😉