This manual section applies to the TTL_REPORT firmware module. Including this module in the firmware allows for precisely synchronized encoder position reporting. The user’s hardware supplies a TTL trigger to the MS2000 (or RM2000) that causes a processor interrupt which performs an encoder-read operation on all of the controller’s axes. The TTL IN0 interrupt must be turned on using the serial command TTL X=6 prior to sending the read command pulses to the external TTL input.
Item | Symbol | Spec. Values | Unit | |
---|---|---|---|---|
Min | Max | |||
Initial Read Delay | td | 3.0 | 10.0 | μs |
Successive Axis Read Delay | ta | 11 | 13 | μs |
Serial Transmit Delay | ts | 110 | 500 | μs |
Transmit Time† | tt | 1.2 | 1.75 | ms |
External re-trigger time† | text | 1.7 | ms |
(†) 115200 baud, three axes
The encoder read operations follows the external trigger input as indicated in the timing diagram. The largest jitter component comes from the delay in executing the interrupt service routine that performs the read operations. Most of the time the interrupt proceeds with the minimum delay time specified. Occasionally, the reads are delayed until current data bus operations complete.
The encoder position data is transmitted using the auxiliary serial port on the MS2000WK controller. The data baud rate for this port is set to be identical to the main serial communications port and is selected with DIP Switches 4 and 5. The Serial Out port on the MS2000 controller should be configured with a straight-through female-to female RS-232 cable to communicate with a PC.
Binary data is sent in the following form (here illustrated for a three-axis system):
AID | LSB | MB | MSB | HB | AID | LSB | MB | MSB | HB | AID | LSB | MB | MSB | HB | CR |
The axis identifier AID is the Low Level Format axis identifier string. The next four bytes represent the 32-bit encoder position value for the axis. This is a signed long integer value, low-byte first, high-byte last. This pattern is repeated for all of the axes that are present in the controller. A final terminating <CR> character (hex 0x0D) completes the data stream.
The usual axis identifiers are as follows:
Axis | Decimal value | Hex |
---|---|---|
X | 24 | 0x18 |
Y | 25 | 0x19 |
Z | 26 | 0x1A |
F | 27 | 0x1B |
Other output configurations are possible. Data can be sent to the usual Serial IN port, and/or the data can be sent in ASCII form. Contact ASI for details.
An error condition will exist if the TTL triggers occur more quickly than the data can be sent out the serial port. When this condition is detected the error “87” (TTL_REPORT_BUFFER_OVERRUN) is appended to the internal error log buffer. If TTL triggers are present as the controller is powering up, some of these errors are to be expected.