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:

  1. 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.
  2. 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: 

Configuration string
"T000600222222333333000000000100>040020303000100100100002500000000000200000000"
Explained:
T (setup sequence)
000600 - Preset P1
222222 - Preset P2
333333 - Preset P3
000000 - Preset P4
000100 - Preset P5
>      - ab=11 (Key locking function), c=1 (analog output reference value: preset P1), d=0 (sign preset P4: positive)
0      - e=0 (sign preset P1 positive), f=0 (sign preset p2 positive), f=0 (sign preset P3 positive)
4      - h=0 (function key-reset locked: not installed), i=1 (preset P5 (presignal) enabled for working-mode-programming: installed), k=0 (preset P4 (count start) enabled for working-mode-programming: not installed), l=0 (repeat counter with output (preset P3): disabled)
0      - m=0 (rpm unit calculation basis: revolutions/s), n=0 (RPM unit not installed), o=0 (RPM unit with output (Preset P2) not installed), p=0 (input switching: PNP)
0      - (position byte?)
2      - input mode in=3
0      - (position byte?)
3      - operating mode op=3
0      - (position byte?)
3      - decimal point input factor (for input Z1)
0      - (position byte?)
0      - decimal point input factor 2 (for input Z2)
0      - (position byte?)
1      - display decimal point (count unit)
0      - (position byte?)
0      - display decimal point (RPM unit)
1      - no parity, 8 bits
0      - baudrate 9600 
01     - unit address
000025 - input factor 1
000000 - input factor 2
000002 - presignal EQ
0000   - one-shot-time
0000   - RPM time basis

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"
  • Preset P4 programming enable: "P4 off"
  • Display deciaml point: "-----.-"
  • Key-reset disable: "kr  on"
  • Serial interface: "96-1n8"

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.

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 "U\r"

Request a position: "Z00H\r

addresscommandvalueend

"Z00"

"H"

- (not used here)

"\r"

will answer with :"@V99+001435@"

headersignvalueend
"@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:

Initialization section
[Producer.desytable1]
RESET_P1_TO_ACTUAL_POSITION = 1
DEBUG_VERBOSITY_LEVEL = 0
MM_TO_BINS = 10 #conversion factor from 1mm to bins. 10 by default. Do not change unless you know what you are doing!
TCP_PORT = 8000
IP_ADDRESS = 192.168.1.66

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

example configuration block
[Producer.desytable1]
EUDAQ_DC="dc2,dc3,bxidColl1"
CHECK_STABILITY_SECONDS = 3 # how long to wait for the stable position. If waiting is not desired, put a negative number.
POSITION_READ_INTERVAL_SECONDS = 10 #how often will be the position checked during data taking.

#mm has a priority
HORIZONTAL_POSITION_MM = 60.2
VERTICAL_POSITION_MM = 60.0
#HORIZONTAL_POSITION_RAW = 602
#VERTICAL_POSITION_RAW = 600


# In order to approach the position from a specific direction, a relative approach
# start position can be set, as a relative position from the desired end position
# mm has a priority.

#HORIZONTAL_APROACH_RELATIVE_POSITION_MM = -40.0
#VERTICAL_APROACH_RELATIVE_POSITION_MM = -40.0
#HORIZONTAL_APROACH_RELATIVE_POSITION_RAW = -400
#VERTICAL_APROACH_RELATIVE_POSITION_RAW = -400

HORIZONTAL_SLOW_LENGTH_MM = 20.0 #region from destination where the stage travels slowly
VERTICAL_SLOW_LENGTH_MM = 10.0 #region from destination where the stage travels slowly
#HORIZONTAL_SLOW_LENGTH_RAW = 200
#VERTICAL_SLOW_LENGTH_RAW = 100

Once the configuration is invoked, the producer will:

  1. sets the preset P5 (+- range where the stage travels slowly)
  2. if approach relative position is configured (and position is set as well):
    1. moves to the position <POSITION> + <APROACH_RELATIVE_POSITION>, both directions
    2. waits for stable position
  3. if configured to do so: move the stage to to <POSITION>, both directions 
  4. 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").

  • No labels