Quantcast
Channel: Measurement Studio for VC++ topics
Viewing all articles
Browse latest Browse all 656

synchronization between current channel and voltage channel in compactDAQ

$
0
0

Hi,

 

I am new to this forum and relatively new to National Instrument.

 

I have started using Visual Studio for ANSI C a few week ago. I am using NI cDAQ-9178 equipment, NI9227 module for current measurement, and NI9239 module for voltage measurement. I am trying to get synchronization work for 2 current channels in NI9227 (cDAQMod1/ai0: cDAQMod1/ai1) and 2 voltage channels in NI9239 (cDAQMod2/ai0: cDAQMod2/ai1).

 

Question 1:

How to synchronize these 4 channels together? Is there any synchronization sample code available for compactDAQ?

 

I started by looking at the example code in: National Instruments/NI-DAQ/Examples/DAQmx ANSI C/Synchronization/Multi-Device.

The example code list synchronization example for E & S Series, M Series sharing reference clock for PCI Devices, M Series sharing reference clock for PXI Device, DSA sharing sample clock, reference clock 10 synchronization for DSA devices. However, these example code does not apply on my case, since I am using compactDAQ.



Question 2:

How to measure 2 voltage channels (cDAQMod2/ai2: cDAQMod2/ai3) in NI9239 simultaneously?

 

I have wire connected between channel cDAQMod2/ai2 and cDAQMod2/ai3, a wire connection between cDAQMod2/ai2+ and cDAQMod2/ai3+, and a wire connection between cDAQMod2/ai2- and cDAQMod2/ai3-. So the voltage signal shall be the same between two channels.

I have tried to synchronize 2 voltage channels (cDAQMod2/ai2: cDAQMod2/ai3) in NI9239, and I am using the following function:

 

DAQmxCreateAIVoltageChan(taskHandle,"cDAQMod2/ai2:cDAQMod2/ai3","",DAQmx_Val_Cfg_Default,-10.0,10.0,DAQmx_Val_Volts,NULL)

 

However, when I read voltage data out, the voltage number measured between these two channels are not the same. Is it not scan two channel simultaneously? Is it scan the two channel sequentially, how much of time period between each scan?

 


Viewing all articles
Browse latest Browse all 656

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>