35
Appendix F – Programmer’s Reference
Polling the A-1519 and A-1520 Targets
The A-1519/A-1520 Targets do not transmit data until the Host Computer/Application transmits a polling
request to each target that it needs to read. The polling request command consists of a Single Byte Code,
equal to the Target Network ID.
For example:
To request a Data Packet from an A-1519 Target set to Target Network ID = 64, the host
Application must transmit an ASCII 64 (40 hex).
Polling interval by target data connection type:
•
Wireless targets (ISM or ZigBee radio, 900 MHz and 2.4 GHz): 160 milliseconds or greater
•
Cabled targets (RS-485 network): 70 milliseconds or greater.
Note:
The polling rate for scanning lasers (time interval between successive requests for data from the
same target) should be greater than or equal to the scan rate. For most Hamar Laser scanning lasers,
the recommended polling rate is 4 times/second (250 milliseconds interval). Polling the same target at a
rate faster than the laser scan rate is pointless because the target will not reply with a new data packet
until the position has been refreshed by a new laser scan.
Standard procedure for polling a target:
a)
Initialize the Active COM Port with the following Settings:
•
19200 baud
•
No Parity
•
8-bit word
•
1 Stop Bit
b)
Transmit the Single Byte Request Code = Target Network ID of the target that is being polled.
c)
Set a timeout: Wait a minimum of 60 ms for a reply. Radio I/O may require up to 160 ms.
d)
Process Data in the Input Buffer: Validate Checksum, Parse Data Packet, etc.
e)
Check Validity of Device Type, Operational Status Code, on-target status, etc.
f)
If polling another target, go to
Step a
.
g)
If polling the same target, wait until the polling interval has elapsed since
Step a
was executed, then
go to
Step a
.