RTC
®
5 PC Interface Board
Rev. 1.9 e
10 Commands And Functions
292
innovators for industry
Example
(C/C
++
)
Querying diverse data types (primary scan head connector, X axis)
a) XY2-100 status word, PowerOK status
UINT statusword, powerOK;
control_command (1, 1, 0x0500); // only applicable for i
DRIVE
®
systems
statusword = (get_value(1) & 0x000FFFF0) >> 4;
powerOK = (statusword & 0x00000080);
b) Serial number (only applicable for i
DRIVE
®
systems)
UINT SN_low, SN_high, SN;
// the serial number’s lower 16 bits are selected for return
// and queried via get_value:
control_command (1, 1, 0x051E);
SN_low = (get_value(1) & 0x000FFFF0)>>4;
// the serial number’s upper 16 bits are selected for return
// and queried via get_value:
control_command (1, 1, 0x051F);
SN_high = (get_value(1) & 0x000FFFF0)>>4;
//Complete serial number:
SN = (SN_high << 16) + SN_low;
c) Actual position (only applicable for i
DRIVE
®
systems)
long real_position;
control_command (1, 1, 0x0501);
real_position = get_value(1);
RTC
®
4
RTC
®
5 essentially unchanged functionality, however:
Even in RTC
®
4 compatibility mode, all returned values are in the RTC
®
5’s 20-bit range, but
get transferred to the PC as 32-bit data. Therefore, you must evaluate the values
accordingly (see above).
Version info
Last change (with version DLL 536, OUT 536): Additional selectable data signals (
Signal
=
).
References
,
Ctrl Command get_value