コード例 #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);
 }