1-second UPS (persistent data)
CX51x0
72
Version: 1.9
8.5.2
PlcAppSystemInfo
Each PLC provides a global instance of this type named '_AppInfo'.
The corresponding namespace is 'TwinCAT_SystemInfoVarList'. For example this has to be added inside a
library.
TYPE PlcAppSystemInfo
STRUCT
ObjId : OTCID;
TaskCnt : UDINT;
OnlineChangeCnt : UDINT;
Flags : DWORD;
AdsPort : UINT;
BootDataLoaded : BOOL;
OldBootData : BOOL;
AppTimestamp : DT;
KeepOutputsOnBP : BOOL;
TComSrvPtr : ITComObjectServer;
AppName : STRING(63);
ProjectName : STRING(63);
END_STRUCT
END_TYPE
ObjId
object ID of the PLC project instance
TaskCnt
The number of tasks in the actual runtime system.
OnlineChangeCnt
The number of online changes made since the last complete
download.
Flags
Reserved for future use
AdsPort
ADS port of PLC application
BootDataLoaded
PERSISTENT variables: LOADED (without error)
OldBootData
PERSISTENT variables: INVALID (the back-up copy was loaded,
since no valid data was present)
AppTimestamp
Date and time of application start
KeepOutputsOnBP
The flag can be set to avoid that the outputs are zero-filled if a
breakpoint is reached. The task keeps running. Only the execution
of PLC code is interrupted.
TComSrvPtr
Pointer to TcCOM Object Server
AppName
TwinCAT generated name containing the port number.
ProjectName
The name of the PLC project.
Differences to TwinCAT 2
If the variable runTimeNo was used under TwinCAT 2, the program code has to be changed.
Example
•
Usage in TwwincAT 2
: nPlcAdsPort := 801 + (SystemInfo.runTimeNo - 1) * 10;
•
Usage in TwinCAT 3
: nPlcAdsPort := _AppInfo.AdsPort;
All manuals and user guides at all-guides.com