Esempio n. 1
0
        public virtual void Configure()
        {
            // This code was generated by Measurement Studio.  Changes to this
            // file may cause incorrect behavior and will be lost if the code
            // is regenerated.

            AIChannels.CreateVoltageChannel("Dev1/ai2", "Voltage", AITerminalConfiguration.Differential, -10, 10, AIVoltageUnits.Volts);
            Timing.ConfigureSampleClock("", 1000, SampleClockActiveEdge.Rising, SampleQuantityMode.FiniteSamples, 100);
        }
Esempio n. 2
0
 public virtual void Configure(string device, int channels,
                               int rate, int samplesPerChannel,
                               double minimumValue, double maximumValue)
 {
     for (int i = 0; i < channels; i++)                                                            // create channels starting at ai0
     {
         AIChannels.CreateVoltageChannel(device + "/ai" + i.ToString(), "Voltage_" + i.ToString(), //e.g Dev1/ai0
                                         AITerminalConfiguration.Differential,
                                         minimumValue, maximumValue,
                                         AIVoltageUnits.Volts);
     }
     Timing.ConfigureSampleClock("", rate, SampleClockActiveEdge.Rising, SampleQuantityMode.FiniteSamples, samplesPerChannel);
 }
Esempio n. 3
0
        public virtual void Configure(List <Channel> channels,
                                      int rate, int samplesPerChannel,
                                      double minimumValue, double maximumValue)
        {
            foreach (Channel channel  in channels)
            {
                AIChannels.CreateVoltageChannel(device + "/" + channel.DevicePath, channel.Name,
                                                AITerminalConfiguration.Differential,
                                                minimumValue, maximumValue, AIVoltageUnits.Volts
                                                );

                Timing.ConfigureSampleClock("", rate, SampleClockActiveEdge.Rising, SampleQuantityMode.FiniteSamples, samplesPerChannel);
            }
        }