Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Sample code for syncing AO with diffrent AI

I'm trying to figure out some sample code (C#.Net, VB.NEt or C++.NET) for the following

 

Triangle Wave of -5V to +5V to -5 Vin 0.01 V Steps (so 2002 Steps)

For Each Step of the Wave using A0 Output I want to take a Voltage Measurment on AI1.

With each step being about 1 to 2 Milliseconds long.

 

If I'm reading it correctly, this should be able to be done with the Internal clock, correct ?

 

0 Kudos
Message 1 of 8
(5,049 Views)

Hi RRobertH,

 

Yes this should be possible with the internal clock. However, this depends on the DAQ card that you have. For example, the USB-6008/9 will not be able to do this because those cards are software-timed.

 

Please let me know what DAQ card you are using so I can confirm that this is possible. Thanks!  

Rasheel
0 Kudos
Message 2 of 8
(5,034 Views)

Sorry, We are using the PCI 6229 for our testing.

 

0 Kudos
Message 3 of 8
(5,028 Views)

Hi RRobertH,

 

Yes, you will be able to use the internal clock. 

Rasheel
0 Kudos
Message 4 of 8
(5,015 Views)
Is their any sample code on how to do that ? (Syncing an Output with an Input) ?
0 Kudos
Message 5 of 8
(5,009 Views)

Hi RRobertH,

 

Could you explain a little further how exactly you want your AO synced with your AI?

 

I do not think there is sample code available for this, but perhaps I could give you some suggestions on getting started.

  

Rasheel
0 Kudos
Message 6 of 8
(4,998 Views)

I'm using the -5V to +5V back to -5V in 10mV steps to drive our driver.

The load has a 10mA Source from a External Supply.

The Load's Resistance  Will change depending on the Driver Voltage.

We need to sync the Measurment from the Analog In with the Voltage Driven 

so at -5.00, -4.99, -4.98, -4.97 ect to +5 And then Back to -5V (about 2002 Measurments), 1 Measurment for each step of the driver.

 

The Sweep from -5V to +5V back to -5V should take about 2 Seconds.

 

0 Kudos
Message 7 of 8
(4,994 Views)

Hi RRobertH,

 

I did find an example in this location that might be useful to you:

C:\Documents and Settings\All Users\Documents\National Instruments\NI-DAQ\Examples\DotNET2.0\Synchronization\Multi-Function\SyncAIAO_DigStart

 

You should be able to modify it to fit your purpose. Let me know if that was helpful! 

Rasheel
0 Kudos
Message 8 of 8
(4,972 Views)