Stepper Motor Systems for FAIR

(Tests 11/2020 DryRun)


Set up of microIOC for MCS, Saclay / Cryring / Testsystem@GSI (64-bit)

New: the microIOC systems will be updated to run 64-bit software. This implies a new front-end structure which is briefly described here.

The driver software, such as libslits.so, lcd, slits-server, lcmonitor is located on the asl cluster in /common/export/slits/<FEC name>/ . The script slits.sh copies the software into the RAM disc during boot to launch the required software. This scipt is launched by the generic script stored on the asl cluster in /common/export/nfsinit/global/ .

The FESA software (MBoxDeployUnit containing SlitClass and MotorClass) is located in /common/export/fesa/local/<FEC name>/!MBoxDeployUnit . It will be launched automatically during boot of the front-end by a daemon.

The required configuration files (lcmonitor.ini, properties.ini, slits-server.ini, pmacProperties.ini ) are located in /common/export/slits/<FEC name>/ . The configuration files lcmonitor.ini and slits-server.ini are not relevant for lcmonitor and server according to UK. A default fall back option is used.

The properties.ini configuration file should be accessible from the FEC in /etc/slits-conf . The file is written by the JAVA based local-control software and also used by the FESA software.
Path in asl cluster (asl74x) Path on FEC Content/Description
/common/export/slits/slits.sh   Script to launch lcmonitor, slits-server, lcd software
/common/export/slits/x86_64/bin /usr/bin Binaries lcd, lcmonitor, slits-server
/common/export/slits/x86_64/lib /usr/lib Driver library libslits.so
/common/export/fesa/local/<FEC name> /opt/fesa/du/ FESA software (deploy-unit)
/common/export/fesa/local/<FEC name>/!MBoxDeployUnit /opt/fesa/du/MBoxDeployUnit/ cmw.cfg, fesa.cfg, log.cfg, MBoxDeployUnit, MBoxDeployUnit.instance, messages.cfg, messagesLab.cfg
/common/export/nfsinit/<FEC-name> /opt/nfsinit/<FEC-name>/

20-mount -> script to mount the required directories such as /etc/slits-conf

40-slits -> ../global/slits

50-fesa -> ../global/fesa_64bit

60-slits-lcd -> script to launch lcd software to update lc display with status information

/common/export/nfsinit/global /opt/nfsinit/global/

slits -> generic: generic script to initialize a 64-bit FEC

fesa_64_bit: generic script which launches FESA deploy-units in /common/export/fesa/local/<FEC-name> using a daemon




Visible on FEC as /etc/slits-conf, contains the configuration files data.txt, pmacProperties.ini, properties.ini

Inbetriebnahme-Tipps fuer neue Schrittmotor-Systeme

  • neue MicroIOCs / PMACs am Testsystem vollstaendig (!!!) anschliessen und mit LocalControl GUI konfigurieren.
  • FE:
    • PXE-Verzeichnis, Links fuer IP, OS Image
    • NFSINIT-Verzeichnis /common/export/nfsinit/<FEC-name> anlegen, Links entsprechend setzen
    • entsprechende FESA-Software (einzelne Motoren oder Schlitze???) in /common/export/fesa/local/<FEC name>/ bereitstellen und konfigurieren, Instanz mit Geraetenomenklaturen in DB eintragen
    • Schrittmotor-Konfigurationsdateien in /common/fesadata/data/<FEC-name>/slits-conf/ bereit stellen, Geraetenomenklaturen eintragen

LCDisplay Control

  • activation:
    • old: press fn button + <???> button for two seconds
    • new: press green tick button + right arrow button for two seconds


MicroIOC nicht im ACC Netzwerk erreichbar

  • Verkabelung, ACC Switch ports
  • CF Karte noch eingesetzt, Boot Konfiguration
  • Keine DHCP-Adresse: Reset ACC network switch

Serielle Schnittstelle

  • Tauchen Fehler beim Zugriff auf die serielle Schnittstelle auf, etwa der Art
    ERROR Exception at: src/SerialComm.cpp:610, Description: SerialComm::serialRead: /dev/ttyCTI1 read timeout
          kapci01          Error, command: readSystemConfig  Exception: Exception at: src/Device.cpp:72, Description: Driver initialization failed: Exception at: src/SerialComm.cpp:610, Description:       SerialComm::serialRead: /dev/ttyCTI1 read timeout

sollte der Inhalt von /common/tftp/csco/pxe/pxelinux.cfg/<FEC-name> ueberprueft werden. Gegebenenfalls macht es Sinn die vom seriellen Standardtreiber initialisierten seriellen Ports auf 5 zu begrenzen. S. Beispiel fuer tstci02.
Check Adressbelegung serielle Schnittstellen:
root@<FEC-name>:dmesg | grep tty
  • Eine alternative Fehlerquelle ist das verwendete serielle Kabel. Es sollte das richtige sein. -> SD/LOBI/AOBI
  • Moeglicherweise ist auch die properties.ini-Datei die Fehlerursache. Hier sollte der jeweils aktuelle Stand verwendet werden, z.B. inklusive Angaben fuer 'named positions' etc!!!

Keine Verbindung moeglich

  • Ping und Verbindung mit MicroIOC funktioniert nicht: ACO/IN pruefen lassen, ob MAC-Adressen richtig eingetragen sind
  • Verbindungsversuch mit local-control GUI scheitert:
    • Netzwerkkabel ist abgezogen
    • System ist fehlerhaft konfiguriert, z.B. fehlende Parameter in Konfigurationsdatei (-> Fehlermeldung deutet faelschlicherweise auf serielle Verbindung hin)
    • Encoder type in properties.ini ist falsch eingestellt. Muss ggfs. in properties.ini direkt eingetragen werden da Verbindung mit local-control GUI nicht moeglich ist wegen seriellem Verbindungsfehler.
Name Encoder Type Nr. Beispiel
Potentiometer 1 motor1.encoderType = 1
SSI 2 motor1.encoderType = 2
PMAC 3 motor1.encoderType = 3
    • System ist fehlerhaft verkabelt (aussen). Darauf achten dass jeweilige Buchsen fuer Potentiometer oder SSI-Geraet verwendet werden.
    • PMac/MicroIOC ist ausgeschaltet...
    • Serielle Stecker oder Stromversorgungskabel innen (!) im MicroIOC nicht richtig aufgesteckt
    • Konfiguration: wenn nicht alle Motoren via Kabel angeschlossen sind, sollten sie z.B. als PMAC konfiguriert sein (z.B. motor8.encoderType=3).

OS Image cannot be loaded

  • error message during boot: Could not find kernel image: rescue/kernel
    • CSCOIN needs to set a cryptic link to point the IP (gethostip) to the hostname of the Micro IOC in /common/tftp/csco/pxe/pxelinux.cfg

Software Troubleshooting

  • [RdaException] FESA_13008 Partial setting not allowed:
    • set-rda3-c++ -d <deviceName> -p MoveToPosition -v <positionName> / JAPC call: uebergebener Japc-Parameter: <deviceName>/MoveToPosition#name
      uebergebener Wert: <positionName> (String)

      [RdaException] FESA_13008 Partial setting not allowed. src/fesa-core/Server/ServerData.cpp:254
      • wrong/missing parameter: >set-rda3-c++ -d <deviceName> -p MoveToPosition -f positionName -v <positionName>
        Sync SET completed: <deviceName>/MoveToPosition
        RequestContext [selector=; filters=; data=]

No Connection to PMAC

  • socket connection problems: MicroIOC of a more recent generation (2nd) have an additional network interface built-in, the network interfaces have to be configured differently compared to the first version
log 'configuring network'
# configure internal network interface
if /sbin/ifconfig eth2; then
 log "Device eth2 exists, dealing with new version M-Box (LCD CFA533), setting eth2 as PMAC's interface."
 /sbin/ifconfig eth2 netmask up
 log "Device eth2 doesn't exist, dealing with old version M-Box (LCD LCM02), setting eth1 as PMAC's interface."
 /sbin/ifconfig eth1 netmask up

[root@fel9002 ~]# ifconfig
eth0     Link encap:Ethernet HWaddr 00:18:7D:A7:22:68
         inet addr: Bcast: Mask:
         RX packets:19149182 errors:0 dropped:4606237 overruns:0 frame:0
         TX packets:10377500 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:1000
         RX bytes:1587088574 (1.4 GiB) TX bytes:14005087882 (13.0 GiB)
eth1     Link encap:Ethernet HWaddr 00:18:7D:A7:22:69 
         UP BROADCAST MULTICAST MTU:1500 Metric:1
         RX packets:0 errors:0 dropped:0 overruns:0 frame:0
         TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:1000 
         RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
eth2     Link encap:Ethernet HWaddr 00:0B:AB:BB:8B:F4 
         inet addr: Bcast: Mask:
         RX packets:92579581 errors:0 dropped:0 overruns:0 frame:0
         TX packets:34732985 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:1000 
         RX bytes:5611335928 (5.2 GiB) TX bytes:2264005048 (2.1 GiB)
lo       Link encap:Local Loopback 
         inet addr: Mask:
         UP LOOPBACK RUNNING MTU:65536 Metric:1
         RX packets:0 errors:0 dropped:0 overruns:0 frame:0
         TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:0 
         RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

Motors don't move, no Errors

  • hardware reset may help (turn MicroIOC completely off using the switch in the back)
  • sometimes a PMAC controller reboot may help
  • screws between motor and drive loose (symptoms: motors receive commands either via FEX or Local Control GUI, but the position does not change; no errors reported)

Motors move via local control, but not via Device Control

  • step motor system is probably fine

Motors don't move via Device Control

  • no Local Control GUI instance should be connected to the step motor system in local control mode. Either switch to remote mode or wait 5 min until this happens automatically.

Motors both in inner/outer end position at the same time

  • sure sign that no motor hardware is connected

LEDs on MicroIOC

Until MicroIOC version 2 (cfa533 display)
  Translation Color Glow  
GF general fault red

off: all is fine

steady: probably some error somewhere

blinks: ?

Motor 1-8   red

off: all is fine


blink: probably some error somewhere

blink: no motor connected


Shared Memory Access Issues

Sometimes the step motor software processes don't close their access to the shared memory segment properly. Even after a system reboot the shared memory is not usable. The error message indicating such an issue is

[root@<FEC name> ~]# /usr/bin/lcMonitor_cfa533 -c /etc/slits-conf/lcmonitor.ini&
[root@<FEC name> ~]# Exception at: lcMonitor.cpp:147, Description: Failed to create MBox driver: Exception at: src/SharedMemory.cpp:483, Description: semget failed: File exists : 17
Creating shared memory in error state.
terminate called after throwing an instance of 'MBoxNameSpace::AccessControlException'
  what():  Exception at: src/SharedMemory.cpp:483, Description: semget failed: File exists : 17

Another possible error message related to this error is
'Error reading from SSI device'

In these cases follow up processes will not launch and pmac connection errors will occur.

2020-03-06T07:04:19.988Z  tstci17              lcd
tstci17 lcd: Exception at: lcd.cpp:724, Description: main: error:Exception at: src/SharedMemory.cpp:34, Description: Failed to create MBox driver: Exception at: src/PmacComm.cpp:86, Description: PmacComm::doConnect: connect failed: No route to host

To solve this check the shared memory usage and the pending semaphores with the ipcs command.

[root@<FEC name> ~]# ipcs
------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status      
0x000004d2 32768      root       666        24648      6                       
------ Semaphore Arrays --------
key        semid      owner      perms      nsems     
0x00003039 32768      root       666        1         
------ Message Queues --------
key        msqid      owner      perms      used-bytes   messages    
[root@tstci16 ~]# ipcrm -m 32768
[root@tstci16 ~]# ipcrm -s 32768

Pending semaphores can be removed with ipcrm -s <ID>. Blocked memory segments can be remove with ipcrm -m <ID>.

A simple script helps to clear the shared memory in case of trouble. It is located in /opt/fesa/data/slits-conf/. The script has to be run in sourced mode (dot and script in front of script name):

. checkAndClearSharedMemory.sh

PMAC Connection issues

2020-09-23T10:52:23.361Z  yr07ci01             lcd                 
yr07ci01 lcd: Exception at: lcd.cpp:724, Description: main: error:Exception at: src/SharedMemory.cpp:34, Description: Failed to create MBox driver: Exception at: src/PmacComm.cpp:86, Description: PmacComm::doConnect: connect failed: No route to host

This could be an internal network interface card issue (hardware broken, cables of, misconfiguration?).


X-Port / <nomenclature>m64

Email from Cosylab, 09.04.2020:

" a) Xport socket not responsive

(If I'm not mistaken this was also observed by some of you.)

According to our experience, the Xport socket can freeze. However, this behavior can be completely prevented, if the socket is used exactly "by-the-book".

What we found out is, that the socket gets frozen if it is closed in an inappropriate way, i.e. without explicitly sending the >>exit<< command to the Xport, before closing the TCP socket. In the case, where the client (telnet, or any other custom application) just closes the TCP socket, without sending exit command, the Xport sooner or later becomes unresponsive.

The reset-over-Xport functionality was implemented in the GUI, and the GUI handles the socket as the Xport expects. if you will be using this functionality, the Xport should never freeze (well, we at least never experienced that smile )

If at some point, someone will want to use the Xport functionality directly through another application, knowing that fact may spare him or her some debugging time.

b) console port via Xport

The purpose of the Xport is also to provide a remote monitoring/administration tool. Through the Xport, it is possible to remotely connect to the system's console serial port. This way, one can have complete remote access to the system, from the very beginning (i.e., from BIOS boot).

What we found out is that the GSI's boot image at some point redirects (or terminates) the console port away from where Xport is connected to. That happens during Linux kernel is loading.

The administrator of the boot image would need to change/fix that, if the functionality is needed. "
Logging in to the X-Port
name@asl74x: telnet <nomenclature>m64
Trying <IP>...
Connected to <nomenclature>m64.
Escape character is '^]'.
Connection menu: (select by number)
  1) microIOC                             2) Exit to CLI
  3) Log out                            
Selection = 

Leaving the tool is possible with Ctrl+L.

LCDisplay does not work

  • lcd software did not start. Check content of /common/export/nfsinit/<FEC name>/60-slits-lcd:
. /etc/functions

log 'launch lcd after FESA software to display more information on the MicroIOCs display'
log 'sleep 45 s'
sleep 45
log 'starting lcd'
daemon -n lcd -U -O daemon.debug -E daemon.err -- \
    /usr/bin/lcd_cfa533 -c /etc/slits-conf/lcd.ini
  • hardware issue? internal power connection?

Error message: "Failed to kill motor"

Email by Rok Hari, cosylab, 26.06.2020: "When lcMonitor launches, it initializes all motors present in the configuration file (on our setup, that is configurationFile=data.txt). Killing the motors is part of that initialization process. If pmac does not respond within 300 ms to a kill command, a "Failed to kill Motor." exception is thrown, which prevents the driver from being created. This is what happened in your case for at least one of the motors present in configuration file.

But I don't know what would cause pmac to not respond within 300 ms to a kill command."

Email by Matic Marn, cosylab, 26.09.2020: "Which motors are connected shouldn't effect this, but I can not say for certain since I'm not familiar with the configuration.

I tried to disable the 6 motors in properties.ini, but the error message 'failed to kill motor' persists.

The "enabled" setting in the properties.ini does not effect this since this setting is used so that the status of the disabled motors is not polled (solving the serial communication problems). The PMAC still does the kill command regardless.

It may be that just the pmacProperties.ini file which you are using is not correct?
My advice is to update the PMAC code and the pmacProperties.ini file. This should be enough for a working system."
  • update of internal pmac code with PMACUtils required



z.B. tstci05: microIOC PMAC: RS485/1 PDC1SSI, microIOC PDC: Serial1 SSI


Um ein Potentiometer anschliessen zu koennen werden die folgenden seriellen Anschlüsse verwendet:

z.B. tstci05: microIOC PMAC: RS485/2 PDC1ADC, microIOC PDC: Serial2 ADC

MicroIOC under CentOS7

Setup and Configuration for FESA3 4.0.0

  • symbolic link in /common/tftp/csco/pxe/pxelinux.cfg set to microioc.el7, e.g. tstci02 -> microioc.el7
  • symbolic links in /common/export/nfsinit/tstci02:
-rwxrwxr-x 1 matthies bel 1119 Jan  4 10:49 20-mount
lrwxrwxrwx 1 matthies bel   34 Jan  4 10:52 30-timing-rte -> ../global/timing-rte-RC8-balloon_0
lrwxrwxrwx 1 matthies bel   15 Jan  4 10:50 40-slits -> ../global/slits
lrwxrwxrwx 1 matthies bel   20 Jan  4 10:51 50-fesa -> ../global/fesa_64bit
-rwxrwxr-x 1 matthies bel  260 Jan  4 10:49 60-slits-lcd
  • update of driver, lcd, lcMonitor and server using script ./buildAndDistributeDriverEtc.sh -d tstci02 (run in motion control workspace)
  • release of updated FESA software to /common/export/fesa/local
  • location of properties.ini: /common/fesadata/data/<FEC name>/slits-conf/properties.ini

Stepper Motor System Revamped (2020)

In 2020 the step motor system software has been revamped. Stability issues were covered as well as software extensions as summarized in 'FAIR stepper motor system software improvements' from 01.07.2019. Among the upgrades is the option to connect the step motor systems to the white rabbit timing system using PCM white rabbit timing receivers (FTRN).

Software Setup

The software structure is similar to the previous versions. The stepper motor system software consists of a driver used by the other software components, an lcmonitor module, a server module, an lc display driver for both old and new lc displays, FESA software for both motors and slits (=motor pairs) using the subsets concept along with an expert GUI ('local control GUI'). The expert GUI steers the motors by accessing the motor driver software directly. The FESA software can be accessed using FEX or via the operating applications.


Path on asl cluster Path on FEC Content / Description
/common/export/slits_cfa533/slits_cfa533.sh   Script to launch new lcmonitor, slits-server, lcd software and to copy pmac tools to ram disc
/common/export/slits_cfa533/x86_64/bin/ /usr/bin  
/common/export/slits_cfa533/x86_64/lib/ /usr/lib  
/common/export/fesa/local/<FEC name>/ /opt/fesa/du Location of FESA software
/common/export/fesa/local/<FEC name>/MotorSlit_DU/ /opt/fesa/nfs/local/<FEC-name>/MotorSlit_DU/ Location of FESA software including start script
/common/export/nfsinit/<FEC-name>/ /opt/nfsinit/<FEC-name>/  
/common/fesadata/data/<FEC-name>/slits-conf/ /etc/slits-conf/ Stepper motor software configuration files


  • PXE-Verzeichnis, Links fuer IP, OS Image
  • MicroIOCs with the CFA533 LC display also contain a different ethernet network card. The network interfaces are configured appropriately in slits_cfa533.sh .
  • The script to launch the lc display software should use /usr/bin/lcd_cfa533

Hardware Changes

  • Optional: integration of PCM white rabbit timing receivers (FTRN)
  • PMAC reset cable has to be removed within MBOX

Firmware Updates

  • PMAC update using pmac-utils
  • SSI update, requires spezialized programmer
  • CPLD update (2020: V10), requires JTAG programmer

WR Timing


  • FESA configuration: "timingReceiverPresent" global configuration field has to be set to "true".
  • FESA configuration: event mapping per device
  • FESA configuration: device configuration: accelerator, timing/accelerator zone
  • check availability:
[root@fel9005 ~]# saft-ctl tr0 -i
saftlib source version : saftlib 2.1.0 (v2.1.0): Aug 13 2019 11:29:41
saftlib build info : built by ahahn on Aug 13 2019 15:32:33 with asl743.acc.gsi.de running CentOS Linux release 7.6.1810 (Core)

[root@fel9005 ~]# saft-ctl tr0 -s
no WR lock!!!
receiver free conditions: 253, max (capacity of HW): 0(256), early threshold: 4294967296 ns, latency: 4096 ns
sinks instantiated on this host: 2
 /de/gsi/saftlib/tr0/software/_1 (minOffset: -1000000000 ns, maxOffset: 1000000000 ns)
 -- actions: 0, delayed: 0, conflict: 0, late: 0, early: 0, overflow: 0 (max signalRate: 10Hz)
 -- conditions: 3
 ---- EvtID: 1212048910621605888, mask: 0xfffffff000000000, offset: 0x000000000, active: 1, destructible: 1, owner: :1
 ---- EvtID: 1212067808477708288, mask: 0xfffffff000000000, offset: 0x000000000, active: 1, destructible: 1, owner: :1
 ---- EvtID: 1212048841902129152, mask: 0xfffffff000000000, offset: 0x000000000, active: 1, destructible: 1, owner: :1
 /de/gsi/saftlib/tr0/software/_3 (minOffset: -1000000000 ns, maxOffset: 1000000000 ns)
 -- actions: 0, delayed: 0, conflict: 0, late: 0, early: 0, overflow: 0 (max signalRate: 10Hz)
 -- conditions: 0

Inject Timing Events manually

user@asl74x slits-conf $ pdex YR09DSBHA SettingTriggered position=0.033 -sp2
NOMEN  = YR09DSBHA (MotorSlit_DU.yr09ci01 | Motor)
Please report - UNKNOWN FESA ERROR: cmwrda.Rda.read: USER_ERROR: Error caused by: Field 'enabled' is missing data.. src/MotorSlit/Server/SettingTriggeredSetAction.cpp:90
device="YR09DSBHA" property="SettingTriggered" selector="FAIR.SELECTOR.P=2" requestType="SET"
  • First tests: possible with the script /inject_events.sh, the script will inject a fake event with the number 104. The FESA software needs to be configured appropriately for this event.
  • First tests: The selected cycle is: sequence index: 0, process index: 1, chain index: 0, timing group: 211
  • Alternative script: ./opt/fesa/nfs/global/scripts/inject-event-id.sh 211 532 2 2 2 2


  • enable enhanced log output: saftbus-ctl --enable-logging
  • parse log output for emitted signals: saftbus-ctl --enable-logging
  • disable enhanced log output: saftbus-ctl --disable-logging
  • decode timing events
  • auslesen, ob die Condition-Property AcceptLate gesetzt ist: saftbus-ctl --get-property de.gsi.saftlib.Condition /de/gsi/saftlib/tr0/software/_1/_1957747793 AcceptLate b


29.07.2020: new boot image. Features: now the system first checks for DHCP. If there is no DHCP, static network settings are applied.

The network setting is, and the mbox's IP is

The image can be found here:


HowTo: https://www.howtogeek.com/howto/14912/create-a-persistent-bootable-ubuntu-usb-flash-drive/
Suggested boot order

Boot option #1: UEFI FAT File system

Boot option #2: USB-Stick (SanDisk, Kingston, etc), could also be #1 since it is skipped quickly if it is not attached

Boot option #3: SCSI card

Boot option #4: PXE boot

The boot order helps to prevent delays due to timeout issues or unexpected user input issues on an embedded system.

Remote Reset

Moeglich wenn XPort am Netzwerk angeschlossen ist. https://www-acc.gsi.de/wiki/Frontend/MicroIOC#Xport_Management_40for_remote_reset_41

PMAC Controller (PMAC Utils)

Die pmac-utils für die 64-bit-Umgebung (ohne das Flag -m32) kompillieren und z.B. in /common/export/slits_cfa533/x86_64/bin/pmac ablegen. Auf dem MicroIOC einloggen und im Verzeichnis /opt/slits_cfa533/x86_64/bin/pmac die Tools ausführen.


./upload -ip -a /backup_pmac.txt


./sendfile -ip -vr genericSlits.pmac

To copy the required tools from /common/export/slits_cfa533/x86_64/bin to the RAM disc add the following to the file /common/export/slits_cfa533/slits_cfa533.sh:
# install tools to update pmac software
for i in pmac/pmacConsole pmac/sendfile pmac/upload pmac/genericSlits.pmac pmac/pmacProperties.ini; do
install -m 755 /opt/$NAME/$ARCH/bin/$i /usr/bin/
for i in pmac/genericSlits.pmac pmac/pmacProperties.ini; do
install -m 644 /opt/$NAME/$ARCH/bin/$i /usr/bin/

opkg install ldd

MicroIOC: Standalone System

Technically it is possible to run a stepper motor system 'standalone', i.e. without a network connection. However, this involves at the time of being booting the MicroIOC controller from an USB stick. This requires that the motor configuration (persisted in properties.ini) has to be available before the OS image is written to the USB stick. This also means the motor configuration cannot be persisted during runtime of the USB stick. A workaround to solve this issue is to create and persist the motor configuration on a different stepper motor system and use this for the USB boot stick.

Description of MicroIOC boot image creation: https://git.acc.gsi.de/Cosylab/mbox-offline

FESA software for driving the stepper motors is not required on a standalone stepper motor system.

Boot from USB Stick

  • requires prepared image on an USB stick, transfer with e.g. mkusb
  • BIOS settings adjustable when bootable USB stick is connected
  • desired boot order:
    • 1) boot from USB stick
    • 2) boot from network (PXE)

MicroIOC under RH6 - deprecated

Mounted Directories

Changes to the previous sections relate primarily to the file system: Different directories are mounted, as listed in the following table, with <hostname> as the name of the MicroIOCs:
meaning directories on
asl-cluster microioc
init-directory /common/export/nfsinit/<hostname>/ /opt/nfsinit/<hostname>/
data-directory /common/fesadata/data/<hostname>/ /opt/fesa/data/

Set-Up of General Environment

Into the init-directory the script <nn>_slits has to be copied, which has to be executed after the other init scripts (should have a high leading number <nn>, like =80_slits
  • in /common/export/nfsinit/<hostname>/copy
    • = <nn>_slits =
    • excample to be found in the Subversion repository, Motion-GSI/trunk/src/cpp/scripts/
The init script creates a soft-link slits, which Points to the data-directory (slits -> /opt/fesa/data/). The other files are to be established on the data directory.

On the data-directory several subdirectories have to be created, into which the following files have to be copied
  • conf/: Configuration files
    • data
    • pmacProperties.ini
    • properties.ini: Here Motor configuration will be permanently stored
  • /driver
    • libslits.so: Library for Access to MBox-hardware
  • /lcmonitor
    • lcMonitor: Access handler to the MBox, creates a shared Memory for communication
  • /server
    • Server: Server for communication with local access and configuration programm
  • lcd/
    • lcd: Program to handle the frontside local control LCD-panel
  • log/ : Directory for logfiles
Configuration files are found in the Subversion repository in Motion-GSI/trunk/src/cpp/driver/data/

The shared libray and the executables are found, after compilation with the assciated makefiles, in
  • Motion-GSI/trunk/src/cpp/driver/
  • Motion-GSI/trunk/src/cpp/lcMonitor/bin/
  • Motion-GSI/trunk/src/cpp/server/bin/
  • Motion-GSI/trunk/src/cpp/lcd/bin/
A simple build and distribution script compiles the driver, lcMonitor, server and lcd to distribute the resulting binaries to the NFS directory /common/fesadata/data/<hostname>/... . The script is stored in Motion-GSI/trunk/src/cpp/scripts . The script needs to be run in the workspace in Motion-GSI/trunk/src/cpp/ .

Configuration Tools for pMac

Configuration of pMac only has to be done once. However, it is appropriate to store all configuration tools also permanently on the MicroIOC.

For set-up of the pMac, the following configuration files, and after compilation with the associated makefiles, the following executables should be copied to a directory which can be accessed from the MicroIOC, e.g. into a subdirectory pmac/ in the data-directory:
  • from Motion-GSI/trunk/src/pmac/
    • default-conf-3-3-2006.CFG
    • genericSlits.pmac
  • from Motion-GSI/trunk/src/pmac-util/bin/
    • pmacConsole
    • sendfile
    • upload

Configuration of FESA

Section still has to be Extended

Presently (Dec. 2014) following files are provided in the directory (seen in the asl-cluster) /common/fesadata/data/<hostname>/fesa/ The specific start-script mbox-start.sh is found in the subversion repository in Motion-GSI/trunk/src/cpp/scripts/.
Build FESA software

The FESA software consists of the classes SlitClass and MotorClass. Both classes are combined in the deploy-unit MBoxDeployUnit. TheFESA software can be synchronized and built within Eclipse.

A simple script allows to build the FESA software from the command line. It is located in Motion-GSI/trunk/src/fesa/scripts/ .
Distribute FESA software

A simple script allows to distribute the FESA software. It is located in Motion-GSI/trunk/src/fesa/scripts/ . It copies the required binaries and instantiation files to /common/fesadata/data/<hostname>/fesa/.

TODO In Addition, the following files are provided but probably will not be needed in this Location: libetherbone.a, libetherbone.so.1, libeca.a, libetherbone.so, libetherbone.so.1.0.
Run FESA software

The FESA software is launched during start of the MBox.

The FESA software may be started manually by running /opt/fesa/data/scripts/mbox/start.sh .

microIOC in Betrieb nehmen (RH5) - deprecated

  • Momentan werden die microIOCs mit einer CF-Karte(<nop>CompactFlash -Karte) ausgeliefert. Auf diesen Karten läuft ein Debian-Linux. Diese Karte entfernen.
  • Der Infrastrukturgruppe die MAC-Adresse des microIOCs und die MAC-Adresse des XPorts mitteilen. Dann wird der microIOC im dhcp eingetragen. Wichtig ist auch von welcher Maschine der microIOC booten soll (asl72x oder asl73x).
  • Welche Ramdisk er laden soll muss verlinkt werden. Macht auch manchmal die Infrastrukturgruppe. Unter asl72x:
     [konh@asl722 ~]$ cd /common/usr/tftpboot/bel/pxe/pxelinux.cfg/
    [konh@asl722 pxelinux.cfg]$ dir *ci* Ist der microIOC schon verlinkt? Ansonsten
    [konh@asl722 pxelinux.cfg]$ ln -s microioc $HOSTNAME
    [konh@asl722 pxelinux.cfg]$ ln -s $HOSTNAME "IP-Adresse in Hex"
  • Betriebsumgebung einrichten. Hier stehen die Skripte die über NFS aufgerufen werden. Alle micoIOCs brauchen das Skript devacc das richtet die Umgebung für den microIOC ein.
     [konh@asl722 ~]$ cd /common/usr/export/nfsinit/$HOSTNAME
    [konh@asl722 $HOSTNAME]$ ln -s ../global/devacc 70_devacc
    [konh@asl722 $HOSTNAME]$ dir
    lrwxrwxrwx 1 konh bel 16 Jun 26 12:36 70_devacc -> ../global/devacc
    • Soll ein Schrittmotor mit dem microIOC gesteuert werden, müssen weitere Skripte verlinkt werden.
      [konh@asl722 $HOSTNAME]$ ln -s ../global/cti_serial 20_cti_serial 
      [konh@asl722 $HOSTNAME]$ cp ../kapci01/40_slit 40_slit

  • Ein Verzeichnis für die Schrittmotordaten wird angelegt:
    [konh@asl722 ~]$ cd /common/usr/export/data 
    [konh@asl722 data]$ mkdir $HOSTNAME

    Gruppenzugehörigkeit für das Verzeichnis wechseln.
    [konh@asl722 data]$ chgrp fecs $HOSTNAME
    [konh@asl722 data]$ cd $HOSTNAME
    [konh@asl722 $HOSTNAME]$ cp -a ../kapci01/* .

  • Lokale Umgebung einrichten:
    [konh@asl722 ~]$ cd /common/usr/export/devacc/local/
    [konh@asl722 local]$ mkdir $HOSTNAME
    [konh@asl722 local]$ cd $HOSTNAME
    [konh@asl722 $HOSTNAME]$ Hier das $HOSTNAME.dbs hinkopieren und Links setzen für den devman und die Gerätemodelle.
  • Die boot-Optionen müssen im BIOS geändert werden. Dazu den microIOC mit einem VGA-Kabel an einen Monitor anschliessen und mit einer USB-Tastatur versehen. Beim booten des Rechners die Taste 'del' drücken um in das BIOS zu kommen.
     Boot Menü
    -> Launch PXE OpROM von disabled auf enabled ändern
    Änderungen im BIOS abspeichern und das BIOS verlassen. Rechner neu starten.

PMAC-Treiber aktualisieren

  • devmann beenden
[root@tstci05 /]#  ps 
 854 root      10:40 ./lcMonitor
  864 root       0:00 ./server
  870 root       1:19 ./lcd
  889 root       3:59 /opt/devacc/local/tstci02/library/devman -p
  890 root       0:00 /sbin/getty 115200 /dev/ttyS0
  891 root       0:00 /sbin/getty 19200 /dev/tty1
  901 root       0:02 /usr/bin/dropbear
[root@tstci05 /]#  kill   889
  • In das PMAC-Verzeichnis wechseln und Treiber aktualisieren:
 [root@tstci05 /]# cd  /opt/slits/pmac/
[root@tstci05 pmac]# ./upload -a oldconfig-2014-07-08.pmac
Uploading coordinate systems settings...
Uploading motion programs...
Uploading kinematic programs...
Uploading PLC programs...
Uploading P variables...
Uploading Q variables...
Uploading M variables...
Uploading I variables...
All done!
[root@tstci05 pmac]# ./sendfile default-conf-3-3-2006.CFG
Establishing communication with PMAC...OK
Sending file to PMAC...
[root@tstci05 pmac]# ./sendfile genericSlits.pmac
Establishing communication with PMAC...OK
Sending file to PMAC...

PMAC Reset

* Einloggen auf dem microIOC
[konh@asl722 lnx]$ ssh root@ke1ci01
root@ke1ci01's password: 
sh: /usr/X11R6/bin/xauth: not found
[root@ke1ci01 /]# cd /opt/pmac/
[root@ke1ci01 pmac]# ./pmacConsole
Connected to PMAC at
STR: '$$$'
[root@ke1ci01 pmac]# 

Lokale Bedienung

Die Quelldateien von cosylab liegen imSVN (https://www-acc.gsi.de/svn/cosylab/Motion/trunk/src/java/local-control). Die dazugehörige Dokumentation (https://www-acc.gsi.de/svn/cosylab/Motion/trunk/src/java/local-control/doc/UsersManual.pdf)

Starten der lokalen Bedienung

* Unter Linux findet man eine jar-Datei in meinem Home-Verzeichnis:

[konh@asl722 lnx]$ cd projekt/steppermotors/localcontrol/2013-12-17/
[konh@asl722 2013-12-17]$ java -jar local-control.jar &

* Unter Windows macht man einen Doppelklick auf die jar-Datei.

System Mode

  • local configuration: Konfigurieren der Motorparameter möglich. Die lokale Bedienung bleibt in diesem Zustand.
  • local control: Steuern der Motoren möglich. Nach 5 Minuten fällt die lokale Bedienung in den Modus remote zurück.
  • remote: Steuern der Motoren über remote z.B. devacc oder FESA

-- KlaudiaKonhaeuser - 02 Jul 2014

# install tools to update pmac softwarefor i in pmac/pmacConsole pmac/sendfile pmac/upload pmac/genericSlits.pmac pmac/pmacProperties.ini; do install -m 755 /opt/$NAME/$ARCH/bin/$i /usr/bin/done
for i in pmac/genericSlits.pmac pmac/pmacProperties.ini; do install -m 644 /opt/$NAME/$ARCH/bin/$i /usr/bin/done
Topic revision: r84 - 12 May 2021, 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