Table of Contents
Synchronous Encoder Reporting
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 motorized axes. In the distant past (probably before 2013) it was required to set the TTL mode to 6 to use this feature, but more recently any firmware build that includes the TTL_REPORT
firmware module is not capable of doing any other TTL input features but only will perform the functionality of the TTL_REPORT
module.
Timing Specifications
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.
Data Transmission
The encoder position data is transmitted using the auxiliary serial port on the MS2000 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.
Error Conditions
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.
With piezos
Piezos do not have encoders to read. Prior to June 2024 firmware will report the target piezo position. Starting June 2024 the firmware reads the piezo's sensor voltage, however note that this is intrinsically a noisy signal which is closely related to the position but not as accurate as an actual encoder. This is being actively worked on by ASI; please contact us for details.