Setgagecal, 5 setgagecal – Sensoray 118 User Manual
Page 31

Sensoray Model 118 Smart A/D™ Instruction Manual
29
Commands: Pressure/Strain Gage
6.4.5 SetGageCal
Restores calibration parameters to a strain gage channel.
These parameters must have been previously obtained
via execution of the
ReadGageCal
command.
The data byte values that are embedded in this command
string are represented in an internal format that is
meaningful only to the Smart A/D™.
Driver
// Load a channel’s gage calibration parameters from an array.
VOID SetGageCal( USHORT BasePort, UCHAR Channel, SHORT *pArray )
{
SendByte( BasePort, Channel | CMD_SET_GAGECAL );
for ( USHORT parm = 0; parm < 3; parm++ )
SendWord( BasePort, *pArray++ );
}
Example
// Restore gage calibration parameters back onto channel 6.
// Assume that the GetGageCal() function previously stored the gage
// calibration parameters in the GageParms[] array as shown in the
// Read Gage Calibration example.
SetGageCal( MyBasePort, 6, GageParms );
Command: (144 + Chan),(S0),(S1),(S2),(S3),(S4),(S5)
Response:
None