OEM BL2500 User Manual page 34

Embedded plc z-world single board computer
Table of Contents

Advertisement

PLC BL2500 User's Manual
EMBEDDED
6. Follow Steps 6 to 11 in 3.4.1 to create and populate the application's Dictionary with SW1 and SW2
Boolean input variables, and LED1 Boolean output variable.
7. On the B25TEST3 – Programs window double-click on STtest1 program.
8. Type in a comment in comment parentheses (* *) such as (* Exclusive OR logic for switching on
LED *). When entered correctly comments are highlighted green.
9. Press Enter to move to the next command line in the ST program editor.
10. To enter Keyword commands, either click the desired button in the Keywords tool box or type it,
such as for an 'if' statement, either click IF in the Keyword tool box or type IF on the command line.
When correctly entered Keyword commands are highlighted pink.
11. To enter inputs, outputs, or variables, for example input switch SW1, either select Edit → Insert
variable → SW1 or type SW1 on the command line.
12. Type the following command lines under the entered comment:
IF SW1 = SW2
THEN
LED1 := FALSE;
ELSE
LED1 := TRUE;
END_IF;
13. The LDtest1 program should now appear as follows:
14. Save the program by selecting File menu → Save. Press OK button on the Update diary window.
Close the STtest1 – ST Program window.
15. Follow Steps 17 to 25 in 3.4.1 to compile the application and download it to the Target PLC.
16. Double-click on STtest1 program. The STTEST1 – ST Programs window is displayed. Press the
SW1 (short-circuit digital input IN00) and the LED1 will be turned ON as well as the state of LED1 in
the Programs window will change. The PLC program implements a Boolean XOR operation on SW1
and SW2 with the result set on the LED1.
17. To stop the monitoring of the PLC application, close the Debugger window. The programs and
dictionary windows in debug mode will be closed.
OEM Technology Solutions
Running Sample Applications
Page 28

Advertisement

Table of Contents
loading

Table of Contents