Eio0000001438 04
Eio0000001438 04
Eio0000001438 04
EIO0000001438 03/2018
www.schneider-electric.com
The information provided in this documentation contains general descriptions and/or technical
characteristics of the performance of the products contained herein. This documentation is not
intended as a substitute for and is not to be used for determining suitability or reliability of these
products for specific user applications. It is the duty of any such user or integrator to perform the
appropriate and complete risk analysis, evaluation and testing of the products with respect to the
relevant specific application or use thereof. Neither Schneider Electric nor any of its affiliates or
subsidiaries shall be responsible or liable for misuse of the information contained herein. If you
have any suggestions for improvements or amendments or have found errors in this publication,
please notify us.
You agree not to reproduce, other than for your own personal, noncommercial use, all or part of
this document on any medium whatsoever without permission of Schneider Electric, given in
writing. You also agree not to establish any hypertext links to this document or its content.
Schneider Electric does not grant any right or license for the personal and noncommercial use of
the document or its content, except for a non-exclusive license to consult it on an "as is" basis, at
your own risk. All other rights are reserved.
All pertinent state, regional, and local safety regulations must be observed when installing and
using this product. For reasons of safety and to help ensure compliance with documented system
data, only the manufacturer should perform repairs to components.
When devices are used for applications with technical safety requirements, the relevant
instructions must be followed.
Failure to use Schneider Electric software or approved software with our hardware products may
result in injury, harm, or improper operating results.
Failure to observe this information can result in injury or equipment damage.
© 2018 Schneider Electric. All Rights Reserved.
2 EIO0000001438 03/2018
Table of Contents
Safety Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
About the Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Chapter 1 M241 System Variables . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.1 System Variables: Definition and Use . . . . . . . . . . . . . . . . . . . . . . . . . 12
Understanding System Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Using System Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
1.2 PLC_R and PLC_W Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
PLC_R: Controller Read-Only System Variables . . . . . . . . . . . . . . . . . 18
PLC_W: Controller Read/Write System Variables . . . . . . . . . . . . . . . . 23
1.3 SERIAL_R and SERIAL_W Structures . . . . . . . . . . . . . . . . . . . . . . . . 24
SERIAL_R[0...1]: Serial Line Read-Only System Variables . . . . . 25
SERIAL_W[0...1]: Serial Line Read/Write System Variables . . . . . 26
1.4 ETH_R and ETH_W Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
ETH_R: Ethernet Port Read-Only System Variables . . . . . . . . . . . . . 28
ETH_W: Ethernet Port Read/Write System Variables. . . . . . . . . . . . . . 33
1.5 TM3_MODULE_R Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
TM3_MODULE_R[0...13]: TM3 Modules Read-Only System
Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
1.6 TM3_BUS_W Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
TM3_BUS_W: TM3 Bus System Variables . . . . . . . . . . . . . . . . . . . . . . 35
1.7 PROFIBUS_R Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
PROFIBUS_R: PROFIBUS Read-Only System Variables . . . . . . . . . 36
1.8 CART_R Structure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
CART_R_STRUCT: Cartridge Read-Only System Variables . . . . . . . 37
Chapter 2 M241 System Functions . . . . . . . . . . . . . . . . . . . . . . . . . 39
2.1 M241 Read Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
GetImmediateFastInput: Read Input of an Embedded Expert I/O 41
GetRtc: Get Real Time Clock. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
IsFirstMastColdCycle: Indicate if this Cycle is the First MAST
Cold Start Cycle. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
IsFirstMastCycle: Indicate if this Cycle is the First MAST Cycle . 44
IsFirstMastWarmCycle: Indicate if this Cycle is the First MAST
Warm Start Cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
EIO0000001438 03/2018 3
2.2 M241 Write Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
PhysicalWriteFastOutputs: Write Fast Output of an Embedded
Expert I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
SetRTCDrift: Set Compensation Value to the RTC . . . . . . . . . . . . . 49
2.3 M241 User Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
DataFileCopy: Copy File Commands. . . . . . . . . . . . . . . . . . . . . . . . 52
ExecuteScript: Run Script Commands . . . . . . . . . . . . . . . . . . . . . . 55
2.4 TM3 Read Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
TM3_GetModuleBusStatus: Get TM3 Module Bus Status. . . . . . . . 58
TM3_GetModuleFWVersion: Get TM3 Module Firmware Version . . 59
TM3_GetModuleInternalStatus: Get TM3 Module Internal Status 60
Chapter 3 M241 PLCSystem Library Data Types . . . . . . . . . . . . . . . 63
3.1 PLC_RW System Variables Data Types . . . . . . . . . . . . . . . . . . . . . . . 64
PLC_R_APPLICATION_ERROR: Detected Application Error Status
Codes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
PLC_R_BOOT_PROJECT_STATUS: Boot Project Status Codes . . . . 67
PLC_R_IO_STATUS: I/O Status Codes. . . . . . . . . . . . . . . . . . . . . . . . 68
PLC_R_SDCARD_STATUS: SD Card Slot Status Codes . . . . . . . . . . 69
PLC_R_STATUS: Controller Status Codes . . . . . . . . . . . . . . . . . . . . . 70
PLC_R_STOP_CAUSE: From RUN State to Other State Transition
Cause Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
PLC_R_TERMINAL_PORT_STATUS: Programming Port Connection
Status Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
PLC_R_TM3_BUS_STATE: TM3 Bus Status Codes . . . . . . . . . . . . . . 74
PLC_W_COMMAND: Control Command Codes . . . . . . . . . . . . . . . . . 75
3.2 DataFileCopy System Variables Data Types . . . . . . . . . . . . . . . . . . . . 76
DataFileCopyError: Detected Error Codes. . . . . . . . . . . . . . . . . . . . . . 77
DataFileCopyLocation: Location Codes. . . . . . . . . . . . . . . . . . . . . . . . 78
3.3 ExecScript System Variables Data Types . . . . . . . . . . . . . . . . . . . . . . 79
ExecuteScriptError: Detected Error Codes . . . . . . . . . . . . . . . . . . . . . 79
3.4 ETH_RW System Variables Data Types . . . . . . . . . . . . . . . . . . . . . . . 80
ETH_R_FRAME_PROTOCOL: Frame Transmission Protocol Codes . 81
ETH_R_IP_MODE: IP Address Source Codes . . . . . . . . . . . . . . . . . . 82
ETH_R_PORT_DUPLEX_STATUS: Transmission Mode Codes . . . . . 83
ETH_R_PORT_IP_STATUS: Ethernet TCP/IP Port Status Codes . . . 84
ETH_R_PORT_LINK_STATUS: Communication Link Status Codes. . 85
ETH_R_PORT_SPEED: Communication Speed of the Ethernet Port
Codes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
ETH_R_RUN_IDLE: Ethernet/IP Run and Idle States Codes . . . . . . . 87
4 EIO0000001438 03/2018
3.5 TM3_MODULE_RW System Variables Data Types . . . . . . . . . . . . . . 88
TM3_ERR_CODE: TM3 Expansion Module Detected Error Codes . . 89
TM3_MODULE_R_ARRAY_TYPE: TM3 Expansion Module Read
Array Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
TM3_MODULE_STATE: TM3 Expansion Module State Codes . . . . . 91
TM3_BUS_W_IOBUSERRMOD: TM3 bus error mode . . . . . . . . . . . . 92
3.6 Cartridge System Variables Data Types . . . . . . . . . . . . . . . . . . . . . . . 93
CART_R_ARRAY_TYPE: Cartridge Read Array Type . . . . . . . . . . . . 94
CART_R_MODULE_ID: Cartridge Read Module Identifier . . . . . . . . . 95
CART_R_STATE: Cartridge Read State . . . . . . . . . . . . . . . . . . . . . . . 96
3.7 System Function Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
IMMEDIATE_ERR_TYPE: GetImmediateFastInput Read Input of
Embedded Expert I/O Codes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
RTCSETDRIFT_ERROR: SetRTCDrift Function Detected Error
Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Appendices ......................................... 101
Appendix A Function and Function Block Representation . . . . . . . . 103
Differences Between a Function and a Function Block . . . . . . . . . . . . 104
How to Use a Function or a Function Block in IL Language . . . . . . . . 105
How to Use a Function or a Function Block in ST Language . . . . . . . 109
Glossary ......................................... 113
Index ......................................... 121
EIO0000001438 03/2018 5
6 EIO0000001438 03/2018
Safety Information
Important Information
NOTICE
Read these instructions carefully, and look at the equipment to become familiar with the device
before trying to install, operate, service, or maintain it. The following special messages may appear
throughout this documentation or on the equipment to warn of potential hazards or to call attention
to information that clarifies or simplifies a procedure.
EIO0000001438 03/2018 7
PLEASE NOTE
Electrical equipment should be installed, operated, serviced, and maintained only by qualified
personnel. No responsibility is assumed by Schneider Electric for any consequences arising out of
the use of this material.
A qualified person is one who has skills and knowledge related to the construction and operation
of electrical equipment and its installation, and has received safety training to recognize and avoid
the hazards involved.
8 EIO0000001438 03/2018
About the Book
At a Glance
Document Scope
This document will acquaint you with the system functions and variables offered within the Modicon
M241 Logic Controller. The M241 PLCSystem library contains functions and variables to get
information from and send commands to the controller system.
This document describes the data type functions and variables of the M241 PLCSystem library.
The following knowledge is required:
Basic information on the functionality, structure, and configuration of the M241 Logic Controller.
Programming in the FBD, LD, ST, IL, or CFC language.
system variables (global variables).
Validity Note
This document has been updated for the release of TM3TI4D Add-on for SoMachine V4.3.
Related Documents
EIO0000001438 03/2018 9
Title of Documentation Reference Number
Modicon M241 Logic Controller Programming Guide EIO0000001432 (ENG);
EIO0000001433 (FRE);
EIO0000001434 (GER);
EIO0000001435 (SPA);
EIO0000001436 (ITA);
EIO0000001437 (CHS)
You can download these technical publications and other technical information from our website
at https://www.schneider-electric.com/en/download
WARNING
LOSS OF CONTROL
The designer of any control scheme must consider the potential failure modes of control paths
and, for certain critical control functions, provide a means to achieve a safe state during and
after a path failure. Examples of critical control functions are emergency stop and overtravel
stop, power outage and restart.
Separate or redundant control paths must be provided for critical control functions.
System control paths may include communication links. Consideration must be given to the
implications of unanticipated transmission delays or failures of the link.
Observe all accident prevention regulations and local safety guidelines.1
Each implementation of this equipment must be individually and thoroughly tested for proper
operation before being placed into service.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
1
For additional information, refer to NEMA ICS 1.1 (latest edition), "Safety Guidelines for the
Application, Installation, and Maintenance of Solid State Control" and to NEMA ICS 7.1 (latest
edition), "Safety Standards for Construction and Guide for Selection, Installation and Operation of
Adjustable-Speed Drive Systems" or their equivalent governing your particular location.
WARNING
UNINTENDED EQUIPMENT OPERATION
Only use software approved by Schneider Electric for use with this equipment.
Update your application program every time you change the physical hardware configuration.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
10 EIO0000001438 03/2018
Modicon M241 Logic Controller
M241 System Variables
EIO0000001438 03/2018
Chapter 1
M241 System Variables
Overview
This chapter:
gives an introduction to the system variables (see page 12)
describes the system variables (see page 18) included with the M241 PLCSystem library
EIO0000001438 03/2018 11
M241 System Variables
Section 1.1
System Variables: Definition and Use
Overview
This section defines system variables and how to implement them in the Modicon M241 Logic
Controller.
12 EIO0000001438 03/2018
M241 System Variables
Introduction
This section describes how system variables are implemented. System variables:
allow you to access general system information, perform system diagnostics, and command
simple actions.
are structured variables conforming to IEC 61131-3 definitions and naming conventions. You
can access the system variables using the IEC symbolic name PLC_GVL. Some of the PLC_GVL
variables are read-only (for example, PLC_R) and some are read/write (for example, PLC_W).
are automatically declared as global variables. They have system-wide scope and can be
accessed by any Program Organization Unit (POU) in any task.
Naming Convention
The system variables are identified by:
a structure name that represents the category of system variable. For example, PLC_R
represents a structure name of read-only variables used for the controller diagnostic.
a set of component names that identifies the purpose of the variable. For example,
i_wVendorID represents the controller vendor ID.
You can access the system variables by typing the structure name of the variables followed by the
name of the component.
Here is an example of system variable implementation:
VAR
myCtr_Serial : DWORD;
myCtr_ID : DWORD;
myCtr_FramesRx : UDINT;
END_VAR
myCtr_Serial := PLC_R.i_dwSerialNumber;
myCtr_ID := PLC_R.i_wVendorID;
myCtr_FramesRx := SERIAL_R[0].i_udiFramesReceivedOK;
NOTE: The fully qualified name of the system variable in the example above is
PLC_GVL.PLC_R.i_wVendorID. The PLC_GVL is implicit when declaring a variable using the
Input Assistant, but it may also be entered in full. Good programming practice often dictates the
use of the fully qualified variable name in declarations.
EIO0000001438 03/2018 13
M241 System Variables
14 EIO0000001438 03/2018
M241 System Variables
Introduction
This section describes the steps required to program and to use system variables in SoMachine.
System variables are global in scope, and you can use them in all the Program Organization Units
(POUs) of the application.
System variables do not need to be declared in the Global Variable List (GVL). They are
automatically declared from the controller system library.
NOTE: In the example above, after you type the structure name PLC_R., SoMachine offers a pop-
up menu of possible component names/variables.
EIO0000001438 03/2018 15
M241 System Variables
Example
The following example shows the use of some system variables:
VAR
myCtr_Serial : DWORD;
myCtr_ID : WORD;
myCtr_FramesRx : UDINT;
END_VAR
myCtr_Serial := PLC_R.i_dwSerialNumber;
myCtr_ID := PLC_R.i_wVendorID;
myCtr_FramesRx := SERIAL_R[0].i_udiFramesReceivedOK;
16 EIO0000001438 03/2018
M241 System Variables
Section 1.2
PLC_R and PLC_W Structures
Overview
This section lists and describes the different system variables included in the PLC_R and PLC_W
structures.
EIO0000001438 03/2018 17
M241 System Variables
Variable Structure
This table describes the parameters of the PLC_R system variable (PLC_R_STRUCT type):
18 EIO0000001438 03/2018
M241 System Variables
EIO0000001438 03/2018 19
M241 System Variables
20 EIO0000001438 03/2018
M241 System Variables
EIO0000001438 03/2018 21
M241 System Variables
NOTE: n/a means that there is no pre-defined Modbus address mapping for this system variable.
22 EIO0000001438 03/2018
M241 System Variables
Variable Structure
This table describes the parameters of the PLC_W system variable (PLC_W_STRUCT type):
NOTE: n/a means that there is no pre-defined %MW mapping for this system variable.
EIO0000001438 03/2018 23
M241 System Variables
Section 1.3
SERIAL_R and SERIAL_W Structures
Overview
This section lists and describes the different system variables included in the SERIAL_R and
SERIAL_W structures.
24 EIO0000001438 03/2018
M241 System Variables
Introduction
SERIAL_R is an array of 2 SERIAL_R_STRUCT type. Each element of the array returns diagnostic
system variables for the corresponding serial line.
For the M241 Logic Controller:
Serial_R[0] refers to the serial line 1
Serial_R[1] refers to the serial line 2
Variable Structure
This table describes the parameters of the SERIAL_R[0...1] system variables:
EIO0000001438 03/2018 25
M241 System Variables
Introduction
SERIAL_W is an array of 2 SERIAL_W_STRUCT type. Each element of the array resets the
SERIAL_R system variables for the corresponding serial line to be reset.
For the M241 Logic Controller:
Serial_W[0] refers to the serial line 1
Serial_W[1] refers to the serial line 2
Variable Structure
This table describes the parameters of the SERIAL_W[0...1] system variable:
NOTE: n/a means that there is no predefined %MW mapping for this system variable.
26 EIO0000001438 03/2018
M241 System Variables
Section 1.4
ETH_R and ETH_W Structures
Overview
This section lists and describes the different system variables included in the ETH_R and ETH_W
structures.
EIO0000001438 03/2018 27
M241 System Variables
Variable Structure
This table describes the parameters of the ETH_R system variable (ETH_R_STRUCT type):
28 EIO0000001438 03/2018
M241 System Variables
EIO0000001438 03/2018 29
M241 System Variables
30 EIO0000001438 03/2018
M241 System Variables
EIO0000001438 03/2018 31
M241 System Variables
NOTE: n/a means that there is no predefined %MW mapping for this system variable.
32 EIO0000001438 03/2018
M241 System Variables
Variable Structure
This table describes the parameters of the ETH_W system variable (ETH_W_STRUCT type):
NOTE: n/a means that there is no predefined %MW mapping for this system variable.
EIO0000001438 03/2018 33
M241 System Variables
Section 1.5
TM3_MODULE_R Structure
TM3_MODULE_R Structure
Introduction
The TM3_MODULE_R is an array of 14 TM3_MODULE_R_STRUCT type. Each element of the array
returns diagnostic system variables for the corresponding TM3 expansion module.
For the Modicon M241 Logic Controller:
TM3_MODULE_R[0] refers to the TM3 expansion module 0
...
TM3_MODULE_R[13] refers to the TM3 expansion module 13
Variable Structure
The following table describes the parameters of the TM3_MODULE_R[0...13] system variable:
NOTE: n/a means that there is no predefined %MW mapping for this system variable.
34 EIO0000001438 03/2018
M241 System Variables
Section 1.6
TM3_BUS_W Structure
TM3_BUS_W Structure
Variable Structure
This table describes the parameters of the TM3_BUS_W system variable (TM3_BUS_W_STRUCT
type):
EIO0000001438 03/2018 35
M241 System Variables
Section 1.7
PROFIBUS_R Structure
PROFIBUS_R Structure
Variable Structure
This table describes the parameters of the PROFIBUS_R system variable (PROFIBUS_R_STRUCT
type):
NOTE: n/a means that there is no predefined %MW mapping for this system variable.
36 EIO0000001438 03/2018
M241 System Variables
Section 1.8
CART_R Structure
CART_R Structure
Variable Structure
The following table describes the parameters of the CART_R_STRUCT system variable:
NOTE: n/a means that there is no predefined %MW mapping for this system variable.
EIO0000001438 03/2018 37
M241 System Variables
38 EIO0000001438 03/2018
Modicon M241 Logic Controller
M241, System Functions
EIO0000001438 03/2018
Chapter 2
M241 System Functions
Overview
This chapter describes the system functions included in the M241 PLCSystem library.
EIO0000001438 03/2018 39
M241, System Functions
Section 2.1
M241 Read Functions
Overview
This section describes the read functions included in the M241 PLCSystem library.
40 EIO0000001438 03/2018
M241, System Functions
Function Description
This function returns the current physical value of the input, which may be different from the current
logical value of that input. The value is read immedialely from the hardware at function call time.
Only I0 to I7 can be accessed through this function.
Graphical Representation
IL and ST Representation
To see the general representation in IL or ST language, refer to the chapter Function and Function
Block Representation (see page 103).
EIO0000001438 03/2018 41
M241, System Functions
Function Description
This function returns RTC time in seconds in UNIX format (time expired in seconds since January
1, 1970 at 00:00 UTC).
Graphical Representation
IL and ST Representation
To see the general representation in IL or ST language, refer to the chapter Function and Function
Block Representation (see page 103).
Example
The following example describes how to get the RTC value:
VAR
MyRTC : DINT := 0;
END_VAR
MyRTC := GetRtc();
42 EIO0000001438 03/2018
M241, System Functions
IsFirstMastColdCycle: Indicate if this Cycle is the First MAST Cold Start Cycle
Function Description
This function returns TRUE during the first MAST cycle after a cold start (first cycle after download
or reset cold).
Graphical Representation
IL and ST Representation
To see the general representation in IL or ST language, refer to the chapter Function and Function
Block Representation (see page 103).
Example
Refer to the function IsFirstMastCycle (see page 44).
EIO0000001438 03/2018 43
M241, System Functions
Function Description
This function returns TRUE during the first MAST cycle after a start.
Graphical Representation
IL and ST Representation
To see the general representation in IL or ST language, refer to the chapter Function and Function
Block Representation (see page 103).
Example
This example describes the three functions IsFirstMastCycle, IsFirstMastColdCycle and
IsFirstMastWarmCycle used together.
Use this example in MAST task. Otherwise, it may run several times or possibly never (an
additional task might be called several times or not called during 1 MAST task cycle):
VAR
MyIsFirstMastCycle : BOOL;
MyIsFirstMastWarmCycle : BOOL;
MyIsFirstMastColdCycle : BOOL;
END_VAR
MyIsFirstMastWarmCycle := IsFirstMastWarmCycle();
MyIsFirstMastColdCycle := IsFirstMastColdCycle();
MyIsFirstMastCycle := IsFirstMastCycle();
IF (MyIsFirstMastWarmCycle) THEN
(*This is the first Mast Cycle after a Warm Start: all variables are set
to their initialization values except the Retain variables*)
(*=> initialize the needed variables so that your application runs as
expected in this case*)
END_IF;
44 EIO0000001438 03/2018
M241, System Functions
IF (MyIsFirstMastColdCycle) THEN
(*This is the first Mast Cycle after a Cold Start: all variables are set
to their initialization values including the Retain Variables*)
(*=> initialize the needed variables so that your application runs as
expected in this case*)
END_IF;
IF (MyIsFirstMastCycle) THEN
(*This is the first Mast Cycle after a Start, i.e. after a Warm or Cold
Start as well as STOP/RUN commands*)
(*=> initialize the needed variables so that your application runs as
expected in this case*)
END_IF;
EIO0000001438 03/2018 45
M241, System Functions
IsFirstMastWarmCycle: Indicate if this Cycle is the First MAST Warm Start Cycle
Function Description
This function returns TRUE during the first MAST cycle after a warm start.
Graphical Representation
IL and ST Representation
To see the general representation in IL or ST language, refer to the chapter Function and Function
Block Representation (see page 103).
Example
Refer to the function IsFirstMastCycle (see page 44).
46 EIO0000001438 03/2018
M241, System Functions
Section 2.2
M241 Write Functions
Overview
This section describes the write functions included in the M241 PLCSystem library.
EIO0000001438 03/2018 47
M241, System Functions
Function Description
This function writes a physical state to the Q0 to Q3 outputs at function call time.
Graphical Representation
IL and ST Representation
To see the general representation in IL or ST language, refer to the chapter Function and Function
Block Representation (see page 103).
NOTE: Only the first 4 bits of the returned value are significant and used as a bit field to indicate if
the output is written.
If the bit corresponding to the output is 1, the output is written successfully.
If the bit corresponding to the output is 0, the output is not written because it is already used by an
expert function.
If the bit corresponding to the output is 0b1111, all of the 4 outputs are written correctly.
If the bit corresponding to the output is 0b1110, Q0 is not written because it is used by a frequency
generator.
48 EIO0000001438 03/2018
M241, System Functions
Function Description
This function accelerates or slows down the frequency of the RTC to give control to the application
for RTC compensation, depending on the operating environment (temperature, …). The
compensation value is given in seconds per week. It can be positive (accelerate) or negative (slow
down).
NOTE: The SetRTCDrift function must be called only once. Each new call replaces the
compensation value by the new one. The value is kept in the logic controller hardware while the
RTC is powered by the main supply or by the battery. If both battery and power supply are
removed, the RTC compensation value is not available.
Graphical Representation
IL and ST Representation
To see the general representation in IL or ST language, refer to the chapter Function and Function
Block Representation (see page 103).
NOTE: The parameters Day, Hour, and Minute are used only to ensure backwards compatibility.
NOTE: If the value entered for RtcDrift exceeds the limit value, the logic controller firmware sets
the value to its maximum value.
This table describes the output variable:
EIO0000001438 03/2018 49
M241, System Functions
Example
In this example, the function is called only once during the first MAST task cycle. It accelerates the
RTC by 4 seconds a week (18 seconds a month).
VAR
MyRTCDrift : SINT (-36...+73) := 0;
MyDay : DAY_OF_WEEK;
MyHour : HOUR;
MyMinute : MINUTE;
END_VAR
IF IsFirstMastCycle() THEN
MyRTCDrift := 4;
MyDay := 0;
MyHour := 0;
MyMinute := 0;
SetRTCDrift(MyRTCDrift, MyDay, MyHour, MyMinute);
END_IF
50 EIO0000001438 03/2018
M241, System Functions
Section 2.3
M241 User Functions
Overview
This section describes the DataFileCopy and ExecuteScript functions included in the M241
PLCSystem library.
EIO0000001438 03/2018 51
M241, System Functions
Graphical Representation
IL and ST Representation
To see the general representation in IL or ST language, refer to the chapter Function and Function
Block Representation (see page 103).
52 EIO0000001438 03/2018
M241, System Functions
WARNING
UNINTENDED EQUIPMENT OPERATION
Verify that the memory location is of the correct size and the file is of the correct type before
copying the file to memory.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
NOTE: If you write to memory variable within the area of the file write, you generate a CRC
detected error.
EIO0000001438 03/2018 53
M241, System Functions
Example
This example describes how to copy file commands:
VAR
LocalArray : ARRAY [0..29] OF BYTE;
myFileName: STRING := 'exportfile';
EXEC_FLAG: BOOL;
DataFileCopy: DataFileCopy;
END_VAR
DataFileCopy(
xExecute:= EXEC_FLAG,
sFileName:= myFileName,
xRead:= FALSE,
xSecure:= FALSE,
iLocation:= DFCL_INTERNAL,
uiSize:= SIZEOF(LocalArray),
dwAdd:= ADR(LocalArray),
xDone=> ,
xBusy=> ,
xError=> ,
eError=> );
54 EIO0000001438 03/2018
M241, System Functions
For information on the required script file format, refer to Script Files for SD Cards.
Graphical Representation
IL and ST Representation
To see the general representation in IL or ST language, refer to the chapter Function and Function
Block Representation (see page 103).
EIO0000001438 03/2018 55
M241, System Functions
Example
This example describes how to execute an Upload script command:
VAR
EXEC_FLAG: BOOL;
ExecuteScript: ExecuteScript;
END_VAR
ExecuteScript(
xExecute:= EXEC_FLAG,
sCmd:= 'Upload "/usr/Syslog/*"',
xDone=> ,
xBusy=> ,
xError=> ,
eError=> );
56 EIO0000001438 03/2018
M241, System Functions
Section 2.4
TM3 Read Functions
Overview
This section describes the TM3 read functions included in the M241 PLCSystem library.
EIO0000001438 03/2018 57
M241, System Functions
Function Description
This function returns the bus status of the module. The index of the module is given as an input
parameter.
Graphical Representation
IL and ST Representation
To see the general representation in IL or ST language, refer to the chapter Function and Function
Block Representation (see page 103).
58 EIO0000001438 03/2018
M241, System Functions
Function Description
This function returns the firmware version of a specified TM3 module.
Graphical Representation
IL and ST Representation
To see the general representation in IL or ST language, refer to the chapter Function and Function
Block Representation (see page 103).
EIO0000001438 03/2018 59
M241, System Functions
Function Description
This function fills the pStatusBuffer with the status table of the module ModuleIndex.
Graphical Representation
IL and ST Representation
To see the general representation in IL or ST language, refer to the chapter Function and Function
Block Representation (see page 103).
WARNING
UNINTENDED EQUIPMENT OPERATION
Ensure that the pStatusBuffer is allocated.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
60 EIO0000001438 03/2018
M241, System Functions
Example
The following example describes how to get the module internal status:
VAR
AMM3HT_Channel1_Input_Status: BYTE;
END_VAR
TM3_GetModuleInternalStatus(0, 1, 1, ADR(AMM3HT_Channel1_Input_Status));
EIO0000001438 03/2018 61
M241, System Functions
62 EIO0000001438 03/2018
Modicon M241 Logic Controller
M241 PLC System Library Data Types
EIO0000001438 03/2018
Chapter 3
M241 PLCSystem Library Data Types
Overview
This chapter describes the data types of the M241 PLCSystem Library.
There are 2 kinds of data types available:
System variable data types are used by the system variables (see page 11) of the M241
PLCSystem Library (PLC_R, PLC_W,...).
System function data types are used by the read/write system functions (see page 39) of the
M241 PLCSystem Library.
EIO0000001438 03/2018 63
M241 PLC System Library Data Types
Section 3.1
PLC_RW System Variables Data Types
Overview
This section lists and describes the system variable data types included in the PLC_R and PLC_W
structures.
64 EIO0000001438 03/2018
M241 PLC System Library Data Types
EIO0000001438 03/2018 65
M241 PLC System Library Data Types
66 EIO0000001438 03/2018
M241 PLC System Library Data Types
EIO0000001438 03/2018 67
M241 PLC System Library Data Types
68 EIO0000001438 03/2018
M241 PLC System Library Data Types
EIO0000001438 03/2018 69
M241 PLC System Library Data Types
70 EIO0000001438 03/2018
M241 PLC System Library Data Types
EIO0000001438 03/2018 71
M241 PLC System Library Data Types
For more information for reasons the controller has stopped, refer to the Controller State
Description.
72 EIO0000001438 03/2018
M241 PLC System Library Data Types
EIO0000001438 03/2018 73
M241 PLC System Library Data Types
74 EIO0000001438 03/2018
M241 PLC System Library Data Types
EIO0000001438 03/2018 75
M241 PLC System Library Data Types
Section 3.2
DataFileCopy System Variables Data Types
Overview
This section lists and describes the system variable data types included in the DataFileCopy
structures.
76 EIO0000001438 03/2018
M241 PLC System Library Data Types
EIO0000001438 03/2018 77
M241 PLC System Library Data Types
78 EIO0000001438 03/2018
M241 PLC System Library Data Types
Section 3.3
ExecScript System Variables Data Types
EIO0000001438 03/2018 79
M241 PLC System Library Data Types
Section 3.4
ETH_RW System Variables Data Types
Overview
This section lists and describes the system variable data types included in the ETH_R and ETH_W
structures.
80 EIO0000001438 03/2018
M241 PLC System Library Data Types
EIO0000001438 03/2018 81
M241 PLC System Library Data Types
82 EIO0000001438 03/2018
M241 PLC System Library Data Types
EIO0000001438 03/2018 83
M241 PLC System Library Data Types
84 EIO0000001438 03/2018
M241 PLC System Library Data Types
EIO0000001438 03/2018 85
M241 PLC System Library Data Types
86 EIO0000001438 03/2018
M241 PLC System Library Data Types
EIO0000001438 03/2018 87
M241 PLC System Library Data Types
Section 3.5
TM3_MODULE_RW System Variables Data Types
Overview
This section lists and describes the system variable data types included in the TM3_MODULE_R and
TM3_MODULE_W structures.
88 EIO0000001438 03/2018
M241 PLC System Library Data Types
EIO0000001438 03/2018 89
M241 PLC System Library Data Types
Description
The TM3_MODULE_R_ARRAY_TYPE is an array of 0...13 TM3_MODULE_R_STRUCT.
90 EIO0000001438 03/2018
M241 PLC System Library Data Types
EIO0000001438 03/2018 91
M241 PLC System Library Data Types
92 EIO0000001438 03/2018
M241 PLC System Library Data Types
Section 3.6
Cartridge System Variables Data Types
Overview
This section lists and describes the system variable data types included in the Cartridge
structure.
EIO0000001438 03/2018 93
M241 PLC System Library Data Types
Description
The CART_R_ARRAY_TYPE is an array of 0..1 CART_R_STRUCT.
94 EIO0000001438 03/2018
M241 PLC System Library Data Types
EIO0000001438 03/2018 95
M241 PLC System Library Data Types
96 EIO0000001438 03/2018
M241 PLC System Library Data Types
Section 3.7
System Function Data Types
Overview
This section describes the different system function data types of the M241 PLCSystem library.
EIO0000001438 03/2018 97
M241 PLC System Library Data Types
98 EIO0000001438 03/2018
M241 PLC System Library Data Types
EIO0000001438 03/2018 99
M241 PLC System Library Data Types
EIO0000001438 03/2018
Appendices
Appendix A
Function and Function Block Representation
Overview
Each function can be represented in the following languages:
IL: Instruction List
ST: Structured Text
LD: Ladder Diagram
FBD: Function Block Diagram
CFC: Continuous Function Chart
This chapter provides functions and function blocks representation examples and explains how to
use them for IL and ST languages.
Function
A function:
is a POU (Program Organization Unit) that returns one immediate result.
is directly called with its name (not through an instance).
has no persistent state from one call to the other.
can be used as an operand in other expressions.
Function Block
A function block:
is a POU (Program Organization Unit) that returns one or more outputs.
needs to be called by an instance (function block copy with dedicated name and variables).
each instance has a persistent state (outputs and internal variables) from one call to the other
from a function block or a program.
Examples: timers, counters
In the example, Timer_ON is an instance of the function block TON:
General Information
This part explains how to implement a function and a function block in IL language.
Functions IsFirstMastCycle and SetRTCDrift and Function Block TON are used as
examples to show implementations.
Step Action
1 Open or create a new POU in Instruction List language.
NOTE: The procedure to create a POU is not detailed here. For more information, refer to Adding
and Calling POUs (see SoMachine, Programming Guide).
2 Create the variables that the function requires.
3 If the function has 1 or more inputs, start loading the first input using LD instruction.
4 Insert a new line below and:
type the name of the function in the operator column (left field), or
use the Input Assistant to select the function (select Insert Box in the context menu).
5 If the function has more than 1 input and when Input Assistant is used, the necessary number of lines
is automatically created with ??? in the fields on the right. Replace the ??? with the appropriate
value or variable that corresponds to the order of inputs.
6 Insert a new line to store the result of the function into the appropriate variable: type ST instruction
in the operator column (left field) and the variable name in the field on the right.
To illustrate the procedure, consider the Functions IsFirstMastCycle (without input parameter)
and SetRTCDrift (with input parameters) graphically presented below:
IL example of a function
with input parameters:
SetRTCDrift
Step Action
1 Open or create a new POU in Instruction List language.
NOTE: The procedure to create a POU is not detailed here. For more information, refer to Adding
and Calling POUs (see SoMachine, Programming Guide).
2 Create the variables that the function block requires, including the instance name.
3 Function Blocks are called using a CAL instruction:
Use the Input Assistant to select the FB (right-click and select Insert Box in the context menu).
Automatically, the CAL instruction and the necessary I/O are created.
4 In the CAL right-side field, replace ??? with the instance name.
5 Replace other ??? with an appropriate variable or immediate value.
To illustrate the procedure, consider this example with the TON Function Block graphically
presented below:
In IL language, the function block name is used directly in the operator column:
General Information
This part explains how to implement a Function and a Function Block in ST language.
Function SetRTCDrift and Function Block TON are used as examples to show implementations.
Step Action
1 Open or create a new POU in Structured Text language.
NOTE: The procedure to create a POU is not detailed here. For more information, refer to Adding and
Calling POUs (see SoMachine, Programming Guide).
2 Create the variables that the function requires.
3 Use the general syntax in the POU ST Editor for the ST language of a function. The general syntax is:
FunctionResult:= FunctionName(VarInput1, VarInput2,.. VarInputx);
To illustrate the procedure, consider the function SetRTCDrift graphically presented below:
Step Action
1 Open or create a new POU in Structured Text language.
NOTE: The procedure to create a POU is not detailed here. For more information on adding,
declaring and calling POUs, refer to the related documentation (see SoMachine, Programming
Guide).
2 Create the input and output variables and the instance required for the function block:
Input variables are the input parameters required by the function block
Output variables receive the value returned by the function block
3 Use the general syntax in the POU ST Editor for the ST language of a Function Block. The general
syntax is:
FunctionBlock_InstanceName(Input1:=VarInput1, Input2:=VarInput2,...
Ouput1=>VarOutput1, Ouput2=>VarOutput2,...);
To illustrate the procedure, consider this example with the TON function block graphically
presented below:
Glossary
!
%MW
According to the IEC standard, %MW represents a memory word register (for example, a language
object of type memory word).
A
application
A program including configuration data, symbols, and documentation.
ARRAY
The systematic arrangement of data objects of a single type in the form of a table defined in logic
controller memory. The syntax is as follows: ARRAY [<dimension>] OF <Type>
Example 1: ARRAY [1..2] OF BOOL is a 1-dimensional table with 2 elements of type BOOL.
Example 2: ARRAY [1..10, 1..20] OF INT is a 2-dimensional table with 10 x 20 elements of
type INT.
B
BOOL
(boolean) A basic data type in computing. A BOOL variable can have one of these values: 0
(FALSE), 1 (TRUE). A bit that is extracted from a word is of type BOOL; for example, %MW10.4 is a
fifth bit of memory word number 10.
Boot application
(boot application) The binary file that contains the application. Usually, it is stored in the controller
and allows the controller to boot on the application that the user has generated.
BOOTP
(bootstrap protocol) A UDP network protocol that can be used by a network client to automatically
obtain an IP address (and possibly other data) from a server. The client identifies itself to the server
using the client MAC address. The server, which maintains a pre-configured table of client device
MAC addresses and associated IP addresses, sends the client its pre-configured IP address.
BOOTP was originally used as a method that enabled diskless hosts to be remotely booted over a
network. The BOOTP process assigns an infinite lease of an IP address. The BOOTP service
utilizes UDP ports 67 and 68.
byte
A type that is encoded in an 8-bit format, ranging from 00 hex to FF hex.
C
CFC
(continuous function chart) A graphical programming language (an extension of the IEC 61131-3
standard) based on the function block diagram language that works like a flowchart. However, no
networks are used and free positioning of graphic elements is possible, which allows feedback
loops. For each block, the inputs are on the left and the outputs on the right. You can link the block
outputs to the inputs of other blocks to create complex expressions.
configuration
The arrangement and interconnection of hardware components within a system and the hardware
and software parameters that determine the operating characteristics of the system.
control network
A network containing logic controllers, SCADA systems, PCs, HMI, switches, ...
Two kinds of topologies are supported:
flat: all modules and devices in this network belong to same subnet.
2 levels: the network is split into an operation network and an inter-controller network.
These two networks can be physically independent, but are generally linked by a routing device.
CRC
(cyclical redundancy check) A method used to determine the validity of a communication
transmission. The transmission contains a bit field that constitutes a checksum. The message is
used to calculate the checksum by the transmitter according to the content of the message.
Receiving nodes, then recalculate the field in the same manner. Any discrepancy in the value of
the 2 CRC calculations indicates that the transmitted message and the received message are
different.
D
DHCP
(dynamic host configuration protocol) An advanced extension of BOOTP. DHCP is more
advanced, but both DHCP and BOOTP are common. (DHCP can handle BOOTP client requests.)
DWORD
(double word) Encoded in 32-bit format.
E
element
The short name of the ARRAY element.
equipment
A part of a machine including sub-assemblies such as conveyors, turntables, and so on.
Ethernet
A physical and data link layer technology for LANs, also known as IEEE 802.3.
EtherNet/IP
(Ethernet industrial protocol) An open communications protocol for manufacturing automation
solutions in industrial systems. EtherNet/IP is in a family of networks that implement the common
industrial protocol at its upper layers. The supporting organization (ODVA) specifies EtherNet/IP
to accomplish global adaptability and media independence.
F
FB
(function block) A convenient programming mechanism that consolidates a group of programming
instructions to perform a specific and normalized action, such as speed control, interval control, or
counting. A function block may comprise configuration data, a set of internal or external operating
parameters and usually 1 or more data inputs and outputs.
firmware
Represents the BIOS, data parameters, and programming instructions that constitute the operating
system on a controller. The firmware is stored in non-volatile memory within the controller.
flash memory
A non-volatile memory that can be overwritten. It is stored on a special EEPROM that can be
erased and reprogrammed.
function
A programming unit that has 1 input and returns 1 immediate result. However, unlike FBs, it is
directly called with its name (as opposed to through an instance), has no persistent state from one
call to the next and can be used as an operand in other programming expressions.
Examples: boolean (AND) operators, calculations, conversions (BYTE_TO_INT)
function block
A programming unit that has 1 or more inputs and returns 1 or more outputs. FBs are called through
an instance (function block copy with dedicated name and variables) and each instance has a
persistent state (outputs and internal variables) from 1 call to the other.
Examples: timers, counters
function block diagram
One of the 5 languages for logic or control supported by the standard IEC 61131-3 for control
systems. Function block diagram is a graphically oriented programming language. It works with a
list of networks where each network contains a graphical structure of boxes and connection lines
representing either a logical or arithmetic expression, the call of a function block, a jump, or a return
instruction.
G
GVL
(global variable list) Manages global variables within a project.
H
hex
(hexadecimal)
I
I/O
(input/output)
ID
(identifier/identification)
IEC
(international electrotechnical commission) A non-profit and non-governmental international
standards organization that prepares and publishes international standards for electrical,
electronic, and related technologies.
IEC 61131-3
Part 3 of a 3-part IEC standard for industrial automation equipment. IEC 61131-3 is concerned with
controller programming languages and defines 2 graphical and 2 textual programming language
standards. The graphical programming languages are ladder diagram and function block diagram.
The textual programming languages include structured text and instruction list.
IEEE 802.3
A collection of IEEE standards defining the physical layer, and the media access control sublayer
of the data link layer, of wired Ethernet.
IL
(instruction list) A program written in the language that is composed of a series of text-based
instructions executed sequentially by the controller. Each instruction includes a line number, an
instruction code, and an operand (refer to IEC 61131-3).
INT
(integer) A whole number encoded in 16 bits.
IP
(Internet protocol Part of the TCP/IP protocol family that tracks the Internet addresses of devices,
routes outgoing messages, and recognizes incoming messages.
L
LD
(ladder diagram) A graphical representation of the instructions of a controller program with symbols
for contacts, coils, and blocks in a series of rungs executed sequentially by a controller (refer to
IEC 61131-3).
LWORD
(long word) A data type encoded in a 64-bit format.
M
MAC address
(media access control address) A unique 48-bit number associated with a specific piece of
hardware. The MAC address is programmed into each network card or device when it is
manufactured.
MAST
A processor task that is run through its programming software. The MAST task has 2 sections:
IN: Inputs are copied to the IN section before execution of the MAST task.
OUT: Outputs are copied to the OUT section after execution of the MAST task.
N
network
A system of interconnected devices that share a common data path and protocol for
communications.
P
PLC
(programmable logic controller) An industrial computer used to automate manufacturing, industrial,
and other electromechanical processes. PLCs are different from common computers in that they
are designed to have multiple input and output arrays and adhere to more robust specifications for
shock, vibration, temperature, and electrical interference among other things.
POU
(program organization unit) A variable declaration in source code and a corresponding instruction
set. POUs facilitate the modular re-use of software programs, functions, and function blocks. Once
declared, POUs are available to one another.
program
The component of an application that consists of compiled source code capable of being installed
in the memory of a logic controller.
protocol
A convention or standard definition that controls or enables the connection, communication, and
data transfer between 2 computing system and devices.
R
run
A command that causes the controller to scan the application program, read the physical inputs,
and write to the physical outputs according to solution of the logic of the program.
S
ST
(structured text) A language that includes complex statements and nested instructions (such as
iteration loops, conditional executions, or functions). ST is compliant with IEC 61131-3.
STOP
A command that causes the controller to stop running an application program.
string
A variable that is a series of ASCII characters.
system variable
A variable that provides controller data and diagnostic information and allows sending commands
to the controller.
T
task
A group of sections and subroutines, executed cyclically or periodically for the MAST task or
periodically for the FAST task.
A task possesses a level of priority and is linked to inputs and outputs of the controller. These I/O
are refreshed in relation to the task.
A controller can have several tasks.
TCP
(transmission control protocol) A connection-based transport layer protocol that provides a
simultaneous bi-directional transmission of data. TCP is part of the TCP/IP protocol suite.
U
UDINT
(unsigned double integer) Encoded in 32 bits.
UINT
(unsigned integer) Encoded in 16 bits.
unlocated variable
A variable that does not have an address (refer to located variable).
V
variable
A memory unit that is addressed and modified by a program.
W
watchdog
A watchdog is a special timer used to ensure that programs do not overrun their allocated scan
time. The watchdog timer is usually set to a higher value than the scan time and reset to 0 at the
end of each scan cycle. If the watchdog timer reaches the preset value, for example, because the
program is caught in an endless loop, an error is declared and the program stopped.
WORD
A type encoded in a 16-bit format.
Index
C D
CART_R_ARRAY_TYPE Data Types
Data Types, 94 CART_R_ARRAY_TYPE, 94
CART_R_MODULE_ID CART_R_MODULE_ID, 95
Data Types, 95 CART_R_STATE, 96
CART_R_STATE DataFileCopyError, 77
Data Types, 96 DataFileCopyLocation, 78
CART_R_STRUCT ETH_R_FRAME_PROTOCOL, 81
System Variable, 37 ETH_R_IP_MODE, 82
cycle ETH_R_PORT_DUPLEX_STATUS, 83
IsFirstMastColdCycle, 43 ETH_R_PORT_IP_STATUS, 84
IsFirstMastCycle, 44 ETH_R_PORT_LINK_STATUS, 85
IsFirstMastWarmCycle, 46 ETH_R_PORT_SPEED, 86
ETH_R_RUN_IDLE, 87
ExecuteScriptError, 79
IMMEDIATE_ERR_TYPE, 98
PLC_R_APPLICATION_ERROR, 65
PLC_R_BOOT_PROJECT_STATUS, 67
PLC_R_IO_STATUS, 68
PLC_R_SDCARD_STATUS, 69
PLC_R_STATUS, 70
PLC_R_STOP_CAUSE, 71
PLC_R_TERMINAL_PORT_STATUS, 73
PLC_R_TM3_BUS_STATE, 74
PLC_W_COMMAND, 75
RTCSETDRIFT_ERROR, 99
TM3_BUS_W_IOBUSERRMOD, 92
TM3_ERR_CODE, 89
TM3_MODULE_R_ARRAY_TYPE, 90
TM3_MODULE_STATE, 91
DataFileCopy
copying data to or from a file, 52
DataFileCopyError
Data Types, 77
DataFileCopyLocation
Data Types, 78
E I
embedded I/O IMMEDIATE_ERR_TYPE
GetImmediateFastInput, 41 Data Types, 98
PhysicalWriteFastOutputs, 48 IsFirstMastColdCycle
ETH_R first cold start cycle, 43
System Variable, 28 IsFirstMastCycle
ETH_R_FRAME_PROTOCOL first mast cycle, 44
Data Types, 81 IsFirstMastWarmCycle
ETH_R_IP_MODE first warm start cycle, 46
Data Types, 82
ETH_R_PORT_DUPLEX_STATUS
Data Types, 83 M
ETH_R_PORT_LINK_STATUS M241 PLCSystem
Data Types, 85 DataFileCopy, 52
ETH_R_PORT_SPEED ExecuteScript, 55
Data Types, 86 GetImmediateFastInput, 41
ETH_W GetRtc, 42
System Variable, 33 IsFirstMastColdCycle, 43
ExecuteScript IsFirstMastCycle, 44
running script commands, 55 IsFirstMastWarmCycle, 46
ExecuteScriptError PhysicalWriteFastOutputs, 48
Data Types, 79 SetRTCDrift, 49
TM3_GetModuleBusStatus, 58, 60
TM3_GetModuleFWVersion, 59
F
file copy commands
DataFileCopy, 52 P
functions PhysicalWriteFastOutputs
differences between a function and a writing output of an embedded expert I/O,
function block, 104 48
how to use a function or a function block PLC_R
in IL language, 105 System Variable, 18
how to use a function or a function block PLC_R_APPLICATION_ERROR
in ST language, 109 Data Types, 65
PLC_R_BOOT_PROJECT_STATUS
Data Types, 67
G PLC_R_IO_STATUS
GetImmediateFastInput Data Types, 68
getting the value of a fast input, 41 PLC_R_SDCARD_STATUS
GetRtc Data Types, 69
getting real time clock (RTC) value, 42 PLC_R_STATUS
Data Types, 70
PLC_R_STOP_CAUSE
Data Types, 71