Sensoray 518 User manual

-~
ARTISAN
®
~I
TECHNOLOGY
GROUP
Your definitive source
for
quality
pre-owned
equipment.
Artisan Technology
Group
Full-service,
independent
repair
center
with
experienced
engineers
and
technicians
on staff.
We
buy
your
excess,
underutilized,
and
idle
equipment
along
with
credit
for
buybacks
and
trade-ins
.
Custom
engineering
so
your
equipment
works
exactly as
you
specify.
•
Critical
and
expedited
services
•
Leasing
/
Rentals/
Demos
• In
stock/
Ready-to-ship
•
!TAR-certified
secure
asset
solutions
Expert
team
ITrust
guarantee
I
100%
satisfaction
All
tr
ademarks,
br
a
nd
names, a
nd
br
a
nd
s a
pp
earing here
in
are
th
e property of
th
e
ir
r
es
pecti
ve
ow
ner
s.
Visit our website - Click HERE

PC/104 8-Channel Smart Sensor Interface
Technical Manual
Model 518 | Re .2.0.2 | September 2017
Copyright © 2017 by Sensoray

Table of Contents
Chapter 1: Introduction....................................1
1.1 Functional overview............................................1
Chapter 2: Configuration and installation.........2
2.1 Handling instructions..........................................2
2.2 Configuration......................................................2
2.2.1 Address mapping.................................................2
2.2.2 Interrupts..............................................................2
2.2.3 Thermocouple shunts...........................................3
2.3 Installation..........................................................3
Chapter 3: ensor connections.........................4
3.1 Connector P1.......................................................4
3.2 RTDs, thermistors and resistors..........................4
3.3 Thermocouples and voltage................................5
3.4 train and pressure gauges..................................6
3.5 Current loops.......................................................6
Chapter 4: Register-level programming...........7
4.1 Programming model............................................7
4.2 tatus register......................................................7
4.3 Control register...................................................8
4.4 Handshaking.......................................................8
4.4.1 Byte handshake....................................................8
4.4.2 Endianness...........................................................9
Chapter 5: Commands....................................10
5.1 Overview...........................................................10
5.1.1 Conventions.......................................................10
5.2 Basic operation..................................................10
5.2.1 Declare ensorType............................................10
5.2.2 ReadChannel......................................................11
5.2.3 ReadAllChannels...............................................11
5.3 Alarm/fault commands......................................11
5.3.1 etOpenValues...................................................11
5.3.2 etLimits............................................................12
5.3.3 ReadAlarms........................................................12
5.4 Gauge commands..............................................13
5.4.1 etGaugeZero....................................................13
5.4.2 etGauge pan....................................................13
5.4.3 TareGauge..........................................................13
5.4.4 ReadGaugeCalibration.......................................14
5.4.5 etGaugeCalibration..........................................14
5.5 Miscellaneous commands.................................14
5.5.1 ReadFirmwareVersion.......................................14
5.5.2 ReadBoardTemperature.....................................15
5.5.3 ReadModel.........................................................15
5.5.4 Calibrate.............................................................15
Chapter 6: ensor specifics............................17
6.1 Thermocouples..................................................17
6.1.1 Accuracy............................................................17
6.2 Gauges..............................................................17
6.2.1 Resolution..........................................................17
6.2.2 etting zero and span.........................................18
6.2.3 Taring.................................................................18
Chapter 7: Timing..........................................19
7.1 Warm-up...........................................................19
7.2 ampling...........................................................19
7.3 Communication.................................................19
Chapter 8: pecifications................................20
8.1.1 General specifications........................................20
8.1.2 ensor specifications..........................................21
Chapter 9: Limited warranty..........................22
518 Instruction Manual i Table of Contents

518 Instruction Manual ii Table of Contents

Chapter 1: Introduction
1.1 Functional overview
Model 518 is a PC/104 circuit board that interfaces any combination of up to eight sensors to a host computer. Each sensor
channel provides complete signal conditioning for a variety of sensor types, thus allowing any channel to be directly
connected to a thermocouple, RTD, strain gauge, thermistor, resistor, 4-to-20 mA current loop, or DC voltage.
Block diagram
Pulsed excitation is provided for thermistors, resistors, RTDs, and strain gauges, which minimizes sensor self-heating and
reduces power consumption. Excitation signals are routed to dedicated connector pins to allow four-wire sensor circuits that
completely eliminate lead-loss errors.
Cold junction compensation is automatically applied to thermocouples (requires optional, external sensor), and fully
differential inputs are used to provide common-mode voltage rejection.
The onboard controller continuously scans the eight sensor channels. As each channel is scanned, the sensor is excited,
digitized, normalized to precision standards, linearized, and converted to engineering units as appropriate for the sensor
type. The most recent measurement from each channel is immediately accessible to the host.
Alarm limits may be programmed for each channel. A status flag is set when any limit is violated, eliminating the need for
host polling.
518 Instruction Manual 1 Introduction

Chapter 2: Configuration and installation
2.1 Handling instructions
The model 518 board contains electronic circuitry that is sensitive to electrostatic discharge (E D). pecial care should be
taken in handling, transporting, and installation to prevent E D damage to the board. In particular:
•Do not remove the board from its protective packaging until you are ready to configure and install it.
•Handle the board only at grounded, E D protected stations.
2.2 Configuration
Hardware configuration must be completed before the board is installed. This is accomplished by installing shunts to
configure various hardware options. ome shunts are factory installed, which results in the following configuration:
Default configuration:
Base address 0x2B0
PC/104 interrupts Disabled
Channel filters Disabled
2.2.1 Address mapping
The board may be mapped to any four-byte address block within the range 0x000 to 0x3FF. The board occupies a four-byte
address range but uses only the first two address locations in the range.
To avoid address conflicts, you must map the board into an address range that is not used by other devices. Model 518 does
not decode the full PC/104 16-bit I/O address; only the low ten address bits are decoded. Consequently, aliased “images” of
the 518 will appear throughout the 16-bit address range at intervals of 0x400 bytes. You must ensure that these images do
not conflict with other devices.
hunts E1 through E8 are used to select the board's base address. hunts are factory set to locate the board at base address
0x2B0. If you require a different base address, use the following table to determine the shunts needed for your base address.
Address selection shunts:
Address bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
hunt 0 0 0 0 0 0 E8 E7 E6 E5 E4 E3 E2 E1 0 0
You must install a shunt to match address bit = '0', or remove the shunt to match address bit = '1'. For example, to configure
the board's base address to 0x390 (binary 0000 0011 1001 0000), install shunts E5, E4, E2 and E1.
2.2.2 Interrupts
The board may be configured to interrupt the host computer in response to various alarm and communication events. All of
the board's interrupt requests share a common IRQ line on the PC/104 bus.
If you will be using interrupts, you must install a shunt to select the desired IRQ line. Any interrupt line from IRQ2 to IRQ7
may be selected (be sure to choose an IRQ line that will not conflict with other devices in your system). Do not install any
IRQ shunts if you will not be using interrupts.
518 Instruction Manual 2 Configuration and installation

2.2.3 Thermocouple shunts
Each sensor channel is associated with two shunts which provide a ground-reference and facilitate open-sensor detection for
thermocouples. If a channel is connected to a thermocouple or other floating voltage source then you must install both of its
shunts, otherwise both shunts should be removed.
Thermocouple shunts:
Channel 01234567
hunts E9, E17 E10, E18 E11, E19 E12, E20 E13, E21 E14, E22 E15, E23 E16, E24
2.3 Installation
Before installing or removing the circuit board from the system:
•Remove power from the system.
•Disconnect the board's P1 connector.
To install the board:
•Plug the board into the PC/104 stack and secure it with the included hardware.
•Connect an external field-wiring termination board to connector P1 with a 40-conductor flat ribbon cable.
ensoray recommends the model 7409TB termination board and 7409C cable for this purpose.
•Connect your sensors to the termination board as required. ee ensor connections for details.
518 Instruction Manual 3 Configuration and installation

Chapter 3: Sensor connections
3.1 Connector 1
All sensors connect to the board via connector P1. Optionally,
sensors may be connected to a ensoray model 7409TB screw
termination board, which in turn connects to P1 via ribbon cable.
A 7409TB (or equivalent) is required if you are measuring
thermocouples as it provides an essential temperature transducer
for cold junction compensation.
Each sensor may have as many as five connections to a sensor
channel. H and L are are used for all sensor types; these are
the positive and negative differential sense inputs. Passive
sensors also require connections to the PH/PL excitation
terminals. The GND and HLD pins may be connected to cable
shields.
The following sections explain how to connect sensors when
using a 7409TB termination board.
Pin functions
P1
Signal Na e
7409TB
Legend
Function
Hx V+ Positive analog input for sensor channel x (half of differential pair H/ L).
Lx V- Negative analog input for sensor channel x (half of differential pair H/ L).
PHx I+ Positive excitation output for sensor channel x (half of excitation pair PH/PL).
PLx I- Negative excitation output for sensor channel x (half of excitation pair PH/PL).
GND / HLD Cable shields; power return for cold junction temperature sensor.
+12V +12 VDC power for cold junction temperature sensor (5 mA maximum).
TREF Cold junction temperature sensor output (10 mV/°K).
NC No connect.
3.2 RTDs, thermistors and resistors
RTDs, thermistors and other resistors can be connected using a two-, three- or four-wire circuit. The simplest of these is the
two-wire circuit which, as the name implies, requires only two wires. The V+ and I+ terminals are shorted together, and V-
and I- are shorted together at the 7409TB. This conserves wire but introduces error as a result of the voltage difference (a
“voltage loss”) between the V/I junctions and sensor.
518 Instruction Manual 4 ensor connections
P1 connector pinout

By using three wires, it is possible to reduce voltage loss errors by 50 percent. Instead of shorting V- and I- together at the
7409TB, separate wires can be run from each of these terminals out to the sensor. The wires are then shorted together at the
sensor so that the high impedance V- terminal detects the voltage at the sensor, before losses can occur.
A four-wire circuit will entirely eliminate voltage losses. Like the three-wire circuit, separate wires are run from the V- and
I- terminals to the sensor. In addition, separate wires are run from V+ and I+ to the sensor, where they are shorted together.
Thermistors have much higher resistance than RTDs over most of their operating range. As a result, a two-wire circuit may
be used if your sensor will be operating only at higher resistance values. If it will be operating at lower resistance values, it
is recommended to use a three- or four-wire circuit to prevent significant voltage losses.
It is recommended to use shielded cable for all passive resistive devices. The cable shield must be connected only to the
terminal on the 7409TB; leave it unconnected at the sensor end of the cable.
3.3 Thermocouples and voltage
Thermocouples and DC voltages are connected directly to the V+ and V- terminals. Thermocouples and DC voltage sources
should never be connected to the I+ or I- terminals.
Thermocouple wires are color coded to indicate polarity. The positive thermocouple wire should be connected to the V+
terminal and the negative thermocouple wire should be connected to the V- terminal (the red thermocouple wire is negative
by convention).
518 Instruction Manual 5 ensor connections

Electrical noise may be present on thermocouple and voltage signals. It is not within the scope of this manual to discuss all
treatments of such noise, however, a few simple techniques are available which will solve many noise problems:
1. Inspect the sensor signal with an oscilloscope to confirm that it matches your expectations. “Noise” can often be
the result of an incorrect sensor wiring or other external influences.
2. Install the hardware filter jumper on the offending channel.
3. In the case of thermocouples, try grounding the hot junction. ometimes the thermocouple is not referenced to the
PC/104 return. Noise induced into the thermocouple wire from the environment can elevate common mode voltage
beyond the board input range. Make sure that the ground is referenced to the PC/104 bus ground. In the case of a
DC voltage source, try grounding either the V+ or V- signal (but not both) to limit the common-mode voltage.
3.4 Strain and pressure gauges
Four wires are used to connect a gauge to the measurement system. Two wires supply excitation and the other two wires
convey the gauge output signal. If you have a six-wire gauge, connect its excitation source and sense leads together at the
7409TB I+ and I- terminals. train and pressure gauges should use shielded cable. The shield should be connected only to
the channel terminal on the 7409TB.
3.5 Current loops
The board supports 4-20 mA current loop inputs on any channel when an optional 250-ohm 0.01% resistor is installed as
shown below. These resistors are available as an option for model 518: order ensoray part number 7408R. Note: The
sensor channel must be located at the ground end of the current loop so that common mode voltage will not exceed 5 V.
518 Instruction Manual 6 ensor connections

Chapter 4: Register-level progra ing
Programming of the 518 is achieved via built-in commands. Commands are sent from the PC/104 master (the “host”) to the
518. ome commands cause responses to be sent to the host. This chapter describes the board's register architecture and
explains how the host communicates with the board at the register level.
4.1 rogramming model
The board occupies four consecutive addresses in system I/O space (only the lower two addresses are used). Each address
has a different function for read and write operations.
Registers at the base address are used to exchange commands and data between 518 and host. Commands are sent to the
518 and responses are passed back to the host through the base address. Registers at base address + 1 consist of the read-
only status register and write-only control register.
The base address consists of two hardware registers: command and data. When the host sends a command byte to the 518, it
is storing a byte in the board's command register. When the host reads a reply byte from the 518, it is fetching a byte from
the board's data register.
The status register exposes board status information to the host. The control register is used to invoke soft resets and to
enable and disable host interrupts.
Register map:
Address Read Write
Base + 0 Data register Command register
Base + 1 tatus register Control register
4.2 Status register
The status register provides the host with information used for board status monitoring and communication handshake
control. When the host reads the status register, a byte of the following form is returned:
tatus register:
Bit 76543210
Function CRMT DAV ALARM FAULT x x x x
tatus bits:
CRMT (Command Register eMpTy) indicates the 518 is ready to accept a command byte into its command register.
DAV (Data AVailable) indicates that the 518 data register contains a data byte ready for access by the host.
ALARM Indicates one or more programmed channel limits were exceeded.
FAULT Indicates board reset is in progress. If persistently set to '1', this indicates a board hardware fault. In normal
operation, FAULT is briefly active (less than one-half second) following a board reset. FAULT reflects the state of
the board's red LED fault indicator.
Note: CRMT, DAV, and ALARM status bits are not valid when FAULT = '1'. After resetting the board, the host
should not attempt to execute commands until FAULT bit changes to '0'.
518 Instruction Manual 7 Register-level programming

4.3 Control register
The control register provides the means for host management of interrupts and soft reset.
Control register:
Bit 76543210
Function ET/CLR 0 0 INT/R T 0 ICMD IDAT IALARM
Control bits:
Na e Function
INT/R T pecifies the control function to be performed. When set to logic zero, the board is reset and all other control
register bits are ignored. When set to '1', the other control register bits behave as described below.
ET/CLR pecifies whether selected interrupts are to be enabled or disabled. When set to '1', all selected interrupts are
enabled. When set to '0', selected interrupts are disabled.
ICMD elects CRMT interrupt. When set to logic one, the CRMT interrupt is enabled or disabled as determined by the
state of the ET/CLR bit. When set to logic zero, the CRMT interrupt enable is unchanged. While enabled, the
host will be interrupted whenever the status register CRMT bit is asserted.
IDAT elects DAV interrupt. When set to logic one, the DAV interrupt is enabled or disabled as determined by the state
of the ET/CLR bit. When set to logic zero, the DAV interrupt enable is unchanged. While enabled, the host will
be interrupted whenever the status register DAV bit is asserted.
IALARM elects ALARM interrupt. When set to logic one, the ALARM interrupt is enabled or disabled as determined by
the state of the ET/CLR bit. When set to logic zero, the ALARM interrupt enable is unchanged. While enabled,
the host will be interrupted whenever the status register ALARM bit is asserted.
4.4 Handshaking
If you will not be using ensoray's 518 API (e.g., you are developing for DO , etc.), it is recommended that you create
functions that mask the handshake protocol from higher software layers. The following C language examples show how to
do this. These example functions are used in the command descriptions in later sections of this manual.
4.4.1 Byte handshake
These functions handshake individual bytes to/from the board:
#define CRMT 0x80 // command register empty flag
#define DAV 0x40 // data availa le flag
// Send a yte to the command register
void SendByte(int ase_port, int cmd_ yte)
{
while ((inp( ase_port + 1) & CRMT) == 0); // wait for empty command register
outp( ase_port, cmd_ yte); // send the yte
}
// Fetch a yte from the data register
int ReadByte(int ase_port)
{
while ((inp( ase_port + 1) & DAV) == 0); // wait for full data register
return (inp( ase_port)); // read the yte
}
518 Instruction Manual 8 Register-level programming

4.4.2 Endianness
Unless otherwise specified, multi-byte values are big endian. As a result, functions such as the following can be used to
handshake 16-bit values to/from the board:
// Send a 16- it value to the oard
void SendWord(int ase_port, int cmd_word)
{
SendByte( ase_port, cmd_word >> 8); // send high yte
SendByte( ase_port, cmd_word & 0xFF); // send low yte
}
// Fetch a 16- it value from the oard
int ReadWord(int ase_port)
{
int hiByte = ReadByte( ase_port) << 8; // fetch high yte
return (hiByte | ReadByte( ase_port)); // fetch & concatenate low yte
}
518 Instruction Manual 9 Register-level programming

Chapter 5: Co ands
5.1 Overview
The 518 board is controlled and monitored by sending it commands. Each command consists of at least one byte, but
commands vary in length depending on the size of associated data. In some cases, the board will respond to a command by
sending data back to the host. In such cases, the host must read the response before issuing another command.
5.1.1 Conventions
These conventions are used when specifying commands and responses:
1. CHAN represents a channel number. Valid channel numbers range from 0 through 7.
2. A byte is indicated by a number or expression contained by parenthesis. For example, (16 + CHAN) represents a
byte value equal to 16 plus a channel number.
3. A byte string is a sequence of bytes separated by commas. For example, the byte string (95+CHAN),(5),(0)
contains three bytes sent in order from left to right.
4. A command consists of a byte string sent from host to 518.
5. A response consists of a byte string sent from 518 to host.
The remainder of this chapter discusses the command set. Each command function is described along with its command and
response byte strings.
5.2 Basic operation
5.2.1 DeclareSensorType
This two-byte command configures a channel for a particular sensor type. Typically, it is executed once per channel during
application initialization (i.e., after a reset). Each invocation specifies the sensor type for one channel, so eight invocations
are required to declare all eight channel sensors. No response is issued by the board.
After invoking this function, sensor data will not be available from the channel until the board has been allowed time to
scan all channels.
The first command byte contains the opcode and channel number. The second byte contains a sensor type code (see ensor
specifications for a list of sensor type codes). Declaring a sensor type as “disabled” inhibits scanning of the channel,
resulting in increased throughput for other channels.
Command: (16 + CHAN), ( EN OR_TYPE_CODE)
Response: NONE
Example:
// Configure channel 2 for a K thermocouple
int chan = 2; // Sensor channel 2
int port = 0x2B0; // 518 ase address
SendByte(port, 0x10 + chan); // send DeclareSensorType command and channel num er
SendByte(port, 0x1C); // specify K thermocouple type code
518 Instruction Manual 10 Commands

5.2.2 ReadChannel
This command returns the most recently acquired sensor data from a channel. The returned integer value is scaled
according to the previously declared sensor type. ee ensor specifications for a list of sensor scale factors.
Command: (CHAN)
Response: (HIGH_DATA), (LOW_DATA)
Example:
// Channel 6 is configured for +/- 5 Volt measurement.
// Read and display the voltage measured at channel 6.
int chan = 6;
dou le scalar = 0.0005; // from Sensor specifications (scalar = 500 uV)
SendByte(port, chan); // send ReadChannel command and channel num er
printf(“Channel 6 = %f Volts\n”, ReadWord(port) * scalar);
Example:
// Channel 4 is configured for a type K thermocouple.
// Read and display the temperature measured at channel 4.
SendByte(port, 4);
printf(“Channel 4 = %f degrees C\n”, ReadWord(port) * 0.17);
5.2.3 ReadAllChannels
This command returns the most recently acquired sensor data from all eight channels. ensor data is scaled according to the
previously declared sensor type on each channel. ee ensor specifications for a list of sensor scale factors. In the case of
disabled channels, the returned value is meaningless.
Command: (88)
Response: (CH0 M B), (CH0 L B), (CH1 M B), (CH1 L B), (CH2 M B), (CH2 L B), (CH3 M B), (CH3 L B),
(CH4 M B), (CH4 L B), (CH5 M B), (CH5 L B), (CH6 M B), (CH6 L B), (CH7 M B), (CH7 L B)
Example:
// Read scaled sensor data from all channels into array.
int data[8];
int chan;
SendByte(port, 88); // send ReadAllChannels command
for (chan = 0; chan < 8; chan++)
data[chan] = ReadWord(port);
5.3 Alarm/fault commands
5.3.1 SetOpenValues
This command establishes open-sensor data values for all thermocouple channels (the board will detect open sensor
condition on channels that have thermocouple shunts installed). This is useful for triggering alarms when open sensors are
detected, and for forcing the desired system response to fault conditions in closed-loop process control applications.
The second command byte contains bit flags (one per channel) that specify whether each channel will indicate the minimum
or maximum possible value upon open-sensor detection:
518 Instruction Manual 11 Commands

FLAG byte:
Bit 7 6 5 4 3 2 1 0
Channel 7 6 5 4 3 2 1 0
When an open sensor is detected, a channel's FLAG bit determines the returned data value:
FLAGS bit Channel data
0 0x8000 (-32768)
1 0x7FFF (32767)
Command: (80), (FLAG )
Response: NONE
Example:
// A closed-loop heat controller monitors temperature via a thermocouple
// on channel 1. If the thermocouple opens, the 518 should indicate a high
// temperature to ensure that the heater turns off. This code sets up
// channel 1 to fail high (all other channels will fail low).
SendByte(port, 80); // send first command yte
SendByte(port, 0x02); // send FLAGS yte: (0,0,0,0,0,0,1,0)
5.3.2 SetLimits
This command declares upper and lower alarm limits for a channel. An alarm will “sound” if a channel's sensor data strays
outside of the specified limits.
Alarm limits assume default values when the board is reset. All low limits default to -32768 (0x8000), and high limits
default to 32767 (0x7FFF); these values effectively disable the alarm function. You may specify -32768 to disable the
lower limit and 32767 to disable the upper limit.
When an alarm sounds, the status register ALARM bit is set and the violated limit is reset to its default value, thus
preventing the limit from triggering another alarm. The host must reprogram the violated limit to re-enable it.
Command: (32 + CHAN), (HIGH_LIM_M B), (HIGH_LIM_L B), (LOW_LIM_M B), (LOW_LIM_L B)
Response: NONE
Example:
// Channel 7 is monitoring a K thermocouple that must measure etween 400 and
// 450 degrees C. The following code programs limits so that the ALARM flag will
// e set to '1' if the temperature strays outside the normal operating range.
dou le scalar = 0.17; // K thermocouple scalar (from Sensor specifications ta le)
SendByte(port, 7 + 32) // send SetLimits command and channel num er
SendWord(port, (int)(450.0 / scalar)); // send high limit
SendWord(port, (int)(400.0 / Scalar)); // send low limit
5.3.3 ReadAlarms
This command reports the alarm status of all channels and then resets all channel alarm flags and the ALARM status bit.
The first response byte indicates high alarms and the second byte indicates low alarms. Bit 7 (most significant) through bit
0 (least significant) of each byte corresponds to channel 7 through 0, respectively. A status bit containing '1' indicates a
violated limit; '0' indicates no limit violation.
518 Instruction Manual 12 Commands

Command:(48)
Response: (HIGH ALARM LIMIT FLAG ),(LOW ALARM LIMIT FLAG )
Example:
// Read and display alarms.
int chan, mask, hiflags, loflags;
SendByte(port, 48); // send ReadAlarms command
hiflags = ReadByte(port); // read high alarm flags
loflags = ReadByte(port); // read low alarm flags
for (chan = 0, mask = 1; chan < 8; chan++, mask <<= 1) {
if (hiflags & mask) printf(“Channel %d high alarm\n”, chan);
if (loflags & mask) printf(“Channel %d low alarm\n”, chan);
{
5.4 Gauge commands
5.4.1 SetGaugeZero
This command informs the board that there currently is no load on the channel's load cell. Typically, it is invoked just prior
to a etGauge pan command.
Command: (176 + CHAN)
Response: NONE
Example: ee etting zero and span.
5.4.2 SetGaugeSpan
This command establishes gauge sensitivity. It is typically invoked just after executing a etGaugeZero command. Before
invoking this command you must apply (or simulate) a known load. For best accuracy, apply the maximum rated load; if
this is not possible, apply a significant load. The two data bytes comprise the signed 16-bit integer value expected from a
ReadChannel command at the applied load.
Command: (208 + CHAN), (DATA M B), (DATA L B)
Response: NONE
Example: ee etting zero and span.
5.4.3 TareGauge
This command will tare a strain/pressure gauge channel. Typically, this is used to compensate the weight of a container by
invoking it the container is empty. Before invoking this command, the gauge channel should be calibrated. ee the
etGaugeZero and etGauge pan commands for details.
Command: (112 + CHAN)
Response: NONE
Example:
// An empty truck is to e tared prior to loading. The truck scale
// is monitored y load cell connected to channel 7. Channel 7 has een
// previously cali rated using the SET gauge ZERO and SET gauge SPAN commands.
SendByte(port, 112 + 7); // issue command: (opcode + channel)
518 Instruction Manual 13 Commands

5.4.4 ReadGaugeCalibration
This command returns a strain gauge's calibration. The strain gauge must have been previously calibrated via etGaugeZero
and etGauge pan commands, or by invoking a etGaugeCalibration command.
Command: (128 + CHAN)
Response: ( 0), ( 1), ( 2), ( 3), ( 4), ( 5)
Example:
// Reads a channel's gauge cali ration (into array). The channel must e configured
// for a strain gauge sensor and must e cali rated efore calling this function.
ReadGaugeCal(int port, int chan, unsigned char *array)
{
int i;
SendByte(port, 128 + chan);
for (i = 0; i < 6; i++)
array[i] = ReadByte(port);
}
5.4.5 SetGaugeCalibration
This command activates a predetermined gauge calibration on a channel that has been configured for gauge measurement.
The calibration data must have been previously obtained via a ReadGaugeCalibration command.
Note: A etGaugeCalibration command should not be immediately followed by ReadGaugeCalibration command. The
minimum interval between these commands should be at least 500 milliseconds to ensure proper operation of the
ReadGaugeCalibration command.
Command: (144 + CHAN), ( 0), ( 1), ( 2), ( 3), ( 4), ( 5)
Response: NONE
Example:
// Send a channel's gauge cali ration (in array) to the oard.
// The channel must e configured for a strain gauge sensor.
WriteGaugeCal(int port, int chan, unsigned char *array)
{
int i;
SendByte(port, 144 + chan);
for (i = 0; i < 6; i++)
SendByte(port, array[i]);
}
5.5 Miscellaneous commands
5.5.1 ReadFirmwareVersion
This command returns the firmware version number (times 100).
Command: (240), (5), (0)
Response: (VER _M B), (VER _L B)
Example:
518 Instruction Manual 14 Commands

// Read and display the firmware version.
SendByte(port, 240);
SendByte(port, 5);
SendByte(port, 0);
printf(“Vers %f”, ReadWord(port) / 100.0); // should display something like “Vers 2.25”
5.5.2 ReadBoardTemperature
This command returns the temperature of an optional, external reference sensor (e.g., on a 7409TB termination board),
which is required when thermocouples are being measured. This function can also be used as a debug aid during 518
installation. The returned integer value is scaled to 0.10 °C/bit. If no reference temperature sensor is connected, this
command will return a meaningless value.
Command: (64)
Response: (TEMP_M B), (TEMP_L B)
Example:
// Read and display the reference temperature
SendByte(port, 64); // send ReadBoardTemperature command
printf(“Ref temp = %f degrees C”, ReadWord(port) * 0.1);
5.5.3 ReadModel
This command returns the board's model number.
Command: (240), (4), (0)
Response: (ID_M B), (ID_L B)
Example:
// Read and display the model num er.
SendByte(port, 240); // send ReadModel command
SendByte(port, 4);
SendByte(port, 0);
printf(“Model %d”, ReadWord(port)); // should display “Model 518”
5.5.4 Calibrate
This command calibrates one of the board's three internal standards. To perform a calibration, you must supply two
reference voltages (5 V and 500 mV) and a reference resistance (380 ohms). tandards must be calibrated in the following
order: 5 V, 500 mV, 380 ohms. The board must be reset following each invocation to activate the calibration.
The first command byte specifies the sensor channel that is connected to your external reference. The second byte specifies
the standard to calibrate:
CALCODE Standard to calibrate
0 5 V
1 500 mV
2 400 ohm
A single byte is returned when the calibration has completed; it's value has no meaning.
518 Instruction Manual 15 Commands

Command: (224 + CHAN), (CALCODE), (DATA_M B), (DATA_L B)
Response: (DON’T_CARE)
Example:
// Connect 5V to channel 0, 500mV to channel 1, and 380 ohms to channel 2.
// Enter the actual reference values in the ref[] array:
dou le ref[] = {5.0000, 500.00, 380.00}; // CHANGE AS REQUIRED
int scalar[] = {5000, 50, 40}; // scalars: V, mV, ohms
int sensor[] = {0x15, 0x16, 0x0A}; // sensor type codes
int chan; // channel num er == CALCODE
for (chan = 0; chan < 3; chan++) {
SendByte(port, 16 + chan); // declare channel sensor type
SendByte(port, sensor);
Sleep(500); // wait for valid scan data
SendByte(port, 224 + chan); // issue Cali rate command:
SendByte(port, chan); // CALCODE
SendWord(port, (int)(ref[chan] * scalar[chan])); // cal data
ReadByte(port); // wait for cali rate to complete
outp(port + 1, 0); // reset 518 oard
Sleep(500); // wait for oard to re oot
}
518 Instruction Manual 16 Commands
Other manuals for 518
1
Table of contents
Other Sensoray Recording Equipment manuals