Instructions
UM-0085-B09 DT80 Range User Manual Page 26
RG
Programming the DT80
Typical Workflow
When creating a program to send to the DT80, typically the work will follow this order:
Connect Sensors
Sensors & Channels (P302) describes how to measure many different quantities and read many different sensor types
using the DT80’s analog, digital and serial inputs.
The first step is therefore to refer to the sub-section relating to the quantity you wish to measure. This will help you
decide on the most appropriate way to connect the sensor to the DT80.
Define Channels
Programming the DT80 essentially consists of :
• defining a series of measurements to take, and
• specifying when to take them.
Each measurement definition is referred to as a channel. It is important to be clear on how the word “channel” is used –
in DT80 parlance, it refers to a measurement to be made, not a physical input channel.
For example, if you program the DT80 to measure a voltage on analog input 1, then read the state of digital input 3, then
measure the voltage on analog input 1 again then you have defined three channels. The fact that the first and third
channels both measure the same physical quantity (the voltage on analog input 1) is irrelevant – as far as the DT80 is
concerned, they are two entirely separate measurements.
To specify when measurements are to be made, channel definitions may be grouped into schedule definitions. These
specify whether the channels should be sampled immediately, or periodically, or in response to some event.
To define a channel, you need to specify:
• the input number (e.g.
1 for analog input 1)
• the channel type (e.g.
V to perform a voltage measurement)
• any channel options that may be required (listed in parentheses, e.g.
(GL3V,FF3)
So to define the three channels mentioned above, you could enter:
1V 3DS 1V
Since we haven’t specified any schedule, these three measurements will be taken immediately, one after the other.
Default settings will be used, since no channel options were specified. By default, the DT80 will then return the measured
values in ASCII form to the host computer, e.g.
1V 234.9 mV
3DS 1 State
1V 233.0 mV
So once you have connected the sensor as described in Sensors & Channels (P302), you can then test it out by directly
entering a suitable channel definition.
For example, suppose we want to check the resistance of a resistor. In the section Resistance (P308), several different
wiring configurations are given. In this case we are going to connect the resistor directly to the DT80’s terminals so we
don’t need to worry about lead resistance issues. The simplest 2-wire configuration is therefore suitable, as described in
R4 – 2-Wire Independent Resistance Inputs (P310). We therefore pick an analog input to use, say input 2, and wire the
resistor between the * and # terminals on analog input 2. We can now enter the channel definition:
DT80>
2*R
2*R 559.1 Ohm
In this case the channel number is
2* (analog input 2, measuring between * and # terminals) and the channel type is R
(measure resistance) and there were no channel options, so the complete channel definition is
2*R.
Note: a particular physical input can be read using different channel types.
For example, a thermocouple can be read as a thermocouple or as a voltage. The command
1TK 1V
returns both a temperature and a voltage based on two readings of the same sensor.
For more information about how channels (measurements) are specified in the DT80 programming language, see
Channels (P33).