GETSYSINFOPLCopen motion icon

FunctionClosedA function calculates a result according to the current value of its inputs. A function has no internal data and is not linked to declared instances. - Returns system information.

Inputs

INFO : DINT  Identifier of the requested information

Outputs

Q : DINT     Value of the requested information or 0 if error

Remarks

The INFO parameter can be one of the following predefined values:

Value Definition
_SYSINFO_TRIGGER_MICROS programmed cycle time in micro-seconds
_SYSINFO_TRIGGER_MS programmed cycle time in milliseconds
_SYSINFO_CYCLETIME_MICROS duration of the previous cycle in micro-seconds
_SYSINFO_CYCLETIME_MS duration of the previous cycle in milliseconds
_SYSINFO_CYCLEMAX_MICROS maximum detected cycle time in micro-seconds
_SYSINFO_CYCLEMAX_MS maximum detected cycle time in milliseconds
_SYSINFO_CYCLESTAMP_MS time stamp of the current cycle in milliseconds (OEMClosed"Original equipment manufacturer" A term that refers to containment-based re-branding, namely where one company uses a component of another company within its product, or sells the product of another company under its own brand. OEM refers to the company that originally manufactured the product dependent)
_SYSINFO_CYCLEOVERFLOWS number of detected cycle time overflows
_SYSINFO_CYCLECOUNT counter of cycles
_SYSINFO_APPSTAMP compiling date stamp of the application
_SYSINFO_CODECRC CRCClosed"Cyclic redundancy check" A CRC is a type of function that takes as input a data stream of any length and produces as output a value of a certain fixed size. The term CRC is often used to denote either the function or the function's output. A CRC can be used as a checksum to detect accidental alteration of data during transmission or storage of the application code.
_SYSINFO_DATACRC CRC of the application symbols.
_SYSINFO_FREEHEAP Available space in memory heap (bytes)
_SYSINFO_DBSIZE Space used in RAM (bytes)
_SYSINFO_ELAPSED Seconds elapsed since startup
_SYSINFO_CHANGE_CYCLE Indicates a cycle just after an On Line Change
_SYSINFO_WARMSTART Non zero if RETAIN variables were loaded at the last start
_SYSINFO_NBLOCKED Number of locked variables
_SYSINFO_NBBREAKPOINTS Number of installed breakpoints
_SYSINFO_BIGENDIAN Non zero if the runtimeClosedIn computer science, runtime (or run-time) describes the operation of a computer program, the duration of its execution, from beginning to termination (compare compile time). Within KAS, runtime also refers to the virtual machine that manage the program written in a computer language while it is running processor is big endian
_SYSINFO_DEMOAPP Non zero if the application was compiled in DEMO mode

In FFLD language, the operation is executed only if the input rung (EN) is TRUE. The output rung (ENO) keeps the same value as the input rung.

In ILClosed"Instruction list" This is a low-level language and resembles assembly, the input must be loaded in the current result before calling the function.

ST Language

Q := GETSYSINFO (INFO);

FBD Language

FFLD Language

(* The function is executed only if EN is TRUE *)
(* ENO keeps the same value as EN *)

IL Language:

Op1: LDClosed"Ladder diagram" Ladder logic is a method of drawing electrical logic schematics. It is now a very popular graphical language for programming Programmable Logic Controllers (PLCs). It was originally invented to describe logic made from relays. The name is based on the observation that programs in this language resemble ladders, with two vertical "rails" and a series of horizontal "rungs" between them  INFO
     GETSYSINFO
     ST  Q