Stepper Motor Systems for FAIR

S-FRS

Requirements known

  • no WR timing required for moving motors
  • only one of all S-FRS stepper motor systems is able to drive across the center position
  • some sort of machine protection required, some detectors should not be destroyed by accident since they will not be accessible during beamtime
  • later: WR timing receiver for timestamp acquisition

Misc

  • 2021: Aufbau eines Systems lokal @GSI zur Inbetriebnahme der Motoren aus Inkind-Lieferungen
  • 2023: very first configuration on-site for very first tests

TODO Status
2 M-Boxen aus Lager choice-yes 01/2021
DHCP-Einträge für MicroIOCs und X-Ports choice-yes 05/2023
Hostnamen für MicroIOCs und X-Ports (fel9020-fel9032) choice-yes 05/2023
Nomenklaturen für MicroIOCs TODO
CPLD Firmware-Update (auf Version 10)? choice-yes 07/2023
SSI/PDC Firmware-Update (auf Version 2.2)? choice-yes 07/2023
PMAC (Version 21)? choice-yes 07/2023
Einrichtung M-Boxen zur Inbetriebnahme (Betriebssystem, Schrittmotor-Treiber-Software) TODO, s. script sfrs.sh
Konfiguration und Rollout von FESA Software auf System, das in GSI verbleibt (Stand 2021) choice-yes 07/2023
Connection to PDCs choice-yes 07/2023
Motor configuration (single motor) with Local Control GUI for a Y-Slit System in Testing-Halle (choice-yes 07/2023)
Motor configuration with Local Control GUI for a Y-Slit System in Testing-Halle (choice-no 08/2023)
Motor names in FESA software configuration / database update / environment check (INT) choice-yes 09/2023
Motor names in LSA database for very first DeviceControl tests (Status, Motor Move/Stop) choice-yes 10/2023
   
   

  • zunächst eingesetzt: PDC aus Testturm von SD
  • keine WR FTRN notwendig, lange Schließ- und Öffnungszeiten (2-3 Minuten)
  • später: Aufbau eines zweiten Systems in Groningen (?) mit Motor-Einstellungen von System @GSI -> Stand-Alone System mit USB Boot Stick Lösung
  • gewünscht für System, daß in GSI verbleibt: Überwachung von Sollpositionen
  • vorläufig, da keine andere Möglichkeit zur Zeit: Accelerator: SIS100, AcceleratorZone: SIS100_RING fuer FESA/LSA DB in INT-Umgebung


TODO

https://www-acc.gsi.de/wiki/Frontend/MicroIOCInfos#Checkliste_f_252r_Inbetriebnahme_und_Konfiguration_von_neuen_MicroIOCs

Status Check

matthies@asl745 workspaceMotionControl $
./status_sfrs.sh

Network Setup
matthies@asl745 workspaceMotionControl $
./sfrs.sh

Cookbook: commissioning a Stepper Motor System
Hardware
  • provide MicroIOC /PDC/suitable cables/interlock-pins to bridge interlock output
  • connect MicroIOC to accelerator network
  • connect suitable motors appropriately to PDC
  • provide suitable cable connections between MicroIOC and PDC (RS485 SSI, ADC, RS232, Axis)
  • reboot

Software
  • provide MicroIOC setup for accelerator network (NFSinit, SW setup)
  • find out which limits (high,low) are possible/desired (is there a manual? what does the mechanical construction allow? where is the center supposed to be?)
  • check software for each motor configuration with LocalControl GUI
  • adapt mount orientation/installation orientation/encoder type/existing PDC connections/potentiometer length/motor counts/high,low limits+offsets/SSI code sense/drive direction/pulse width/pulse polarity/velocity/acceleration time/position average/offset/position factor/position tolerance/SSI resolution/reference voltage tolerance
  • test motor/pair move via FESA Explorer
  • control system test preparation:
    • provide FESA configuration for integration database
    • request LSA database import (integration) by ACO-APP

First Steps / Tests
  • switch on PDC / MicroIOC
  • check connection to MicroIOC using LocalControl once it is fully up
  • check end switches by holding them manually for each motor (inner/outer) to check whether cables are connected properly
  • move each connected motor a little to check drive directions
  • adjust high/low limits approximately according to specification (mounting orientation, drive direction, potentiometer length, steps per millimeter, ...)
  • move motors slowly into end positions, Motor Configuration > Motor X > More... > "Copy to high/low limit" > these are the actual end positions
    • define center position similarly
  • make a backup of /common/fesadata/data//slits-conf/properties.ini
Commissioning: trying to find the outer limits "automagically"
  • software configuration: switch encoder type to PMAC mode
  • use homing procedure
  • copy found positions to limit settings (manually)
  • switch back to proper mode
  • not necessarily recommended because initial motor positions are unknown

Troubleshooting
  • Y-Slit System
    • motors move only in one direction with a certain cable
      • check cable / pins / documentation / cable connection on controller side (S-FRS: media board)
    • commissioning: movement without connected blocks: one motor slides over the zero position (center), holders might collide with a bang
    • motor suddenly stops during a (long) move
      • compare PMAC position to actual position, adjust motor configuration if need be
    • test system with manual controller (FRS) and use inverter cable (adapter) if need be
  • X-Slit System
    • compare to Y-Slit system if no other cable is available
    • test system with manual controller (FRS) and use inverter cable (adapter) if need be

What else to consider

  • machine protection during commissioning with beam, protect devices like detectors further along the beamline depending on interlock/error states of devices before them or even before an interlock is set if possible

Stepper Motor System Error States

Stepper motor systems indicate errors when either inner or outer limits are reached. The end positions are usually detected via hardware switches. Software set end positions are configurable. Collisions are to be avoided.
What is in the center position? positioned @outer limits positioned @inner limits
with beam without beam with beam without beam
blocks might mean all is opened, beam might damage devices further in the beam line -> error state = OK - might mean all is closed, beam might not damage devices further in the beam line -> error state = NOK -
things like grids etc. might mean devices are NOT at desired location -> error state = NOK - might mean devices are at desired location -> error state = OK -
         
         

First Tests @ Testinghalle

MicroIOC: tstci17 (INT, vorlaeufig: SIS100/SIS100_RING)
  FMF1DK1 (X-Slit) Y-Slit 1 Y-Slit 2 Accelerator AcceleratorZone
motor1_tstci17 1 - - SIS100 SIS100_RING
motor2_tstci17 2 - - SIS100 SIS100_RING
slit1_tstci17 1+2 - - SIS100 SIS100_RING
motor3_tstci17 - 1 1 SIS100 SIS100_RING
motor4_tstci17 - 2 2 SIS100 SIS100_RING
slit2_tstci17 - 1+2   SIS100 SIS100_RING

Y-Slit System Test: Potential Error Situations

It is easy to misconfigure a stepper motor system. The results are unexpected behaviour and weird error messages.

Tested on 23.08.2023 with Motor 2 of a Y-Slit-System (-1047).

Software Misconfiguration

Parameter Comment Expectation Possible Values / unit OK Setting NOK Setting
Motor name descriptive no functional effect ... - -
Mount orientation descriptive no functional effect right/up; left/down - -
Installation orientation descriptive no functional effect horizontal; vertical - -
Encoder type     potentiometer; pmac; ssi potentiometer pmac: OK
ssi: pmac position does not match actual position, actual position does not change
Existing PDC connections     potentiometer; ssi; both both ssi: motors not steerable (also: no appropriate cable connection for this setting)
Potentiometer length     mm 100 50: actual position corresponds to half of the potentiometer current
200: actual position corresponds to double of the potentiometer current
Motor counts / mm     counts/mm 200 100: motor speed is lower
400: motor speed is faster
HW limits     enabled; disabled enabled disabled: hardware end switches don't respond and won't stop a moving motor
High/Low limit     mm 0.5/-100 both motor limits have to be correct - otherwise the motor moves only in one direction
High/Low limit offset     mm 0.5 -
SSI code sense     clockwise; anticlockwise clockwise anticlockwise: OK; setting does not matter in this case
Drive direction     clockwise; anticlockwise anticlockwise clockwise: NOK; motor changes direction
Pulse width     usec 5.9 1 usec: motor speed is low
12/24/240: no visible change, setting is adjusted automatically if too high
Pulse polarity     positive; negative negative positive: wrong drive direction, corresponding end switches won't respond
Velocity     mm/sec 3 1: slow speed
5: fast speed
Acceleration time     s 0.2 2: motor starts moving noticeably slower
Position average     sample 1 -
Offset     mm -1.44 adjusts actual position
Position factor     - 1 -
Position tolerance allowed tolerance between set and actual position   mm 0.5 0.1: A warning is issued if actual position differs to much from set position. Precise set position is often reached at second attempt only.
Enabled activate a motor allows to enable/disable motors true/false true false: motor can not be driven

Hardware Misconfiguration

Hardware Comment Expectation OK NOK
potentiometer pins not properly connected   actual positions does not match motor 2 motor 1, corrected on 30.08.2023
motor cables not connected to media board   pmac comm error
potentiometer comm error
pmac comm error
potentiometer comm error
 
cables not connected between MBOX and PDC: axis        
cables not connected between MBOX and PDC: pmac   potentiometer comm error potentiometer comm error  
cables not connected between MBOX and PDC: motor   pmac comm error
potentiometer comm error
   
cable of motor 3 connected to motor 2 limits/directions etc don't match actual positions and drive direction not matching    
cable of motor 4 connected to motor 1 limits/directions etc don't match actual positions and drive direction not matching    
plugs connected in the wrong way on media board limits/directions etc don't match end switches not working, nothing reliably functioning    
         


Motor Pairs (Slits)

Two coupled motors, may be driven by setting a center position and/or a gap.

Note:
  • amplifier fault can be issued after a reboot of the MicroIOC when motors are coupled and the motor positions don't match the range
  • a pair of motors can't be moved if the center and the width don't match the possible range of the motors (no visible error!)
  • a motor, which is part of a pair, can be moved independently; though its new position may have an effect on the next move of the pair
  • moving a motor pair works relatively well via LocalControl
  • FESA issues errors when trying to move a slit: "FESA_10016 Invalid value: '0.05000...' not in range '[0; 0.0054999...]'.. ..." -> bug? Probably misconfiguration of pins on controller side (media board connector), also: check steps/mm setting, velocity, ..., only seen on slit1/X-Slit

-- SolveighMatthies - 14 Apr 2021
Topic revision: r33 - 08 Nov 2023, SolveighMatthies
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback