beautypg.com

Calibrate – Sensoray 417 User Manual

Page 27

background image

Instruction Manual

26

Calibrate

This command calibrates one of the coprocessor’s internal standards. You must supply two stable
references, 5V and 500mV, which are applied to external channels during board calibration. Exter-
nal channels used for the calibration must be properly configured and allowed to settle before issu-
ing the calibrate command. A board reset must be invoked after each range is calibrated.

COMMAND: (192 + Chan), (RangeCode), (CalData MSB), (CalData LSB)

RESPONSE:

(IgnoreThisValue)

VB Code Example:

‘*********************************************************************

‘ Calibrate one voltage range on a Model 417 board.

‘*********************************************************************

Sub CalRange(BasePort%, Chan%, RangeCode%, AppliedVolts!)

Dim TypeCode

As Integer

Dim Scalar

As Single

Dim Junk

As Integer

Select Case RangeCode

CASE 0: Scalar = 5000:

TypeCode = &H15

CASE 1: Scalar = 50000:

TypeCode = &H16

End Select

Call SetSensorType(BasePort, Chan, TypeCode)

Call Delay(900)

Call SendByte(192 + Chan)

‘Issue Calibrate command to 417

Call SendByte(RangeCode)

Call SendByte(AppliedVolts * Scalar)

Junk = ReadByte(BasePort)

‘Wait for 417 to calibrate

Call OUT(BasePort + 1, 0)

‘Reset the 417 board

Do: Loop While (INP(BasePort + 1) And FAULT)

End Sub

‘*********************************************************************

‘ Calibrate a Model 417 board. This snippet assumes 5.0000V is

‘ applied to channel 3 and 0.50000V is applied to channel 7.

‘*********************************************************************

Call CalRange(BaseAdrs, 3, 0, 5.0000)

‘Calibrate 5V range

Call CalRange(BaseAdrs, 7, 1, 0.50000)

‘Calibrate 500mV range

Table 10: Range codes for the Calibrate command

RangeCode

Range

0

5 V

1

500 mV