Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Use External Reference for AOchannel

Solved!
Go to solution

Hi,

Using a 6259 device, I try to generate two analog outputs in a task. However, one of the analog outputs shall use an external reference (using APFI1 for example).

The problem is that I can't find a way to specify the external reference for only one channel.

Even if the documentation says that the AOChannelCollection has a public 'Item' member, this is not the case.

 

According to the 6259's user manual, it shall be possible to assign internal/external references per channel: "You can use one of the AO <0..3> signals to be the AO reference for a different AO signal. However, you must externally connect this channel to APFI 0 or APFI 1." - M series user manual, 5-2.

 

Thanks.

0 Kudos
Message 1 of 6
(5,123 Views)

May I reformulate my question:

 

In a task I have two analog output channels. One shall use the internal reference, the other shall use external reference.

How can I do this in C#?

 

Thanks.

0 Kudos
Message 2 of 6
(5,105 Views)
Solution
Accepted by topic author fvpetrov

Hey,

 

I tested it with the following code using two channels, each with a different external reference:

 

myTask.AOChannels[0].DacReferenceSource = AODacReferenceSource.External;
myTask.AOChannels[0].DacReferenceExternalSource = "/Dev3/APFI0";
myTask.AOChannels[0].DacReferenceValue = 10.0;
myTask.AOChannels[1].DacReferenceSource = AODacReferenceSource.External;
myTask.AOChannels[1].DacReferenceExternalSource = "/Dev3/APFI1";
myTask.AOChannels[1].DacReferenceValue = 5.0;

 

Hope this helps,

Christian

Message 3 of 6
(5,097 Views)
Thanks, I haven't seen the index operator "[]".
0 Kudos
Message 4 of 6
(5,035 Views)

Anyone no how to do the same thing in LV on the same hardware?

 

AO0 is scaleable by APFI0

AO1 sets the reference for AO0

A02 uses full scale range

AO3 uses full scale range

 

Thanks!

0 Kudos
Message 5 of 6
(4,653 Views)

This is one of those "couldn't see the forest for the trees" problems...

 

This is a good example: http://zone.ni.com/devzone/cda/epd/p/id/824

0 Kudos
Message 6 of 6
(4,585 Views)