The IO addresses of a module will be stored as largest possible type inside the <ModuleName>_IoAddresses.st file.
- 64bit --> LWORD
- 32bit --> DWORD
- 16bit --> WORD
- 8bit --> BYTE
- 1bit --> BOOL
If a module is larger than a whole data type, it will be divided (e.g. 48bit --> 3x WORD). Larger data types can be divided into smaller types or used for masking. This could used in the plc program like this:
PROGRAM MyProgram
VAR_EXTERNAL
Huge64BitModule : LWORD;
END_VAR
VAR
Huge64BitModule_Half_0 :DWORD;
Huge64BitModule_Secound_Half_0 :DWORD;
Huge64BitModule_Quarter_0 :WORD;
Huge64BitModule_Eigth_0 :BYTE;
Huge64BitModule_bit_0 : BOOL;
END_VAR
VAR_TEMP
END_VAR
Huge64BitModule_Half_0 := Huge64BitModule.%D0;
Huge64BitModule_Secound_Half_0 := Huge64BitModule.%D1;
Huge64BitModule_Quarter_0 := Huge64BitModule_Half_0.%W0;
Huge64BitModule_Eigth_0 := Huge64BitModule_Quarter_0.%B0;
Huge64BitModule_bit_0 := Huge64BitModule_Eigth_0.%x0;
END_PROGRAM