A Brief Introduction to TwinCAT PLC Control If Single cycle has been chosen, then the execution is stopped after each cycle. Change values online During operations variables can be set once at a certain value (write value) or also described again with a certain value after each cycle (force value). In online mode one also can change the variable value by double click on the value. By that boolean variables change from TRUE to FALSE or the other way round, for each other types of variables one gets the dialog Write Variable xy , where the actual value of the variable can be edited. Monitoring In Online mode, all displayable variables are read from the controller and displayed in real time.
You will find this display in the declarations and program editor; you can also read out current values of variables in the watch and recipe manager and in a visualization. If variables from instances of function blocks are to be monitored, the corresponding instance must first be opened. In monitoring VAR_IN_OUT variables , the de-referenced value is output. With a simple click on the cross or a double-click on the line, the display is either expanded or truncated. In monitoring pointers, both the pointer and the de-referenced value are output in the declaration portion. In the program portion, only the pointer is output:
+ --pointervar = ' ' POINTERs in the de-referenced value are also displayed accordingly. With a simple click on the cross or a double-click on the line, the display is either expanded or truncated. Monitoring of ARRAY components: In addition to array components indexed by a constant, components are also displayed which are indexed by a variable: anarray[1] = 5 anarray[i] = 1 If the index consists of an expression (e.g. [i+j] or [i+1]), the component can not be displayed. Simulation During the simulation the created PLC program is not processed in the PLC, but rather in the calculator on which TwinCAT PLC Control is running. All online functions are available.
That allows you to test the logical correctness of your program without PLC hardware. Simulation mode is only available for the Buscontroller (BCxx00). If you use TwinCAT on the PC (Code generation i386) you can simulate the program direct in the runtime system without having physical I/O. Log The log chronologically records user actions, internal processes, state changes and exceptions during Online mode processing. It is used for monitoring and for error tracing. 2.2.9 IEC 61131-3 The standard IEC 61131-3 is an international standard for programming languages of Programmable Logic Controllers.
The programming languages offered in TwinCAT PLC Control conform to the requirements of the standard. According to this standard, a program consists of the following elements: Structures POUs Global Variables Literature related to IEC 61131-3: Flavio Bonifatti et al.: IEC 1131-3 Programming Methology, Seyssins: CJ International, 1997. ISBN 2-9511585-0-5 Karl-Heinz John, Michael Tiegelkamp: Iec 61131-3 Programming Industrial Automation Systems, Berlin: Springer-Verlag, 2001. ISBN 3-540677526 TX1200 30 Version: 1.3