Figure 6-3 Example Of External General Purpose I/O Control Program - Hitachi HF-W100E/IoT User Manual

Industrial controller for iot applications
Table of Contents

Advertisement

<Program>
In the example of Figure 6-3, the program outputs to the external general purpose
output (output1) and obtains the input state of a external general purpose input.
PLC_PRG (declaration part)
PROGRAM PLC_PRG
VAR
uiState: INT;
usiOutput : USINT;
usiMask : USINT;
usiInput : USINT;
dwResult_out : DWORD;
dwResult_in : DWORD;
END_VAR
PLC_PRG (body)
IF uiState = 0 THEN
uiState := 1;
// GENDO output
usiOutput := 1;
usiMask := 1;
dwResult_out := GendoControlN(usiOutput, usiMask);
// GENDI input
dwResult_in := GetGendiN(ADR(usiInput));
END_IF

Figure 6-3 Example of External General Purpose I/O Control Program

6. RAS FEATURES IN HF-W100E/IoT
6-13

Advertisement

Table of Contents
loading

Table of Contents