The setrefs command sends the SET REFERENCES message to the unit and parses the response.
The set references command initiates the reference setting either with parameter PLATE = 0 or ROAD = 1.
Example 1
Set references with parameter PLATE (0). The status info bits indicate that the input voltage is low. However, this condition does not prevent the reference setting.
-
In the response to setrefs, the success is 1, which means that reference setting was started successfully.
The status request after sending the setrefs command confirms that the reference setting is ongoing.
The last status request, which is sent after about 30 seconds, confirms that the reference setting is ready.
/> getunitstatus
/> Unit ID: 1, Client ID: 0, ID: 0x12, Nb: 22, Len: 10, icd_version: D, Err: 0
Status info: 0x00000020, Error bits: 0x00000000
/> setrefs 0
/> Unit ID: 1, Client ID: 0, ID: 0x30, Nb: 23, Len: 11, icd_version: D, Err: 0
Success: 1, Status info: 0x00000020, Error bits: 0x00000000
/> getunitstatus
/> Unit ID: 1, Client ID: 0, ID: 0x12, Nb: 24, Len: 10, icd_version: D, Err: 0
Status info: 0x00000022, Error bits: 0x00000000
/> getunitstatus
/> Unit ID: 1, Client ID: 0, ID: 0x12, Nb: 25, Len: 10, icd_version: D, Err: 0
Status info: 0x00000020, Error bits: 0x00000000
Example 2
Set references fails if a reference setting is already ongoing. An attempt to restart the reference setting does not interfere with the ongoing reference setting.
/> setrefs 1
/> Unit ID: 1, Client ID: 0, ID: 0x30, Nb: 27, Len: 11, icd_version: D, Err: 0
Success: 1, Status info: 0x00000000, Error bits: 0x00000000
/> setrefs 1
/> Unit ID: 1, Client ID: 0, ID: 0x30, Nb: 28, Len: 11, icd_version: D, Err: 0
Success: 0, Status info: 0x00000002, Error bits: 0x00000000
/> getunitstatus
/> Unit ID: 1, Client ID: 0, ID: 0x12, Nb: 29, Len: 10, icd_version: D, Err: 0
Status info: 0x00000002, Error bits: 0x00000000