GE GFK-0804B 用户手册
1
1-9
GFK-0804B
Chapter 1 Programming for the Micro PLC
Programming Examples
Two simple programming examples are shown below.
Example #1:
For an analog input, the program might read the input value and turn on a discrete
output when the analog input reaches a specific value. In this example, the program
compares the value of the first analog input (IR1) with a value stored in register R4. If
the analog input is greater than that value, then a discrete output (O18) is turned on.
output when the analog input reaches a specific value. In this example, the program
compares the value of the first analog input (IR1) with a value stored in register R4. If
the analog input is greater than that value, then a discrete output (O18) is turned on.
[IR1 > R4]
O18
The output that is turned on might represent an actual output device such as a switch, or
a logical output that is used elsewhere in the program.
a logical output that is used elsewhere in the program.
Example #2:
The logic below might be used for an analog output.
[R3 ! OR1]
In this example, each program scan, the Move function copies the content of register R3
to reference OR1, which is the reference used by the analog output.
to reference OR1, which is the reference used by the analog output.