Calibrate 518 – Sensoray 518 User Manual

Page 37

Advertising
background image

36

Calibrate 518

This command calibrates coprocessor internal standards. All measurements made by the
coprocessor are referenced to these standards. To perform a board calibration, you must supply
two reference voltages (5 volts and 500 millivolts) and a reference resistance (380 ohms).

References must be calibrated in the following order: 5 volts, 500 mV, 380 ohms.

select codes for the Calibrate command

COMMAND: (224 + CHAN), (CAL_CODE),(CAL_DATA_MSB), (CAL_DATA_LSB)
RESPONSE: (DON’T_CARE)

Example: This code fragment will assist you in calibrating the 518.

FOR calCode% = 0 TO 2

SELECT CASE calCode%
CASE 0:refName$ = “5 volt”:scalar% = 5000: sensorCode% = 0
CASE 1: refName$ = “500 mV”: scalar% = 50: sensorCode% = 13
CASE 2: refName$ = “380 ohm”:scalar% = 40: sensorCode% = 9
END SELECT

INPUT “What channel is “; refName$; “ reference connected to”; chan%

CALL Send518Byte (16 + chan%) ‘declare channel sensor type
CALL Send518Byte (sensorCode%)

INPUT “What is exact value of “; refName$; “ reference”; actualValue!

CALL Send518Byte (224 + chan%) ‘issue Calibrate command
CALL Send518Byte (calCode%) ‘issue Calibrate command
CALL Send518Byte (actualValue% * scalar%) ‘issue Calibrate command

junk% = Read518Byte% ‘wait for 518 to calibrate

OUT BasePort% + 1, 0 ‘reset 518 board

NEXT calCode%

CAL_CODE

FUNCTION

0

5 volt range

1

500 millivolt range

2

400 ohm range

Advertising