160 HB700 | CPU | PMC921xEx | en | 24-04
Deployment CPU iC921xM-FSoE
System variables and status information > System variables
Function blocks
TLS_SOCKET_2
UDP_SOCKET_2
Device state
Partition
■ With the TLS_SOCKET_2 function block, you open and close IP sockets for IP com-
munication via TCP (Transmission Control Protocol - not secure or TLS (Transport
Layer Security - secure). You can control this with the START_TLS input parameter
(FALSE: TCP, TRUE: TLS).
■ Use the UDP_SOCKET_2 block to open and close IP sockets for IP communication
via UDP (User Datagram Protocol).
■ You can retrieve the number of open IP sockets using the following system variables:
System variable Type - description
IP_ACTIVE_SOCKETS UINT - Number of TCP/UDP sockets opened with the
TLS_SOCKET_2 and UDP_SOCKET_2
function blocks.
TLS_ACTIVE_SOCKETS UINT - Number of TLS sockets opened with the TLS_SOCKET
function block.
■ The system variable DEVICE_STATE is a system variable organized as a data struc-
ture.
■ You can use the DEVICE_STATE system variable to retrieve various information about
the device status of the CPU.
System variable Type - description
DEVICE_STATE DEVICE_STATE_X152_TYPE - data structure
BOARD_TEMPERATURE SINT - temperature inside the housing (in °C).
reserved1 BOOL - reserved
reserved2 USINT - reserved
CPU_LOAD_ALL_CORES USINT - average current utilization of all processor cores (in %).
CPU_LOAD_PER_CORE CPU_LOAD_PER_CORE_ARRAY - Information on the utilization of
each processor core.
[1] USINT - current utilization of processor core 1 (in %).
[2] USINT - current utilization of processor core 2 (in %).
■ The system variable USER_PARTITION is a system variable organized as a data
structure.
■ You can use the USER_PARTITION system variable to retrieve various information
and memory statistics on the user partition (overlay file system).
■ The partition can be on the external Yaskawa SD card or on the internal memory.
■ The memory is organized in blocks.
■ A block has a constant, fixed size and a file always uses one or more blocks.
■ A certain number of blocks are reserved in the Linux system for the root user. These
reserved blocks are only available for the root user and ensure his ability to act even if
the memory is occupied (e.g. for log outputs).
System variable Type - description
USER_PARTITION PARTITION_INFO - data structure
MEM_TOTAL ULINT - total memory of the partition in bytes (including reserved
blocks).
MEM_FREE ULINT - free, available memory in bytes (without reserved blocks).
MEM_USED ULINT - used memory in bytes (including reserved blocks).
MEM_USAGE ULINT - used memory in % (without reserved blocks).