Sensoray 2600 User Manual
Page 49

Sensoray 2600 Programming Guide
45
Gateway Action Scheduling
middleware has been closed and reopened, this function can be called to restore the calibration values. In many
applications, it is useful to store and retrieve the calibration values from the 2412’s internal EEPROM by calling
S26_2612_SaveCalibrations()
and
S26_2612_RestoreCalibrations()
.
Note that this function performs its action when called, unlike many other middlware functions that simply
schedule future actions.
Example:
// Set all calibration values on the 2612 at MM number 0, IOM port 10, channel 2.
S26_2612_SetCalibrations( 0, 10, 2, Offset, Scale, Tare );
7.6.15 S26_2612_SaveCalibrations()
Saves one channel’s calibration values to internal EEPROM on model 2612 IOM.
Prototype:
u32 S26_2612_SaveCalibrations( u32 hbd, IOMPORT IomPort, u32 msec, u8 chan );
Returns:
Error code as described in section 5.5. Zero is returned if the operation was successful.
Benchmark: 12 ms.
Notes:
This function copies the calibration values from internal middleware buffers to the 2612 module’s EEPROM.
Later, the values can be retrieved from the module’s EEPROM by calling
S26_2612_RestoreCalibrations()
.
Note that this function performs its action when called, unlike many other middlware functions that simply
schedule future actions.
Example:
// Save calibrations on the 2612 at MM number 0, IOM port 10, channel 2.
S26_2612_SaveCalibrations( 0, 10, 1000, 2 );
7.6.16 S26_2612_RestoreCalibrations()
Restores one channel’s calibration values from a 2612 IOM’s EEPROM.
Prototype:
u32 S26_2612_RestoreCalibrations( u32 hbd, IOMPORT IomPort, u32 msec, u8 chan );
Returns:
Error code as described in section 5.5. Zero is returned if the operation was successful.
Benchmark: 7 ms.
Notes:
This function copies the calibration values from the 2612 module’s EEPROM to internal middleware buffers, thus
activating the new calibration values. It is assumed that
S26_2612_SaveCalibrations()
was previously called to
store the calibration values in the EEPROM.
Note that this function performs its action when called, unlike many other middlware functions that simply
schedule future actions.
Parameter
Type
Description
hbd
u32
MM handle.
IomPort
u8
The IOM port number (on the MM) to which the target IOM is connected.
msec
u32
Maximum time to wait for the gateway response packet, in milliseconds, before declaring a
time-out.
chan
u8
The channel number that is to be registered. Legal values range from 0 to 3.
Parameter
Type
Description
hbd
u32
MM handle.
IomPort
u8
The IOM port number (on the MM) to which the target IOM is connected.
msec
u32
Maximum time to wait for the gateway response packet, in milliseconds, before declaring a
time-out.
chan
u8
The channel number that is to be registered. Legal values range from 0 to 3.