I'm trying to get a current out of channel 16 of a 6704 PXI board using the CWAOPoint control in Visual Studio .Net C#. When I use channels 0-15 it works, however for channels 16-31 I always get an error like this:
The analog input or analog output voltage or current range is invalid for the specified channel, or you are writing an invalid voltage or current to tho analog output.
The values that I'm writing are between 0.1 and 20.2, so that can not be the problem.
This is the code:
AO1.Reset();
AO1.Device = 3; AO1.ChannelString = "16";
float v = 1.5;
AO1.SingleWrite(v, true);
I tried added this, but it still gave the same error:
AO1.LowerLimit = 0.1;
AO1.UpperLimit = 20.2; AO1.ReferenceSource = CWAORef
erenceSources.cwaoDefaultReferenceSource;
AO1.ChannelType = CWAOChannelTypes.cwaoDefaultChannelType;