05-21-2007 10:46 AM
05-22-2007 08:48 AM
11-23-2009 06:43 PM
I need to know how to read AI.Max and AI.Min from a single channel in a task. When I attempt to do so, I get the following error:
Error -200658 occurred at Property Node DAQmx Channel (arg 1) in GetChannelMaxMin.vi->LPCUHeaterControl.vi->LPCUMainScreen.vi
Possible reason(s):
Measurements: Attempt to get property failed, because your task contains multiple channels, and the property has different values for different channels.
Get this property one channel at a time using Active Channel to specify each individual channel.
How do I get the property one channel at a time using Active Channel? I can set (write) a single Active Channel and properties, but it seems that I can not get (read) the Active Channel, nor any of its properties. The ActiveChans property is write only. Is there a get ActiveChannel function somewhere that I am missing?
The Channels array is an array of DAQmx Global Channels. The property node of this data type does not give access to AI.Min and AI.Max. Please help!
11-23-2009 08:17 PM
Try something like this.
11-24-2009 01:07 PM
Dennis,
Thanks for the quick reply. Your proposed solution was actually the first thing that I tried. Unfortunately, when I try the following:
I get an error the first time the DAQmx Channel property node is executed:
Error -200428 occurred at Property Node DAQmx Channel (arg 1) in GetChannelMaxMin.vi->LPCUHeaterControl.vi->LPCUMainScreen.vi
Possible reason(s):
Measurements: Value passed to the Task/Channels In control is invalid.
The value must refer to a valid task or valid virtual channels.
I believe this is one of the same errors that the first poster of this issue was referring.
It seems the elements of the Channel array (produced from the DAQmx Task property node) are not the data type that the DAQmx Channel property node expects. If I create a control from one of the Channel elements, and then create a property node from that control, AI.Min and AI.Max are not valid properties of the property node as shown in the screen shot below.
The DAQmx Channel property node seems to expect that a task be wired to it. I am still at a loss at how to retrieve AI.Max and AI.Min from individual channels in a task. What am I doing wrong?
11-24-2009 04:00 PM
Hello natewkidd,
For properties that will vary by channel, you need to define the Active Channel property before reading those properties. It will look something like this:
This will give you the AI.Max and AI.Min for the channel defined for "ActiveChans"
Regards,
11-24-2009 05:04 PM
Seth,
Thanks, that works! For some reason I didn't think I could write and read in the same property node, but I think ActiveChannels might be an exception.
nate
11-25-2009 09:21 AM
Nate,
Actually (at least as far as DAQmx is concerned) you can freely read and write in the same node all you want. Granted, some properties can only be read (for instance pretty much all of the device properties), but in general you can just right-click on the property line and select "Change To" » "Read" or "Write".