beautypg.com

Sensoray 518 User Manual

Page 29

background image

28

Read Gage Calibration

This command returns the internal slope and offset from a strain gage channel. The response
string is six bytes long. The first four response bytes contain the gage slope, encoded in the
floating point format used internally by the coprocessor. The last two response bytes contain the
lumped gage offset, represented as a 2’s complement integer. This lumped gage offset consists of
the present tare offset combined with bridge and coprocessor circuit offsets.

In order for the response string to have valid meaning, the strain gage must already have been
calibrated. This prior calibration may be accomplished in either of two ways: using the Set Gage
Zero and Set Gage Span commands, or using the Set Gage Calibration command.

COMMAND: (128 + CHAN)
RESPONSE: (S0), (S1), (S2), (S3), (S4), (S5)

EXAMPLE:

‘ This subprogram reads a channels gage parameters into a linear array. |
‘ The channel must be configured for a strain gage sensor, and should be |
‘ calibrated before calling this procedure. |

SUB ReadGageParameters (BasePort%, Channel%, ParmArray%())

CALL Send518byte (BasePort%, 128 + Channel%) ‘send opcode to 518

FOR Parm% = 0 TO 5 ‘read 6 parameter bytes from 518
ParmArray%(Parm%) = Read518byte (BasePort%)
NEXT Parm%

END SUB