
41
replies in the Command/Reply mode, the receive buffer of the PC or host device must be flushed by continuously
reading data until there is a "time-out". The time-out should be set short enough to avoid the software needing to
wait a long period of time after the data stops arriving.
Misc. Commands:
Upload Sensor ($UH):
$UH[CR] *[CR] Forces device to upload sensor EEPROM of attached sensor, for example after detaching and
reattaching a new sensor. This is quicker than using $RE as it does not disconnect the Ethernet connection.
Note:
Unless “polling” is switched off (see $DP), detaching or reattaching a new sensor will automatically cause the
device to reset and reload data for the new sensor, and will cause a disconnection of the Ethernet or USB connection
to the device. Therefore if “polling is switched on, $UH is not required.
Disable Polling ($DP):
This command enables or disables device polling. When polling is enabled, the device continually checks if the sensor
has been detached, or if a new sensor has been attached. When the device detects a change in status, it
automatically performs a reset in order to load data for the new sensor. When doing so, it also disconnects the
current connection to the Ethernet or USB.
Parameters:
$DP (no parameter) - queries present status, reply: 0=polling on, 1=polling off
$DP 0 - enables polling until next reset
$DP 1 - disables polling until next reset
$DP 2 - enables polling permanently (responds “0”)
$DP 3 - disables polling permanently (responds “1”)
Note:
Factory default is polling enabled; the result of disabling is that if a sensor is swapped over, the software
(firmware and host application) will not be aware of the change and will carry on assuming nothing has happened. If
polling is disabled, the host application will need to take this into account in some way.
BeamTrack Data ($BT):
This command returns data for the Ophir BeamTrack series of sensors which measure Power, Position and Size (PPS).
The data can be returned with a few different formats. For non-PPS sensors, the command returns “?UC”.
The command returns an error code (see details below) and then 3 values for X position, Y position and Size. There
are 3 different modes that are supported, each with a slightly different format to the values returned.
Parameters:
$BT (no parameter): returns “F”, then an error code, then X <value>, Y <value> and S <value> (where S=size), in mm
$BT 1: returns an error code and then X, Y and S data in microns (without the “F”, “X”, “Y”, and “S” as above)
$BT 2: same as no parameter, with more resolution
$BT 3: combination of option 1 and no parameter option
Examples:
$BT (no parameter) -> * F 00040000 X -1.50 Y -0.09 S 33.50
$BT 1 -> * 00040000 -1278 381 33842 [data for
$BT 2 ->* F 00040000 X -1.09833 Y -0.14685 S 37.79891
$BT 3 ->* 00040000 -1998 372 34047 F 00040000 X -2.00 Y 0.37 S 34.05
$BT COMMAND ERROR CODES:
The $BT error code is a bit map where each bit represents some specific error, as below:
Position Codes (bits 0-2 warning, 12-15 error):
0
Warning
0x0000 0001
Position Accuracy Warning (i.e. out of inner circle)
1
Warning
0x0000 0002
Spot Size too large for position measurement
2
Warning
0x0000 0004
Power Low (this might never be used)