예제 #1
0
        public double ReadSingleSample()
        {
            double[] values       = new double[8000];
            int      values_total = 0;
            uint     einternal    = 0;
            int      a            = NIDaqNative.DAQmxBaseReadAnalogF64(taskHandle, 10, 0.10, NIDaqNative.DAQmx_Val_GroupByChannel,
                                                                       out values, 1000, out values_total, out einternal);

            if (values_total > 0)
            {
                return(values[0]);
            }
            else
            {
                return(0.0);
            }
        }
예제 #2
0
 public void ConfigureDigitalEdgeTrigger(string triggerSource, int triggerEdge)
 {
     NIDaqNative.DAQmxBaseCfgDigEdgeStartTrig(taskHandle, triggerSource, triggerEdge);
 }
예제 #3
0
 public void CreateVoltageChannel(string devName, string referenceName, int config, double min, double max, int units)
 {
     int a = NIDaqNative.DAQmxBaseCreateAIVoltageChan(taskHandle, devName, referenceName, config, min, max, units, null);
 }
예제 #4
0
 public void ConfigureSampleClock(string source, double rate, int activeEdge, int sampleMode, UInt64 sampsPerChan)
 {
     int a = NIDaqNative.DAQmxBaseCfgSampClkTiming(taskHandle, source, rate, activeEdge, sampleMode, sampsPerChan);
 }
예제 #5
0
 public void Dispose()
 {
     NIDaqNative.DAQmxBaseClearTask(taskHandle);
 }
예제 #6
0
 public void Stop()
 {
     NIDaqNative.DAQmxBaseStopTask(taskHandle);
 }
예제 #7
0
 public void Start()
 {
     NIDaqNative.DAQmxBaseStartTask(taskHandle);
 }
예제 #8
0
 public NIDaqTask(string taskName)
 {
     int a = NIDaqNative.DAQmxBaseCreateTask(taskName, out taskHandle);
 }
예제 #9
0
 public NIDaqTask()
 {
     int a = NIDaqNative.DAQmxBaseCreateTask("", out taskHandle);
 }