TMA PXI¶
Chassis: PXIe-1086
CPU: PXIe-8880
Ethernet cards (x3): PXIe-8234
Compiled code¶
The code generated by the LSST_MainControllerPXI.lvproj must be copied to the /c/ni-rt/startup directory.
The content of /c/ni-rt/startup directory should look like this:
admin@TMA-PXI:/c/ni-rt/startup# ls -lh
total 65216
lrwxrwxrwx 1 admin administ 22 Apr 25 2020 README_File_Paths.txt -> /README_File_Paths.txt
drwxrwxr-x 2 admin administ 4.0K Dec 13 09:54 data/
drwxrwxr-x 3 admin administ 4.0K Dec 13 09:54 project/
drwxrwxr-x 2 admin administ 4.0K Jul 8 10:43 resource/
-rw-r--r-- 1 admin administ 296 Dec 13 09:54 startup.aliases
-rw-r--r-- 1 admin administ 63.7M Dec 13 09:54 startup.rtexe
admin@TMA-PXI:/c/ni-rt/startup#
Configuration files¶
This section explains the location and which are the configuration files needed for this PXI. All the same structure,
the main configuration files are stored in the /c/Configuration directory, here some are then inside other directories
to make things more clear. But each of them contains the specific configuration files for the code running in it.
TMA PXI /c/Configuration contents:
admin@TMA-PXI:/c/Configuration# ls -lR
.:
total 36
-rwxr-xr-x 1 lvuser ni 96 Jan 13 2025 ACWData.ini*
drwx--x--x 2 lvuser ni 4096 Jan 13 2025 CAR_TCP/
-rwxr-xr-x 1 lvuser ni 95 Jan 13 2025 CCWData.ini*
drwx--x--x 2 lvuser ni 4096 Jan 13 2025 DiscreteStateReporting/
drwx--x--x 2 lvuser ni 4096 Jan 13 2025 EIB/
drwx--x--x 2 lvuser ni 4096 Jan 13 2025 Safety/
-rwxr-xr-x 1 lvuser ni 272 Jan 13 2025 TMA_PXI_RT_MainConfig.ini*
drwx--x--x 2 lvuser ni 4096 Jan 13 2025 TekNSVs/
drwx--x--x 2 lvuser ni 4096 Jan 13 2025 axisManagementComm/
./CAR_TCP:
total 4
-rwxr-xr-x 1 lvuser ni 574 Jan 13 2025 CommandTCP_Config.xml*
./DiscreteStateReporting:
total 4
-rwxr-xr-x 1 lvuser ni 377 Jan 13 2025 DiscreteStateReporting.json*
./EIB:
total 24
-rwxr-xr-x 1 lvuser ni 11164 Jan 13 2025 multi_ext.txt*
./Safety:
total 40
-rwxr-xr-x 1 lvuser ni 23524 Jan 13 2025 Safety_ModBusMapping.txt*
-rwxr-xr-x 1 lvuser ni 10251 Jan 13 2025 Safety_ModBusMapping_ForReadWriteDefinition.txt*
-rwxr-xr-x 1 lvuser ni 128 Jan 13 2025 ServerConfig.ini*
./TekNSVs:
total 64
-rwxr-xr-x 1 lvuser ni 575 Jan 13 2025 ReceiverConfig.xml*
-rwxr-xr-x 1 lvuser ni 51311 Jan 13 2025 TekNSVvariablesToCreate.json*
-rwxr-xr-x 1 lvuser ni 542 Jan 13 2025 VariablesToSubscribe.json*
-rwxr-xr-x 1 lvuser ni 671 Jan 13 2025 VariablesToSubscribeClientConfig.xml*
./axisManagementComm:
total 4
-rwxr-xr-x 1 lvuser ni 707 Jan 13 2025 SenderConfig.xml*
admin@TMA-PXI:/c/Configuration#
Now each of the files is explained:
ACWData.ini: This file is automatically created if not existent, is used to store the active time of each of the ACW motors.
CCWData.ini: This file is automatically created if not existent, is used to store the active time of each of the CCW motors.
TMA_PXI_RT_MainConfig.ini: This file is automatically created if not existent, is used to define the general configuration. If empty the default values are used, this is the way it is created if nonexistent at boot.
./CAR_TCP/CommandTCP_Config.xml: This file is necessary at boot, here the configuration for the TCP server used to communicate with the MtMountOperationManager is specified. If not found at boot the code won’t startup.
./DiscreteStateReporting/DiscreteStateReporting.json: This file is necessary at boot, here the configuration for the discrete state reporting task is specified. If not found the system will start but it won’t be managing the events properly, so duplicated events for the CSC could appear.
./EIB/multi_ext.txt: This file could be placed at other location, but the setting
EIB config file paththat specifies the location must be updated accordingly../Safety/Safety_ModBusMapping.txt: This file is necessary at boot, here the configuration for the safety modbus mapping (shared variables between the PXI and the PILZ) is defined. If not found at boot the code won’t startup.
./Safety/Safety_ModBusMapping_ForReadWriteDefinition.txt: This file is necessary at boot, here the configuration for the safety variables inside the PXI is defined. If not found at boot the code won’t startup.
./Safety/ServerConfig.ini: This file is necessary at boot, here the configuration for the modbus communication is specified. If not found at boot the code won’t startup.
./TekNSVs/ReceiverConfig.xml: This file is necessary at boot, here the configuration for the TCP server that sends the TekNSV variables to the EUI is specified. If not found at boot the code won’t startup.
./TekNSVs/TekNSVvariablesToCreate.json: This file is necessary at boot, this file defines the TekNSV variables to create just after starting the server, this prevents errors at boot in the EUI when launched too early. If not found at boot the code won’t startup.
./TekNSVs/VariablesToSubscribe.json: This file is necessary at boot, this file defines the TekNSV variables to read from the AUX PXI. If not found at boot the code won’t startup.
./TekNSVs/VariablesToSubscribeClientConfig.xml: This file is necessary at boot, here the configuration for the TCP client to connect to the TekNSV server in the AUX PXI is defined. If not found at boot the code won’t startup.
./axisManagementComm/SenderConfig.xml: This file is necessary at boot, here the configuration for the TCP client to connect to the AXES PXI server to send the low level commands to it. If not found at boot the code won’t startup.
The default configuration for all the necessary files listed here can be found in this repo
inside the ESIFiles directory.
TMA_PXI_RT_MainConfig¶
As this is the one that has the general information a specific section is created. This file can have multiple sections,
as a *.ini file, it uses [sectionName] to divide the file.
logsection: here the configuration for the logging is defined.Path: the absolute path for the log files, it needs to have a main file name, a date is going to be added to it. Default value:
/home/lvuser/log/MainLogFile.logActive: a boolean “FALSE”/“TRUE” to disable/enable the logging. Default value: “TRUE”.
[Log] Path = "/home/lvuser/log/MainTMA.log" Active = "TRUE"
TCPCMDReciversection: here the configuration for the HHD (hand held device) behavior is defined.HHD Mode To Safety: this is a boolean value of TRUE/FALSE.
If TRUE (default), when the commander is the HHD this information is sent to the TMA IS (safety).
If FALSE, no information of the commander is sent to the TMA IS (safety).
[TCPCMDReciver] HHD Mode To Safety = FALSE
Settings Databasesection: here the configuration for connecting to the database is defined.IP: the ip for the MCC machine that contains the database. Default: “192.168.209.200”
Port: the port to connect to the database. Default: 3306
Timeout: the timeout for the connect in ms. Default: 500
ReadTimeout: the timeout for reading from the database in ms. Default: 500
UserName: the user name to connect to the database. Default: “root”
Password: the password to connect to the database. The default is the password for connecting to the database.
DataBase: the name of the database to connect to. Default: “lsst_settings”
[Settings Database] IP = "192.168.209.200" Port = 3306 Timeout = 500 ReadTimeout = 500 UserName = "root" Password = "defaultPasswordValue" DataBase = "lsst_settings"
IPssection: here the IPs for connecting to the different device targets are defined.tmaPxiIp: specify the IP of the TMA PXI here, if not defined the default value will be used. Default: 192.168.209.10.
auxPxiIp: specify the IP of the AUX PXI here, if not defined the default value will be used. Default: 192.168.209.11.
axesPxiIp: specify the IP of the AXES PXI here, if not defined the default value will be used. Default: 192.168.213.11.
tmaIsIp: specify the IP of the TMA IS (safety PLC CPU module) here, if not defined the default value will be used. Default: 192.168.180.10.
mcc: specify the IP of the MCC here, if not defined the default value will be used. Default: 192.168.209.200.
[IPs] tmaPxiIp = 139.229.171.3 auxPxiIp = 139.229.171.4 axesPxiIp = 139.229.171.26 tmaIsIp = 192.168.180.10 mcc = 139.229.171.6
Libraries¶
The shared libraries (SO) used by the code must be stored in /usr/local/lib.
TMA PXI /usr/local/lib contents:
admin@TMA-PXI:/usr/local/lib# ls -l
total 22020
-rwxr-xr-x 1 admin administ 7397619 Feb 15 2022 32libmysqlclient.so*
-rwxr-xr-x 1 admin administ 8538815 Feb 15 2022 64libmysqlclient.so*
-rwxr-xr-x 1 admin administ 1182414 Feb 15 2022 EIB8Driver32.so*
-rwxr-xr-x 1 admin administ 1182414 Feb 15 2022 libEIB8Driver.so*
-rwxr-xr-x 1 admin administ 11128 Feb 15 2022 libGetClocks.so*
-rwxr-xr-x 1 admin administ 77770 Feb 15 2022 libaci.so*
-rwxr-xr-x 1 admin administ 2273440 Feb 15 2022 libcrypto.so.1.0.0*
-rwxr-xr-x 1 admin administ 1324454 Feb 15 2022 libmlpi.so*
-rwxr-xr-x 1 admin administ 517200 Feb 15 2022 libssl.so.1.0.0*
-rwxr-xr-x 1 admin administ 7824 Feb 15 2022 lvimptsl.so*
admin@TMA-PXI:/usr/local/lib#