Table of Content
The "DESY table" is a remote-operated moving platform, which is a standart infrastructure at the DESY testbeam. Apart from the button-based remote controllers, there exist 2 special remote controllers, that can be operated via a serial port
Hardware
CCU2100 counter
The full manual: English: Graef-CCU2100-Manual-eng-de-reduced.pdf, german:CCU2100_de.pdf
The control counter CCU2100 has a "TTY 20 mA schnitstelle" current loop interface. The communication protocol is UART: 9600 baud, 8 bits, no parity bit, 1 stop bit.
The pinout of Canon-25 connector on the counter (backside):
- pin 10: TX+ (green wire)
- pin 13: RX+ (yellow wire)
- pin 14: RX- (brown wire)
- pin 19: TX- (white wire)
- pin 16: GND (blue wire)
- pin 17: 24V output (red wire)
There are 2 possibilities to interface the counter:
- RS-232 ↔ 20 mA TTY cable, which is available at the testbeam. Beware, that this interface requires true RS-232 interface with high voltage span. TTL version will not work.
- 20mA TTY ↔ Ethernet TCP server
In order to operate the counter remotely, the P1 has to be equal to C1.
Beware! Some DESY stages dont work with the CCU2100, because the stage steers to the opposite direction. Always check (with buttons), that the counter steers to the correct direction.
Defining center (0,0) howto:
The procedure is described in the PDF manual. In short:
- Move the table to the desired position
- Clear the C1 (push bottom two buttons together)
- Repeat for the second counter
Internal configuration of CCU2100:
Configuration string:
Subset of configuration:
- Installation count unit/RPM unit: " coun"
- Input mode: "in 3"
- Operating mode "oP 4"
- Decade factor F1: 0.025
- Analog output reference: "P5 on"
- Presignal EQ: " 0.2" (needs to be typically 1.1 for the horizontal stage, as it has much bigger momentum and 0.2 could cause oscillation of the positions)
- Preset P4 programming enable: "P4 off"
- Display deciaml point: "-----.-"
- Key-reset disable: "kr on"
- Serial interface: "96-1n8"
How to change the EQ
- put 99 in the P1
- press right arrow for 1 second
- keep pressing the righ arrow until "e9" setting will appear
- adjust the value (up/down arrows)
Configuration
Ethernet TCP server
Industrial Ethernet ↔ 20mA current loop server is used (https://www.wut.de/e-58664-ww-daus-000.php )
Power: either using banana cables (shown on the picture), 24 V (specs says 12V-48V) or PoE (not tested)
The server should answer to a ping on address 192.168.1.66. The default TCP communication port is 8000
This server is connected to the counter via special cable, which connects to the counter with the CAN25 (bigger connector) connector and CAN9 (smaller connector) connects to the server:
CAN9 pinout uses "TX and Rx loop active" mode (details in the manual in section 5.4: 20mA/TTY interface):
- pin 1: yellow
- pin 2: brown
- pins 3 and 4 are shorted
- pin 5: unused
- pin 6: green
- pin 7: white
- pins 8 and 9 are shorted
Communication
The protocol is described in the German and English manuals to the CCU2200. Since there are 2 devices listening on the current loop chain, the counter needs to be addressed. The addresses are 0 and 1. Command is actually a human-readable ASCII strings.
Raw examples
The protocol is defined in the manual and it is really followed
Set a position: "Z00B+001435\r", which needs to be followed by a takeover command "Z00U\r" (see below). There is no answer to this command. Explanation of different parts of the "set position" command:
address | command | value | end |
---|---|---|---|
"Z00" | "B" | +001435 | "\r" |
- Z00 - address of the remote control. There are two addresses: Z00 and Z01.
- B - the command to set the P1 preset
- +001435 - the position, can be positive or negative number. +001435 corresponds to 143.5 mm
- \r - end of the line (carriage return)
Takover command: "Z00U\r". needs to be after all the necessary values have been set. That practically means after the set position command
- "Z00U\r" - The remote control on address 00 will apply the previously preset values (and will start to move)
Request a position: "Z00H\r" requests the actual position of the stage
address | command | value | end |
---|---|---|---|
"Z00" | "H" | - (not used here) | "\r" |
will answer with 12 characters in following format:"@V99+001435@"
header | sign | value | end |
---|---|---|---|
"@V99" | "+" | "001435" | "@" |
EUDAQ operation
The code was developed in https://github.com/jkvas/eudaq/tree/calice_ahcal_testbeam2018May branch, folder user/desytable.
Initialization
The initialization step is required. The initialization section:
During the initialization the producer opens the TCP connection to the TTY server and locks it in order to prevent from other user interfering with the setup. The TTY server allows only single connection.
If RESET_P1_TO_ACTUAL_POSITION option is set, the P1 will be set to the actual C1 value. This will allow to switch to the remote operation of the stage controller using a manual switch. If P1 != C1, controller will not enter the remote mode.
Configuration
Once the configuration is invoked, the producer will:
- sets the preset P5 (+- range where the stage travels slowly)
- if approach relative position is configured (and position is set as well):
- moves to the position <POSITION> + <APROACH_RELATIVE_POSITION>, both directions
- waits for stable position
- if configured to do so: move the stage to to <POSITION>, both directions
- wait for stable position
During the run
There is no operation of the stage during running (between start and stop). The only exception is remaining movement when the CHECK_STABILITY_SECONDS is set to negative number (it will not wait during the configuration process).
Events with the position as tags (POS_H_MM, POS_V_MM) are periodically generated (eudaq raw event "DesyTableRaw").