![background image](http://html1.mh-extra.com/html/eaton/elc-pb/elc-pb_programming-manual_4017452017.webp)
EL C Pro g rammi ng Manu al
F o r m o r e i nf o r m a t i o n v i sit :
w w w.eato n. co m
MN05003003E
1-12
Fuzzy Syntax
Generally, the ladder diagram programming is scanned “top to bottom and left to right”. However,
some programming methods do not follow this principle and still deliver the same control results.
Here are some examples explaining this kind of “fuzzy syntax.”
Example 1:
Better method
OK method
LD X0
LD X0
OR X1
OR X1
LD X2
LD X2
OR X3
OR X3
ANB
LD X4
LD X4
OR X5
OR X5
ANB
X0
X2
X4
X5
X3
X1
ANB
ANB
The two instruction programs can be converted into the same ladder diagram. The difference
between the Better and the OK method is the ANB operation. The ANB instruction cannot be used
continuously more than 8 times. If more than 8 ANB instructions are used continuously, a program
error will occur. Therefore, applying the ANB instruction after a block is made is the better method
to prevent possible errors. In addition, it’s also the more logical and clearer programming method
for general users.
Example 2:
Good method
Bad method
LD X0
LD X0
OR X1
LD X1
OR X2
LD X2
OR X3
LD X3
ORB
ORB
X0
X1
X2
X3
ORB
The difference between the Good and the Bad method is very clear. With longer program code, the
required memory increases in the Bad method. Following the general principle and applying good /
better methods when editing programs prevents possible errors and improves program execution
speed as well.
Common Programming Errors
The ELC processes the diagram program from top to bottom and left to right. When editing ladder
diagrams users should adopt this principle as well or an error would be detected by ELCSoft when
compiling the user program. Common program errors are listed below:
Содержание ELC-PB
Страница 1: ......
Страница 5: ...For more information visit www eaton com MN05003003E iv...
Страница 29: ...ELC Programming Manual For more information visit www eaton com MN05003003E 1 24 MEMO...
Страница 502: ...3 Instruction Set MN05003003E For more information visit www eaton com 3 333...
Страница 601: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 432...
Страница 625: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 456...