![background image](http://html1.mh-extra.com/html/omron/cx-programmer-v9/cx-programmer-v9_operation-manual_744204103.webp)
PART 1: CX-Programmer
CHAPTER 2 – Quick Start Guide
OMRON
CX-Programmer _Page 20
Writing a Program
The following program sequences a set of traffic lights. The sequence is a standard British
sequence of the following order:
•
Red light only;
•
Red and Amber lights together;
•
Green light only;
•
Amber light only.
Writing a ladder program consists of:
•
Creating symbols;
•
Creating the ladder program;
•
Compiling (automatically checking) the program;
•
Transferring the program to and from a PLC;
•
Comparing the program with the PLC program;
•
Monitoring the program during execution;
•
Performing an on-line edit (if necessary).
Creating Symbols
An important step in creating a Ladder Program is the definition of those PLC data areas that are to be
referenced by the program. It is possible to skip this step, and use addresses directly within the program. It is
better, however, to create symbolic names for the addresses so that the programs become more readable and
maintainable.
Use the following procedure to create symbols.
1, 2, 3…
1. Click in the Diagram Window and select the
View Local Symbols
button from the
toolbar.
2. Select
the
New Symbol
button from the toolbar. The Insert Symbol dialog is displayed.
3. Enter ‘AmberLight’ in the
Name
field.
4. Set
the
Address or value
field to ’10.01’.
5. Leave
the
Data type
field set to ‘BOOL’ to indicate a bit (binary) value.
6. Type ‘Prepare to go / stop’ in the
Comment
field.
7. Select
the
OK
pushbutton to proceed.
Repeat this procedure for each of the other entries in the following table:
Name Address
Data
Type
Comment
RedLight 10.00
BOOL
Stop.
GreenLight 10.02
BOOL
Go.
RedLightTimer
1
NUMBER
Timer for the red light period.
AmberLightTimer
2
NUMBER
Timer for the amber light period.
GreenLightTimer
3
NUMBER
Timer for the green light period.
AmberOnlyTimer
4
NUMBER
Timer for the amber only period.
RedTimerDone T0001
BOOL
AmberTimerDone T0002
BOOL
GreenTimerDone T0003
BOOL
AmberOnlyTimerDone T0004
BOOL
TimeInterval 48
NUMBER
Speed
at
which the sequence works (ticks).
Note:
It is important to use the standard form of addresses in CX-Programmer. Depending upon
their defined type, addresses may have two components – a channel and a bit number. In the
Содержание CX-PROGRAMMER V9
Страница 1: ...Cat No W446 E1 12 CX Programmer Ver 9 CXONE AL_C V4 AL_D V4 SYSMAC OPERATION MANUAL...
Страница 2: ......
Страница 3: ...SYSMAC CX Programmer Ver 9 CXONE AL C V4 AL D V4 Operation Manual Revised July 2010...
Страница 4: ......
Страница 6: ......
Страница 32: ......
Страница 33: ...PART 1 CX Programmer...
Страница 34: ......
Страница 91: ......
Страница 111: ......
Страница 191: ...PART 1 CX Programmer CHAPTER 4 Reference OMRON CX Programmer _Page 108...
Страница 217: ......
Страница 233: ......
Страница 234: ...PART 2 CX Server PLC Tools...
Страница 235: ......
Страница 243: ......
Страница 249: ......
Страница 261: ...PART 2 CX Server PLC Tools CHAPTER 2 PLC Memory Component OMRON CX Server PLC Tools_Page 18...
Страница 280: ......
Страница 333: ......
Страница 377: ......
Страница 409: ......
Страница 430: ......
Страница 431: ...PART 3 CX Server Runtime...
Страница 432: ......
Страница 476: ......
Страница 482: ......
Страница 498: ......
Страница 524: ......
Страница 534: ......
Страница 535: ......
Страница 536: ......