microIOC

Inhalt

Aktuelles

Stepper Motor Systems for FAIR

Tests 11/2020 DryRun

Tests 11/2021 DryRun

Stepper Motor Systems for FRS Retrofit

Allgemeines

FESA Software Releases

FESA3MotorSlitSoftwareReleases

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// . 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//!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// . 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/ /opt/fesa/du/ FESA software (deploy-unit)
/common/export/fesa/local//!MBoxDeployUnit /opt/fesa/du/MBoxDeployUnit/ cmw.cfg, fesa.cfg, log.cfg, MBoxDeployUnit, MBoxDeployUnit.instance, messages.cfg, messagesLab.cfg
/common/export/nfsinit/ /opt/nfsinit//

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/ using a daemon

/common/fesadata/data//slits-conf/

/opt/fesa/data/slits-conf/

/etc/slits-conf/

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:
    • MAC-Adressen LAN1, LAN2, x-port fuer DHCP-server (-> ACO INN)
    • PXE-Verzeichnis, Links fuer IP (LAN1), OS Image-link
    • NFSINIT-Verzeichnis /common/export/nfsinit/ anlegen, Links entsprechend setzen
    • entsprechende FESA-Software (einzelne Motoren oder Schlitze???) in /common/export/fesa/local// bereitstellen und konfigurieren, Instanz mit Geraetenomenklaturen in DB eintragen
    • Schrittmotor-Konfigurationsdateien in /common/fesadata/data//slits-conf/ bereit stellen, Geraetenomenklaturen eintragen

Checkliste für Inbetriebnahme und Konfiguration von neuen MicroIOCs

TBD Benötigt (Software) Benötigt (Hardware)Sorted ascending
  NFS setup for stepper motor driver  
MicroIOC -Beschriftung (MAC-Adressen, Label) MAC's für IP-Adressen: MicroIOC, xport-Anschluss für remote reset  
Aufbauort -> Nomenklatur für MicroIOC (PRO: 'offizielle Nomenklatur', sonst Testnomenklatur) MicroIOC: NFS Initialisierung / PXE Links  
# Kanäle (bis zu 8 Motoren pro MicroIOC) MicroIOC: Motorkonfiguration / FESA Konfiguration  
Lage der Motoren bestimmt Nomenklatur (PRO: 'offizielle Nomenklatur', sonst Testnomenklatur)    
  MicroIOC: OS-Image ACC-Netzwerkanschluss
FESA Geraetekonfiguration, auch in Datenbank (INT/PRO) FESA DeviceInstance, ein funktionierendes FESA Tool fuer den Datenbankexport ASL Entwicklungsumgebung
Einbindung ins ACO Kontrollsystem notwendig? Falls Ja: FESA software setup
Falls Nein: USB boot stick Lösung mit Treiber-Software
Falls Ja: ACC-Netzwerkanschluss, entsprechende Verkabelung
Falls Nein: entsprechender USB Stick
WR-Timing-Anschluss notwendig? MicroIOC: FESA Konfiguration FTRN-Einbau in MicroIOC
WR-Timing Verkabelung bis MicroIOC
WR-Timing-Switch
Versionen (PMAC, CPLD, SSI1+2,...) auslesen ./opt/slits_cfa533/x86_64/bin/readSMSoftwareVersions
(MicroIOC ohne LCD-Programm starten)
MicroIOC + 2 PDCs

Default-Konfigurationsdatei properties.ini laden

  • Motorparameter gemaess Spezifikation eintragen
  • Hardware-Endswitches einzeln testen
  • Endlimits festlegen/anfahren
LocalControl GUI MicroIOC +passende Verkabelung+Motoren zum Testen
FESA Software Test sobald Motorparameter entsprechend konfiguriert sind FESA Software; FESA Explorer; Gfs. Python Skripte MicroIOC +passende Verkabelung+Motoren zum Testen
Motorkonfiguration (einzeln, paarweise, ...) MicroIOC: Motorkonfiguration inkl. Limits für äußere/innere Endlagen, Positionstoleranz, u.a., gerätenah (SD/LOBI/AOBI, Experten, z.B. LocalControl GUI) Motor(en), passende Verkabelung
Verkabelung MicroIOC / PMAC   SSI-/ADC-Verbindungen, Motorkabel zwischen MBox-PDC und PDC-Motor, gfs. Interlock-Endswitches

Quick Setup of new MicroIOCs (cloning from tstci26)

https://git.acc.gsi.de/matthies/MotorSlit-scripts/src/branch/master/ibn.sh

./ibn.sh <hostname> <IP address> # setup microioc
./ibn.sh <hostname> <IP address> del # remove setup of microioc

Solution designed for asl74x integration environment. Does not involve FESA database upload.

Local Control GUI

LCDisplay Control

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

Troubleshooting

Network Connection

MicroIOC nicht im ACC Netzwerk erreichbar
  • Verkabelung, ACC Switch ports
  • CF Karte noch eingesetzt, Boot Konfiguration
  • Keine DHCP-Adresse: Reset ACC network switch
  • Verlaengerungskabel / Adapter funktioniert nicht (cross-over Adapter nicht nutzbar!)

Keine Verbindung möglich
  • Ping und Verbindung mit MicroIOC funktioniert nicht: ACO/IN pruefen lassen, ob MAC-Adressen richtig eingetragen sind
  • Verbindungsversuch mit LocalControl GUI scheitert:
    • Netzwerkkabel ist abgezogen
    • System ist fehlerhaft konfiguriert, z.B. fehlende Parameter in Konfigurationsdatei (-> Fehlermeldung deutet fälschlicherweise auf serielle Verbindung hin, bis 2020)
    • Encoder type in properties.ini ist falsch eingestellt. Muss ggfs. in properties.ini direkt eingetragen werden da Verbindung mit LocalControl GUI nicht möglich ist wegen seriellem Verbindungsfehler. (bis 2020)
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 für Potentiometer oder SSI-Gerät 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).

PDC Connection

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/ ueberprüft werden. Gegebenenfalls macht es Sinn die vom seriellen Standardtreiber initialisierten seriellen Ports auf 5 zu begrenzen. S. Beispiel für tstci02.
  • Error 300
14:54:25 - An error occurred while sending the following command to the server: readSystemConfig 

ERROR: Exception at: src/Device.cpp:70, Description: Driver initialization failed: Exception at: src/SharedMemory.cpp:34, Description: Failed to create MBox driver: Exception at: src/SerialComm.cpp:76, Description: SerialComm::connect: /dev/ttyCTI0 open failed: No such file or directory

OK:
[root@microioc~]# dmesg | grep tty
[    0.000000] Command line: initrd=scuxl/current/initramfs panic=10 console=ttyS3,115200 8250.nr_uarts=20 BOOT_IMAGE=scuxl/current/kernel 
[    0.000000] Kernel command line: initrd=scuxl/current/initramfs panic=10 console=ttyS3,115200 8250.nr_uarts=20 BOOT_IMAGE=scuxl/current/kernel 
[    0.000000] console [ttyS3] enabled
[    1.886977] 00:04: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
[    1.913313] 00:05: ttyS2 at I/O 0x3e8 (irq = 10) is a 16550A
[    1.939718] 00:06: ttyS3 at I/O 0x2e8 (irq = 10) is a 16550A
[    1.966072] 00:07: ttyS4 at I/O 0x2c0 (irq = 10) is a 16550A
[    1.992533] 00:0f: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[    2.002274] 0000:04:07.0: ttyS5 at MMIO 0xfe700000 (irq = 19) is a XR17D15X
[    2.009652] 0000:04:07.0: ttyS6 at MMIO 0xfe700200 (irq = 19) is a XR17D15X
[    2.017068] 0000:04:07.0: ttyS7 at MMIO 0xfe700400 (irq = 19) is a XR17D15X
[    2.024449] 0000:04:07.0: ttyS8 at MMIO 0xfe700600 (irq = 19) is a XR17D15X
[   23.751852] 0000:04:07.0: ttyCTI0 at MMIO 0xfe700000 (irq = 19) is a XR17xx5x
[   23.761101] 0000:04:07.0: ttyCTI1 at MMIO 0xfe700200 (irq = 19) is a XR17xx5x
[   23.770495] 0000:04:07.0: ttyCTI2 at MMIO 0xfe700400 (irq = 19) is a XR17xx5x
[   23.779416] 0000:04:07.0: ttyCTI3 at MMIO 0xfe700600 (irq = 19) is a XR17xx5x
[root@microioc~]# echo "gv" > /dev/ttyCTI0 | cat /dev/ttyCTI0
Rgv:HW-REV.B+FW-2.2

NOK:
[root@microioc~]# echo "gv" > /dev/ttyCTI1 | cat /dev/ttyCTI1
gv
[root@microioc~]# dmesg | grep tty
[    0.000000] Command line: initrd=scuxl/current/initramfs panic=10 console=ttyS3,115200 8250.nr_uarts=20 BOOT_IMAGE=scuxl/current/kernel 
[    0.000000] Kernel command line: initrd=scuxl/current/initramfs panic=10 console=ttyS3,115200 8250.nr_uarts=20 BOOT_IMAGE=scuxl/current/kernel 
[    0.000000] console [ttyS3] enabled
[    1.879477] 00:04: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
[    1.905747] 00:05: ttyS2 at I/O 0x3e8 (irq = 10) is a 16550A
[    1.932122] 00:06: ttyS3 at I/O 0x2e8 (irq = 10) is a 16550A
[    1.958489] 00:07: ttyS4 at I/O 0x2c0 (irq = 10) is a 16550A
[    1.984901] 00:0f: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[    1.994585] 0000:04:07.0: ttyS5 at MMIO 0xfe000000 (irq = 19) is a XR17D15X
[    2.001965] 0000:04:07.0: ttyS6 at MMIO 0xfe000200 (irq = 19) is a XR17D15X
[    2.009372] 0000:04:07.0: ttyS7 at MMIO 0xfe000400 (irq = 19) is a XR17D15X
[    2.016733] 0000:04:07.0: ttyS8 at MMIO 0xfe000600 (irq = 19) is a XR17D15X
  • Die fehlende PDC SSI version HW-REV.B+FW-2.2 deutet auf ein Problem mit der PDC hin
    • entweder PDC selbst (defekt / veraltete Version / inkompatibler ADC)
    • Verkabelung
    • serielle Schnittstelle innerhalb der MicroIOC
  • Ursache für die fehlerhafte Kommunikation mit der seriellen Schnittstelle kann auch ein fehlender Treiber sein. Dieser kann nur über eine http-Verbindung geladen werden, nicht über eine https-Verbindung:
<b>OK:</b>
[root@microioc~]# opkg update || opkg install kmod-scu-ctiserial
Downloading http://packages/opkg/el7/x86_64/Packages.
Updated list of available packages in /usr/lib/opkg/lists/gsi-arch.
Downloading http://packages/opkg/el7/all/Packages.
Updated list of available packages in /usr/lib/opkg/lists/gsi-all.
Package kmod-scu-ctiserial (3.10.101-03) installed in root is up to date.
List available drivers
opkg list | grep kmod
Check Adressbelegung serielle Schnittstellen

OK
root@<FEC-name>:dmesg | grep tty
[    0.000000] Command line: initrd=scuxl/current/initramfs panic=10 console=ttyS3,115200 8250.nr_uarts=20 BOOT_IMAGE=scuxl/current/kernel 
[    0.000000] Kernel command line: initrd=scuxl/current/initramfs panic=10 console=ttyS3,115200 8250.nr_uarts=20 BOOT_IMAGE=scuxl/current/kernel 
[    0.000000] console [ttyS3] enabled
[    1.919329] 00:04: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
[    1.945671] 00:05: ttyS2 at I/O 0x3e8 (irq = 10) is a 16550A
[    1.972038] 00:06: ttyS3 at I/O 0x2e8 (irq = 10) is a 16550A
[    1.998414] 00:07: ttyS4 at I/O 0x2c0 (irq = 10) is a 16550A
[    2.024823] 00:0f: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[    2.034455] 0000:04:07.0: ttyS5 at MMIO 0xfe700000 (irq = 19) is a XR17D15X
[    2.041828] 0000:04:07.0: ttyS6 at MMIO 0xfe700200 (irq = 19) is a XR17D15X
[    2.049211] 0000:04:07.0: ttyS7 at MMIO 0xfe700400 (irq = 19) is a XR17D15X
[    2.056563] 0000:04:07.0: ttyS8 at MMIO 0xfe700600 (irq = 19) is a XR17D15X
[   24.083838] 0000:04:07.0: ttyCTI0 at MMIO 0xfe700000 (irq = 19) is a XR17xx5x
[   24.093475] 0000:04:07.0: ttyCTI1 at MMIO 0xfe700200 (irq = 19) is a XR17xx5x
[   24.102557] 0000:04:07.0: ttyCTI2 at MMIO 0xfe700400 (irq = 19) is a XR17xx5x
[   24.112141] 0000:04:07.0: ttyCTI3 at MMIO 0xfe700600 (irq = 19) is a XR17xx5x
root@<FEC-name>:setserial -g /dev/ttyS[0..8]
[root@microioc~]# setserial -g /dev/ttyS0
/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4
[root@microioc~]# setserial -g /dev/ttyS1
/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3
[root@microioc~]# setserial -g /dev/ttyS2
/dev/ttyS2, UART: 16550A, Port: 0x03e8, IRQ: 10
[root@microioc~]# setserial -g /dev/ttyS3
/dev/ttyS3, UART: 16550A, Port: 0x02e8, IRQ: 10
[root@microioc~]# setserial -g /dev/ttyS4
/dev/ttyS4, UART: 16550A, Port: 0x02c0, IRQ: 10
[root@microioc~]# setserial -g /dev/ttyS5
/dev/ttyS5, UART: undefined, Port: 0x0000, IRQ: 19
[root@microioc~]# setserial -g /dev/ttyS6
/dev/ttyS6, UART: undefined, Port: 0x0000, IRQ: 19
[root@microioc~]# setserial -g /dev/ttyS7
/dev/ttyS7, UART: undefined, Port: 0x0000, IRQ: 19
[root@microioc~]# setserial -g /dev/ttyS8
/dev/ttyS8, UART: undefined, Port: 0x0000, IRQ: 19

NOK
dmesg | grep tty
[    0.000000] console [tty0] enabled
[    0.780225] 00:04: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
[    0.801057] 00:05: ttyS2 at I/O 0x3e8 (irq = 10) is a 16550A
[    0.821851] 00:06: ttyS3 at I/O 0x2e8 (irq = 10) is a 16550A
[    0.842663] 00:07: ttyS0 at I/O 0x2c0 (irq = 10) is a 16550A
[   24.016347] 0000:04:07.0: ttyCTI0 at MMIO 0xfe000000 (irq = 19) is a XR17xx5x
[   24.028275] 0000:04:07.0: ttyCTI1 at MMIO 0xfe000200 (irq = 19) is a XR17xx5x
[   24.040097] 0000:04:07.0: ttyCTI2 at MMIO 0xfe000400 (irq = 19) is a XR17xx5x
[   24.052005] 0000:04:07.0: ttyCTI3 at MMIO 0xfe000600 (irq = 19) is a XR17xx5x
  • Eine alternative Fehlerquelle ist das verwendete serielle Kabel. Es sollte das richtige sein. -> SD/LOBI/AOBI
  • (vor 2020: Möglicherweise ist auch die properties.ini-Datei die Fehlerursache. Es sollten keine Syntaxfehler enthalten sein. Es sollte der jeweils aktuelle Stand verwendet werden, z.B. inklusive Angaben für 'named positions' etc!!!)
SSI encoder comm / Potentiometer comm error

Other symptom: PDC SSI Version 1 and 2 not readable via FESA Explorer
  • PDC off
  • PDC not connected to MicroIOC (cables?)
  • PDC broken
Potentiometer comm error / PMAC comm error
  • 'old' PDCs may have an incompatible ADC version, serial connection errors become visible on console when mode is switched to SSI; motors can still be operated in PMAC mode (disadvantage: position unknown)
  • inside microIOC:
    • serial connection cable might not sit properly on two-lined plug socket
    • sometimes only reconnecting the plugs of the cables on the PCI-104-board helps
    • PCI-104 serial card might be broken
    • MicroIOC -internal cables, especially in older systems, might have an 'invisible corrosion' issue ("crevice corrosion"?!). It might help to simply reconnect the cables at their plug sockets.
    • cabling between PCI-104 card and connector on backside might have a defect
  • software configuration, /dev/ttyCTI0 appears as /dev/ttyCTI1 for an unknown reason
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 192.6.94.1 netmask 255.255.255.0 up
else
log "Device eth2 doesn't exist, dealing with old version M-Box (LCD LCM02), setting eth1 as PMAC's interface."
/sbin/ifconfig eth1 192.6.94.1 netmask 255.255.255.0 up
fi

[root@microioc~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:18:7D:A7:22:68
inet addr:140.181.168.12 Bcast:140.181.191.255 Mask:255.255.192.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
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:192.6.94.1 Bcast:192.6.94.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
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)
Memory:fe300000-fe400000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
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)
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, internal cables of microioc, misconfiguration?).
Axis Interlock / Amplifier Fault
  • Interlock-Stecker (2-polig Lemo am PDC Eingang des Kanals) zum Überbrücken des Interlock-Ausgangs
  • cable between MicroIOC and PMAC controller connected?
Amplifier Fault
  • 2023: may lead to an interlock which makes motor unusable remotely via DeviceControl
  • if the amplifier fault is the only error displayed per motor it could be that it can be removed by moving the motor locally via LocalControl


Software Troubleshooting

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
FESA/!DeviceControl/FESA Explorer: partial setting not allowed
  • [RdaException] FESA_13008 Partial setting not allowed:
    • set-rda3-c++ -d -p MoveToPosition -v / JAPC call: uebergebener Japc-Parameter: /!MoveToPosition#name
      uebergebener Wert: (String)

      [RdaException] FESA_13008 Partial setting not allowed. src/fesa-core/Server/ServerData.cpp:254
      • wrong/missing parameter: >set-rda3-c++ -d -p MoveToPosition -f positionName -v
        Sync SET completed: /!MoveToPosition
        RequestContext [selector=; filters=; data=]
Since 2023: How to upload FESA instances to the FESA database
/common/usr/fesa/bin/FESAClassUploader -s pro subset/DeviceData_MotorSlit_DU.instancesubset
Since 2023: how to upload a FEX zip file to the webserver
curl -u matthies:<PWD> -T /home/bel/matthies/lnx/workspaceMotionControl/MotorSlit_DU/src/test/kyr3ci01/MotorSlit_DU_kyr3ci01.zip https://websvcdev.acc.gsi.de/groups/fesa/fex/

LCDisplay does not work

  • lcd software did not start. Check content of /common/export/nfsinit//60-slits-lcd:
#!/bin/sh
. /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
  • check whether built version of 'lcd' matches the OS image libraries
  • check with ldd whether all the required libraries are available on the OS, e.g. the slits driver etc
  • 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

Motor/Slit Moves

Motors move in one direction only, no matter the software settings or the connected motor / PDC
  • check cable between motor and PDC, wrong pins might be connected
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 LocalControl, but not via DeviceControl
  • step motor system is probably fine
Motors don't move via DeviceControl
  • no Local Control GUI instance should be connected to the stepper motor system in local control mode. Either switch to remote mode or wait 5 min until this happens automatically.
Motors don't move via DeviceControl and are in an outer position
  • Motors may be in outer end position (check Status). In this case it may happen that motors are not moveable anymore in remote mode. A workaround is to switch the system to local mode and move the motor manually out of its impractical position. (observed on FRS and S-FRS systems)
  • the motor configuration should be checked, especially the outer limits, the offsets, the position tolerances; perhaps a misconfiguration leads to the observed effect
Motor Pair / Slit does not move - no error message
  • one (or both) motors may be in an outer end position (check Status). In this case it may happen that motors are not moveable anymore in remote mode. A workaround is to switch the system to local mode and move the motors manually out of their impractical position. (observed S-FRS systems)
  • technically it is possible that the motor pair is not able to be moved to the center position / width because inner/outer limits are/will be reached. Try other settings or move the motors separately. No error is issued in this case.
Motors both in inner/outer HW/SW end position at the same time
  • sure sign that no motor hardware is connected, cable not connected, connection between motor and PMAC controller interrupted, possible symptom: motor LED off on MicroIOC
  • check, whether serial cables are connected according to motor configuration
Motor moves in one direction only, no matter what
  • pins might be wrongly connected in cable between motor and PDC (the self-manufactured ones)
  • or, there could also be a connector issue on the motor connection side
  • wrong software configuration settings (limits, direction, etc.)
Motors move in opposite direction
  • software configuration: pulse polarity (negative/positive)
Attempting to move a motor pair via FESA Explorer / DeviceControl: "FESA_10016 Invalid value: '0.0500..0003" not in range '[0; 0.005499..97]'
  • software settings misconfiguration??? Check settings in LocalControl GUI; inner and outer limit settings must be defined properly and should not be mixed up!
  • check: inner/outer limits, offsets, position tolerances
  • invalid motor positions, inability to move the motor pair???
LocalControl GUI: actual position cannot be displayed on motor drive tab (-> N/A)
  • software configuration: SSI encoder type selected?
  • cables (axis) between MicroIOC and PDC not properly connected?
LocalControl GUI: actual and set positions don't match
  • software configuration:
    • limit configuration?
    • motor counts
    • potentiometer length
    • steps per mm
    • offsets
    • position tolerances
  • hardware
    • pin connections?
    • cable?

MicroIOC -related

MicroIOC cannot be turned on anymore: fuse

Symptom: MicroIOC cannot be switched on anymore.

Check ' T3,15' fuse. An 'F'-one might do as well.
LEDs on MicroIOC
  Translation Color Glow  
GF general fault red

off: all is fine

steady: probably some error somewhere

blinks: if any motor LED is blinking

 
Motor 1-8   red

off: all is fine

blink: probably some error somewhere (any limit set, position tolerance, fatal following error, amplifier fault, overheat, axis interlock, potentiometer reference error, middle switch)

 
See DOC-microIOC-MBOX-PDC-UserManual.pdf, p. 25
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 . Blocked memory segments can be remove with ipcrm -m .

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

X-Port / m64 / remote access

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.
Further information on X-Port handling

https://www-acc.gsi.de/wiki/Frontend/MicroIOC#Xport_Management_40for_remote_reset_41
Reset SBC/PMAC via X-Port

DOC-microIOC-MBOX-PDC-UserManual.pdf, p. 14 "(hard reset) by setting RESET switch to 1 for more than 3 seconds. XPORT resets SBC and PMAC"


WR-Timing-related errors

SAFTD:ERROR | TIM_SYNC:DIAG_UNKNOWN | TIM_LOCK:DIAG_UNKNOWN
matthies@asl749 ~ $ sss fel9OI7
Enter passphrase for key '/home/bel/matthies/lnx/.ssh/id_rsa':
Creating commands: ll, la, cdf, cdi, cdt, diag, inst
can't open connection to device dev/wbm0 (system failure)
eb-info: dev/wbm0: system failure
can't open connection to device dev/wbm0 (system failure)
expr: syntax error
expr: syntax error-FEC status: SAFTD:ERROR | TIM_SYNC:DIAG_UNKNOWN | TIM_LOCK:DIAG_UNKNOWN
FEC uptime: 15 min, 1 users, load average: 0.06, 0.02, 0.03
DU running: No daemon with DU running.
FPGA specs: Not available.
SAFT build: fallout-v6.2.0 (git-hash: d95c321)
NFS link : fel9OI7 (/opt/nfsinit/fel9OI7)
OS release: GSI embedded release 7 (build 2021-10-26)-
Aborted
ScuBus Tag: Error reading tag configuration. Init links could be corrupted.

[root@fel9OI7 ~]# saft-ctl tr0 -i
terminate called after throwing an instance of 'std::runtime_error'
 what(): Cannot connect to socket. Possible reasons: all sockets busy, saftd not running, or wrong socket permissions
Aborted
FESA device-instance configuration:
NO FTRN in global device ("false")
TriggeredEC, AcquisitionUpdateEC nicht in device-configuration mappen (nichts mit Timing-Configuration, nur Timer-gesteuerte Eventkonfigurationen verwenden)
  • check WR switch connection
  • check WR switch port (ACO-TG)
ERROR: Cannot connect to socket. Possible reasons: all sockets busy, saftd not running, or wrong socket permissions Aborted

Creating commands: ll, la, cdf, cdi, cdt, diag, inst can't open connection to device dev/wbm0 (system failure)
eb-info: dev/wbm0: system failure
can't open connection to device dev/wbm0 (system failure)
expr: syntax error
expr: syntax error
-
FEC status: SAFTD:ERROR | TIM_SYNC:DIAG_UNKNOWN | TIM_LOCK:DIAG_UNKNOWN FEC uptime: 15 min, 1 users, load average: 0.06, 0.02, 0.03 DU running: No daemon with DU running.
-
FPGA specs: Not available.
SAFT build: fallout-v6.2.0 (git-hash: d95c321) NFS link : fel9017 (/opt/nfsinit/fel9017) OS release: GSI embedded release 7 (build 2021-10-26)
-
Aborted
ScuBus Tag: Error reading tag configuration. Init links could be corrupted.

[root@fel9017 ~]# saft-ctl tr0 -i
terminate called after throwing an instance of 'std::runtime_error'
what(): Cannot connect to socket. Possible reasons: all sockets busy, saftd not running, or wrong socket permissions Aborted
[root@fel9017 ~]#


Misc

Fix OpenJDK Java 11 home on Robert Boywitt's Laptop
[rboywitt@sdanbg011 local-control]$ pwd
 /home/rboywitt/local-control
 [rboywitt@sdanbg011 local-control]$ cat run_local_control_j11.sh 
 #!/bin/bash
 
 export JAVA_HOME="/usr/lib/jvm/java-11-openjdk-11.0.14.1.1-1.el7_9.x86_64"
 
 export PATH=$JAVA_HOME/bin:$PATH
 
 echo $JAVA_HOME
 
 echo "Launch local control GUI"
 java -jar local-control-j11_2.2.jar &
 
 [rboywitt@sdanbg011 local-control]$

Quick Testing

With these python scripts it is possible to work with FESA software operated stepper motors.

https://git.acc.gsi.de/matthies/StepperMotor_python.git

Anschlüsse

SSI-Gerät

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

Potentiometer

Um ein Potentiometer anschließen zu können 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//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.

Paths

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// /opt/fesa/du Location of FESA software
/common/export/fesa/local//MotorSlit_DU/ /opt/fesa/nfs/local//MotorSlit_DU/ Location of FESA software including start script
/common/export/nfsinit// /opt/nfsinit//  
/common/fesadata/data//slits-conf/ /etc/slits-conf/ Stepper motor software configuration files
     
     

Configuration

  • PXE-Verzeichnis, Links für 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
    • Anleitungen zum Einbau des WR Timing Receivers: microIOC_user_manual_19_FTRN_Einbau_6.21.pdf, S. 67-69

    • Entfernen des Reset-Kabels zum PMAC-Controller: microIOC-MBOX-FAIR_repair_Manual.pdf, S. 7 ff

    • Wichtig: MicroIOC -interne Flachbandkabel an PCI-104-Board fuer RS 485-Kommunikation mit PMAC-Controller via ADC/SSI nicht vertauschen!

MicroIOC Backplane PCI-104 Board
RS xyz-plug jumper plug
ADC/SSI 1 JA P1
ADC/SSI 2 JB P2
ADC/SSI 3 JC P3
ADC/SSI 4 JD P4

Firmware Updates

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

WR Timing

Prerequisites

  • 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

  • Set SettingTriggered -Property via fex or pdex:
user@asl74x slits-conf $ pdex YR09DSBHA SettingTriggered position=0.033 -sp2
NOMEN  = YR09DSBHA (MotorSlit_DU.yr09ci01 | Motor)
TIMDOM = CRYRING_RING (210)
|
SettingTriggered
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

Troubleshooting

  • 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

Details

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 192.168.1.1/24, and the mbox's IP is 192.168.1.100.

The image can be found here:

https://cloud.cosylab.com/s/MNDzCct8awyBgqz

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

Möglich 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.

Backup

./upload -ip 192.6.94.5 -a /backup_pmac.txt

Update

./sendfile -ip 192.6.94.5 -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/
done
for i in pmac/genericSlits.pmac pmac/pmacProperties.ini; do
install -m 644 /opt/$NAME/$ARCH/bin/$i /usr/bin/
done

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)

How to clone a USB boot stick

Create image from USB stick

sudo dd if=/dev/sdb of=/path/to/image/mbox-offline/mbox_usb_clone.img bs=4M status=progress

Write image to USB stick

sudo dd if=/path/to/image/mbox-offline/mbox_usb_clone.img of=/dev/sdb bs=4M status=progress

Information

USB boot stick from 29.07.2020

Linux

[root@mbox ~]# uname -a
Linux mbox 3.10.101/rt111-scu03 #1 SMP PREEMPT RT Fri Jun 7 15:36:56 CEST 2019 x86_64 GNU/Linux
[root@mbox ~]# cat /proc/version
Linux version 3.10.101-rt111-scu03 (handel@asl741) (gcc version 4.8.5 20150623) (GCC) ) #1 SMP PREEMPT RT Fri Jun 7 15:36:56 CEST 2019
[root@mbox ~]# cat /etc/os-release
GSI embedded release 7 (build 2019-08-12)

Installations

Where What
/opt/slits/ slits.sh
/opt/slits/x86_64/bin/ lcd
lcMonitor
server
pmacConsole
upload
sendfile
multithreadedStressTest
moveStressTest
/opt/slits/x86_64/lib/ libslits.so
libslits.so.0.8.20
/opt/slits/x86_64/conf/ data.txt
lcd.ini
lcmonitor.ini
pmacProperties.ini
properties.ini
slits-server.ini
/opt/slits/x86_64/utils/ set485
/opt/slits/x86_64/modules/ cti_serial_core.ko
cti_8250_pci.ko
/etc/slits-conf/ data.txt
lcd.ini
lcmonitor.ini
pmacProperties.ini
properties.ini
slits-server.ini
/etc/init/boot.d/ 01-hostname
01-ldconfig
02-adapt-microioc
04-network
05-network
10-syslogd
20-console
20-opkg
30-hostnomen
30-timing-rte
40-slits
50-fesa
60-dropbear
60-net-snmp
60-slits-lcd
/opt/timing-rte timing-rte.sh
/opt/timing-rte/x86_64/local
/opt/timing-rte/x86_64/lib64
/opt/timing-rte/x86_64/lib
div. Timing-Bibliotheken
/opt/fesa/mbox/MotorSlit_DU DeviceData _MotorSlit_DU.instance
run.sh
messagesLab.cfg
messages.cfg
log.cfg
libsaftlib.so.4
libsaftlib.a
libsaftcommon.so.4
libsaftcommon.a
libsaftbus.so.4
libsaftbus.a
fesa.fec.cfg
fesa.aslCluster.cfg
cmw.cfg
MotorSlit_DU_M
run.sh cd /opt/nfs/common/export/fesa/local/mbox/MotorSlit_DU killall MotorSlit _DU_M ./MotorSlit_DU_M \ -instance DeviceData _MotorSlit_DU.instance \ -cfgcmw
   
   
   

Stepper Motor Software Processes and Services

daemon -n lcd -U -O daemon.debug -E daemon.err -- /usr/bin/lcd -c /etc/slits-conf/lcd.ini  
/usr/bin/lcd -c /etc/slits-conf/lcd.ini  
daemon -n lcMonitor -U -O daemon.debug -E daemon.err -- /usr/bin/lcMonitor -c /etc/slits-conf/lcmonitor.ini  
/usr/bin/lcMonitor -c /etc/slits-conf/lcmonitor.ini  
daemon -n server -U -O daemon.debug -E daemon.err -- /usr/bin/server -c /etc/slits-conf/slits-server.ini  
/usr/bin/server -c /etc/slits-conf/slits-server.ini  
daemon -n MotorSlit_DU -r -O MotorSlit _DU.out -E MotorSlit _DU.err --env=CMW_DIRECTORY_CLIENT_SERVERLIST=cmwdev00a.acc.gsi.de:5021 -U /opt/nfsinit/... nicht benoetigt!
/sbin/syslogd -R 140.181.134.178 nicht benoetigt!
   
   

How to prepare an OS Image

https://git.acc.gsi.de/Cosylab/mbox-offline

https://www-acc.gsi.de/wiki/Frontend/EmbeddedRamdiskUSB - not working

https://www-acc.gsi.de/wiki/Frontend/Intern/EmbeddedRamdiskUSB - not working

https://www-acc.gsi.de/wiki/Trash/FrontendCreateDebianUSBStick

https://www.unixmen.com/edit-iso-files-using-mkisofs-in-linux/

https://www.linux.com/news/how-modify-raw-disk-image-your-custom-linux-distro/


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 as the name of the MicroIOCs:
meaning directories on
asl-cluster microioc
init-directory /common/export/nfsinit// /opt/nfsinit//
data-directory /common/fesadata/data// /opt/fesa/data/

Set-Up of General Environment

Into the init-directory the script _slits has to be copied, which has to be executed after the other init scripts (should have a high leading number , like =80_slits
  • in /common/export/nfsinit//copy
    • = _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//... . 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//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//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(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...
Done!!
[root@tstci05 pmac]# ./sendfile genericSlits.pmac
Establishing communication with PMAC...OK
Sending file to PMAC...
Done!!

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 192.6.94.5
Connected to PMAC at 192.6.94.5.
$$$
STR: '$$$'
 $00 
^C
[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

Creating commands: ll, la, cdf, cdi, cdt, diag, inst can't open connection to device dev/wbm0 (system failure)

eb-info: dev/wbm0: system failure

can't open connection to device dev/wbm0 (system failure)

expr: syntax error

expr: syntax error

-

FEC status: SAFTD:ERROR | TIM_SYNC:DIAG_UNKNOWN | TIM_LOCK:DIAG_UNKNOWN FEC uptime: 15 min,1 users,load average: 0.06, 0.02, 0.03 DU running: No daemon with DU running.

-

FPGA specs: Not available.

SAFT build: fallout-v6.2.0 (git-hash: d95c321) NFS link: fel9017 (/opt/nfsinit/fel9017) OS release: GSI embedded release 7 (build 2021-10-26)

-

Aborted

ScuBus Tag: Error reading tag configuration. Init links could be corrupted.

[root@fel9017 ~]# saft-ctl tr0 -i

terminate called after throwing an instance of 'std::runtime_error'

what():Cannot connect to socket. Possible reasons: all sockets busy, saftd not running, or wrong socket permissions Aborted

[root@fel9017 ~]#
I Attachment Action Size Date Who Comment
StepperMotorSystem_SoftwareImprovement_2019_V6.pdfpdf StepperMotorSystem_SoftwareImprovement_2019_V6.pdf manage 272 K 16 Mar 2022 - 10:30 SolveighMatthies FAIR stepper motor system software improvements wishlist 2019 (V6, final version)
Topic revision: r159 - 18 Mar 2024, 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