AUX PXI¶
Is not a NI (National Instruments) HW, it is a Beckhoff PC: C5210-0040 series (due to big waiting lists at NI)
It could be replaced by NI hardware, but is not as easy as replacing the AXEs one, this one may require some changes inside the cabinet to make room for it.
Compiled code¶
The code generated by the AuxSystemsController.lvproj must be copied to the /c/ni-rt/startup directory.
The content of /c/ni-rt/startup directory should look like this:
admin@AuxSystems:/c/ni-rt/startup# ls -lh
total 30996
lrwxrwxrwx 1 admin administ 22 Apr 25 2020 README_File_Paths.txt -> /README_File_Paths.txt
drwxrwxr-x 2 admin administ 4.0K Dec 5 18:46 data/
drwxrwxr-x 3 admin administ 4.0K Dec 5 18:46 project/
-rw-r--r-- 1 admin administ 101 Dec 13 09:56 startup.aliases
-rw-r--r-- 1 admin administ 30.3M Dec 13 09:56 startup.rtexe
admin@AuxSystems:/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.
AUX PXI /c/Configuration contents:
admin@AuxSystems:/c/Configuration# ls -lR
.:
total 40
drwxr-xr-x 2 admin administ 4096 Oct 2 06:40 CAR_TCP/
drwxr-xr-x 2 admin administ 4096 Oct 2 12:55 CpuTempMonitoring/
drwxr-xr-x 2 admin administ 4096 Oct 2 06:41 DiscreteStateReporting/
drwxr-xr-x 2 admin administ 4096 Oct 2 12:56 EthercatManagement/
drwxr-xr-x 2 admin administ 4096 Oct 2 06:45 ModbusTemperatureControllers/
drwxr-xr-x 2 admin administ 4096 Oct 2 06:48 OSS/
drwxr-xr-x 2 admin administ 4096 Oct 2 06:49 TEC/
-rw-r--r-- 1 admin administ 232 Oct 2 06:54 TMA_PXI_RT_MainConfig.ini
drwxr-xr-x 2 admin administ 4096 Oct 2 06:51 TekNSVs/
drwxr-xr-x 2 admin administ 4096 Oct 2 06:51 TelemetryConfig/
./CAR_TCP:
total 4
-rw-r--r-- 1 admin administ 565 Oct 2 06:40 CommandTCP_Config.xml
./CpuTempMonitoring:
total 4
-rw-r--r-- 1 admin administ 641 Oct 2 12:55 PxiCpuMonitoringConfiguration.json
./DiscreteStateReporting:
total 4
-rw-r--r-- 1 admin administ 373 Oct 2 06:41 DiscreteStateReporting.json
./EthercatManagement:
total 4
-rw-r--r-- 1 admin administ 62 Oct 2 12:56 config.json
./ModbusTemperatureControllers:
total 40
-rw-r--r-- 1 admin administ 138 Oct 2 06:42 TMA_AX_DZ_CBT_0001_config.ini
-rw-r--r-- 1 admin administ 833 Oct 2 06:43 TMA_AX_DZ_CBT_0001_mapping.txt
-rw-r--r-- 1 admin administ 137 Oct 2 06:43 TMA_AZ_PD_CBT_0001_config.ini
-rw-r--r-- 1 admin administ 833 Oct 2 06:44 TMA_AZ_PD_CBT_0001_mapping.txt
-rw-r--r-- 1 admin administ 137 Oct 2 06:44 TMA_AZ_PD_TRM_0001_config.ini
-rw-r--r-- 1 admin administ 833 Oct 2 06:44 TMA_AZ_PD_TRM_0001_mapping.txt
-rw-r--r-- 1 admin administ 137 Oct 2 06:44 TMA_EL_PD_CBT_0001_config.ini
-rw-r--r-- 1 admin administ 833 Oct 2 06:45 TMA_EL_PD_CBT_0001_mapping.txt
-rw-r--r-- 1 admin administ 137 Oct 2 06:45 TMA_EL_PD_CBT_0002_config.ini
-rw-r--r-- 1 admin administ 833 Oct 2 06:45 TMA_EL_PD_CBT_0002_mapping.txt
./OSS:
total 128
-rw-r--r-- 1 admin administ 54506 Oct 2 06:46 OSS_AdditionalFaultMonitoring.json
-rw-r--r-- 1 admin administ 626 Oct 2 06:47 OSS_CabinetTemperatureMonitoring.json
-rw-r--r-- 1 admin administ 43696 Oct 2 12:53 OSS_ModBusMapping.txt
-rw-r--r-- 1 admin administ 16537 Oct 2 06:47 OSS_ModBusMapping_ForReadWriteDefinition.txt
-rw-r--r-- 1 admin administ 123 Oct 2 06:48 ServerConfig.ini
./TEC:
total 44
-rw-r--r-- 1 admin administ 123 Oct 2 06:48 ServerConfig.ini
-rw-r--r-- 1 admin administ 13171 Oct 2 12:46 TEC_ModBusMapping.txt
-rw-r--r-- 1 admin administ 5662 Oct 2 12:46 TEC_ModBusMapping_ForReadWriteDefinition.txt
-rw-r--r-- 1 admin administ 14404 Oct 2 06:49 TopEndChillerCommandsAndMonitoringConfig.json
./TekNSVs:
total 68
-rw-r--r-- 1 admin administ 564 Oct 2 06:50 ReceiverConfig.xml
-rw-r--r-- 1 admin administ 54029 Oct 2 06:50 TekNSVvariablesToCreate.json
-rw-r--r-- 1 admin administ 521 Oct 2 06:50 VariablesToSubscribe.json
-rw-r--r-- 1 admin administ 658 Oct 2 06:51 VariablesToSubscribeClientConfig.xml
./TelemetryConfig:
total 48
-rw-r--r-- 1 admin administ 49011 Oct 2 06:51 TelemetryConfig.ini
admin@AuxSystems:/c/Configuration#
Now each of the files is explained:
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.
./ModbusTemperatureControllers/cabinetName_config.ini: This file is necessary at boot, here the configuration for the modbus communication for each temperature controller is specified. If not found at boot the code for the modbus controllers won’t startup.
./ModbusTemperatureControllers/cabinetName_mapping.txt: This file is necessary at boot, here the configuration for the modbus mapping (shared variables between the PXI and the temperature controllers) is defined. If not found at boot the code won’t startup.
./OSS/OSS_AdditionalFaultMonitoring.json: This file is necessary at boot, this file defines which variables are read for obtaining the detailed alarm list from the OSS system. Each variable has a list of bit in array format, this string values will be sent when the corresponding bit is active.
./OSS/OSS_CabinetTemperatureMonitoring.json: This file is necessary at boot, this file defines which variables are read for monitoring the temperature of the OSS cabinets. It also defines under which names are published to the event system.
./OSS/OSS_ModBusMapping.txt: This file is necessary at boot, here the configuration for the OSS modbus mapping (shared variables between the PXI and the OSS) is defined. If not found at boot the code won’t startup.
./OSS/OSS_ModBusMapping_ForReadWriteDefinition.txt: This file is necessary at boot, here the configuration for the OSS variables inside the PXI is defined. If not found at boot the code won’t startup.
./OSS/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.
./TEC/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.
./TEC/TEC_ModBusMapping.txt This file is necessary at boot, here the configuration for the TEC modbus mapping (shared variables between the PXI and the TEC) is defined. If not found at boot the code won’t startup.
./TEC/TEC_ModBusMapping_ForReadWriteDefinition.txt: This file is necessary at boot, here the configuration for the TEC variables inside the PXI is defined. If not found at boot the code won’t startup.
./TEC/TopEndChillerCommandsAndMonitoringConfig.json: This file is necessary at boot, here the commands TEC behavior is coded, a full explanation of the file can be found here
./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 TMA 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 TMA PXI is defined. If not found at boot the code won’t startup.
./TelemetryConfig/TelemetryConfig.ini: This file is necessary at boot, this file defines the input signals to read from the TMA PXI and the TekNSV variables to be published. 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/AuxTMA.log" Active = "TRUE"
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@AuxSystems:/usr/local/lib# ls -l
total 15588
-rwxr-xr-x 1 admin administ 7397619 Jul 12 10:46 32libmysqlclient.so*
-rwxr-xr-x 1 admin administ 8538815 Jul 12 10:46 64libmysqlclient.so*
-rwxr-xr-x 1 admin administ 11128 Jul 12 10:46 libGetClocks.so*
-rwxr-xr-x 1 admin administ 7824 Jul 12 10:46 lvimptsl.so*
admin@AuxSystems:/usr/local/lib#