Setting up the Express VI in Automatic Mode:
SensorDAQ has the ability to detect Vernier Auto-ID sensors, read their stored calibration coefficients, and return data in proper sensor units. With this Express VI you can configure the sensor channels to get the calibration values directly from the Auto-ID sensor that is connected. Choosing Automatic provides an easy way to insure that the data are calibrated correctly. In addition, this setting means that your VI has the flexibility to allow the user to connect any Vernier Auto-ID sensor and have the data returned in proper sensor units.
Setting up the Express VI in Manual Mode:
If you choose Manual configuration, the Express VI will send data back in the units that are specifically configured inside of the Express VI. Use the Manual configuration if you want to use non Auto-ID sensors, modify the calibration coefficients for more accuracy, include any of the analog input terminals, zero the reading, or send the reading back in raw voltage rather than calibrated units.
Manual Mode Options:
When Manual is selected the Add Channel, Set Calpage, and Zero Channel buttons become enabled. If you press any of these buttons a popup appears for configuring the channels.
Add Channel: This popup provides a means of activating a channel with the calibration coefficients of any Vernier sensor. This would be useful if you have a non Auto-ID sensor or if you have a custom sensor. In addition, this popup allows you to activate the two analog input channels on the screw terminal.
Set Calpage: Some Vernier Auto-ID sensors have multiple sets of calibration coefficients stored on the sensor. For example, the gas pressure sensor has coefficients for converting the raw voltage to kPa, mm Hg, and atm. If the sensor has multiple units, you can change the units here.
Zero Channel: When this popup is active, you can apply a zero offset to the sensor reading. Place a check mark next to the sensor. When you press the Apply button the offset is created, so make sure that you have the sensor aligned properly when you press the button. Note that this zero offset is not stored once LabVIEW is closed. You will have to re-open the Express VI and re-zero.
Adjust Calibration Coefficients: When Manual is selected,
the calibration coefficients and units become enabled. This allows you to
modify the coefficients. This would be useful if the sensor units are not
accurate enough. Most sensors have a linear conversion, so you could perform a
two point calibration test, determine more accurate coefficients, and apply
them here. Note that K1 is the slope value and K0 is the intercept. In
addition, set the slope = 1 and the intercept = 0 and units = Volts to send
data as the sensor’s raw voltage.
Point-by-Point or Multi-point Data Acquisition:
Use the Set Timing button to configure the Timing Settings. The Express VI can be configured to send the data back in single-point or multi-point packets. This is based on the sampling rate. If the Express VI is configured with a collection rate less than 200 Samples/second the Express VI will return a single data point every time the Express VI is called. With this configuration the Express VI is placed within a While Loop and the channel’s output terminal is wired to either a Chart or a Numeric Indicator. If the Express VI is configured for multi-point collection (> 200 Samples/second), the Express VI will return data as a packet of data points. Wire the channel’s output terminal to a Graph. Note that it is possible to have continuous, multi-point acquisition. To do this you must activate the “Repeat” option in the Set Timing popup. If the Express VI is configured for repeating multi-point acquisition the Express VI must be placed within a While Loop.
Sensors Combined with Screw Terminal Outputs:
The SensorDAQ sensor channels cannot be configured with the DAQ Assistant (this is why we created the SDAQ Assistant). However, the DAQ Assistant can configure the SensorDAQ screw terminal signals. Simply configuring the sensors with the SDAQ Assistant and the screw terminal signals with the DAQ Assistant is an extremely quick and easy method for creating a VI. For example diagrams see the section below, and find actual VI examples in the SDAQ Express folder located in LabVIEW’s user.lib directory.
Block Diagram Examples:
Example 1: Single-point data acquisition of any Vernier Auto-ID sensor connected to CH 1. The Express VI sampling rate is less than 200 Samples/second and the channels are configured in Automatic mode. A single data point is read from the sensor, and the Chart updated with this point at the specified acquisition rate. The Loop will automatically end when all of the data points have been collected, or pressing the VI’s Front Panel stop button can prematurely stop it.
Example 2: Single-point data acquisition in Manual mode.
In this example the terminal name specifies what sensor should be connected.
The calibration coefficients and any zero offset are stored in the Express VI
and will be used to convert the sensor’s raw voltage reading to proper sensor
units. Note how this differs from Example 1, where the calibration coefficients
are not stored in the Express VI, they are read directly from the sensor.
Example 3: Multi-point data collection. The sampling rate is greater than 200 Samples/seconds, which means data are returned in a packet. This Express VI is not placed within a While Loop because it is configured to acquire 1 set of data points (Repeat is Off).
Example 4: Continuous multi-point collection. This is the setup to have fast, streaming data. The Set Timing popup would be configured, for example, with the Length configured at 0.1 seconds and Repeat checked, and the Sampling Rate at 10,000 samples/second. With these settings, and the Express VI within a While Loop, the Graph will have the appearance of an oscilloscope display.
Example 5: Using the SDAQ Assistant to configure sensor
acquisition and the DAQ Assistant to control a digital line. In this example,
if the sensor reading is greater than the value in the Comparison Express VI
the screw terminal digital line 0 (pin 1) is turned to a high state. The DAQ
Assistant is configured as Generate Signal>Digital Output>Line
Output>port0/line0.
Example 6: Using the SDAQ Assistant to configure sensor
acquisition and the DAQ Assistant to control analog output. In this example,
the sensor reading is configured to output the sensor’s raw voltage (0 to 5
Volts). The sensor voltage is then used to control the screw terminal analog
output (pin 9). The DAQ Assistant is configured as Generate Signal>Analog
Output>Voltage>ao0>1 Sample (On Demand).