Sensoray Smart A/D User Manual

Page 18

Advertising
background image

S

ENSORAY

I

NSTRUCTION

M

ANUAL

S

MART

A/D D

RIVER

FOR

W

INDOWS

Page 16

Example:

///////////////////////////////////////////////////////////////////////////

// Complete the physical gauge calibration on board 3, channel 5, that

// began in the previous example.

// Assumes: (1) channel 5 is configured for a strain/pressure gauge, and

// (2) the sensor on channel 5 has 3,000 pounds of additional

// load since calling SetGageZero(), and

// (3) a resolution of 0.5 pounds is desired.

///////////////////////////////////////////////////////////////////////////

#define FULLLOAD 3000 // Applied load when SetGageSpan() is called.

#define RESOLUTION 0.5 // Desired resolution, in pounds.

SetGageSpan( 3, 5, FULLLOAD / RESOLUTION );

3.9.3 SetGageTare()

Function:

Tares the gauge on the specified channel. Taring is accomplished by adjusting the data offset so that sensor data
returned by GetSensorData() will equal zero at the current load condition..

Prototype:

void SetGageTare( long hBD, long channel );

Example:

///////////////////////////////////////////////////////

// Tare the gauge on board number 1, channel 7.

///////////////////////////////////////////////////////

SetGageTare( 1, 7 );

3.9.4 GetGageCal()

Function:

Returns the calibration parameters from a previously calibrated gauge. The returned values can be used by the
SetGageCal()

function to restore a gauge calibration without having to perform a physical calibration.

Note: The returned values are represented in a proprietary form that is used internally by the Smart A/D™; they
should not be construed as having any relationship to published gauge parameters, such as a mV/V or offset rating.

Prototype:

void GetGageCal( long hBD, double channel, double *gain, short *offset );

Example:

///////////////////////////////////////////////////////////////////////////

// Fetch gauge calibration parameters from board number 0, channel 2.

// Assumed: (1) Channel 2 has been configured for strain/pressure gauge.

// (2) Channel 2 previously calibrated either physically, or by

// means of the SetGageCal() function.

///////////////////////////////////////////////////////////////////////////

double gain2; // Gain parameter will be stored here.

short offset2; // Offset parameter will be stored here.

GetGageCal( 0, 2, &gain2, &offset2 );

Parameter

Type

Description

hBD

long

Board handle.

channel

long

Sensor channel number to be affected.

Parameter

Type

Description

hBD

long

Board handle.

channel

long

Sensor channel number to be affected.

gain

double*

Pointer to a double that will receive the gauge “gain” parameter.

offset

short*

Pointer to a short that will receive the gauge “offset” parameter.

Advertising