Attention
IronPLC can only run very simple programs. The steps described are accurate but many language features are not yet supported.
I/O Qualifiers¶
Direct representation allows variables to be mapped to specific locations in the process image using address prefixes.
IEC 61131-3 |
Section 2.4.1.1 |
Support |
Partial |
Address Prefixes¶
Prefix |
Region |
Description |
|---|---|---|
|
Input |
Read from physical inputs |
|
Output |
Write to physical outputs |
|
Memory |
Internal memory (markers) |
Size Prefixes¶
Prefix |
Size |
Description |
|---|---|---|
|
1 bit |
Single bit (default) |
|
8 bits |
Byte |
|
16 bits |
Word |
|
32 bits |
Double word |
|
64 bits |
Long word |
Syntax¶
variable_name AT %prefix.address : type_name ;
Example¶
PROGRAM main
VAR
start_button AT %IX0.0 : BOOL;
motor_output AT %QX0.0 : BOOL;
speed_setpoint AT %MW10 : INT;
END_VAR
motor_output := start_button;
END_PROGRAM
See Also¶
Variable Declarations — basic variable declarations
Variable Scope — variable scope keywords