Sensoray 518 User Manual
Page 18
17
Declare Channel Sensor
This command declares the type of sensor connected to a channel. Typically, this command is
executed once for each channel during the coprocessor initialization sequence (i.e., after a reset).
Each execution of this command specifies the sensor type for a single channel, therefore, eight
invocations must occur to declare all eight channel sensors.
A two-byte sequence forms the command string. The first command byte contains the Define
Channel Sensor opcode and desired channel number. The second command byte contains a
“sensor definition code”. Each sensor type is assigned a unique 8-bit sensor definition code.
Refer to the Sensor Tables section for a complete list of sensor codes.
Undeclared channel sensor types default to the 5 volt input range. Any attempt to declare a
“reserved for future use” sensor type will also result in the default sensor type. Declaring a
sensor type as “Disabled” inhibits scanning of the corresponding channel, resulting in increased
throughput for all remaining active channels.
COMMAND: (16 + CHAN), (SENSOR DEFINITION CODE)
RESPONSE: NONE
EXAMPLE:
‘ Configure channel 2 for interface to type K thermocouple.
Channel% = 2 Opcode% = 16 ‘DEFINE CHANNEL SENSOR command opcode
SensorCode% = 3 ‘K thermocouple sensor definition code (from table)
CALL Send518Byte (BasePort%, Channel% + Opcode%)
CALL Send518Byte (BasePort%, SensorCode%)