17.03.2014 Views

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>DVP</strong>-<strong>ES2</strong>/<strong>EX2</strong>/<strong>SS2</strong>/<strong>SA2</strong>/<strong>SX2</strong>/SE <strong>Operation</strong> <strong>Manual</strong> - Programming<br />

1.7 Fuzzy Syntax<br />

Generally, the ladder diagram programming is conducted according to the “up to down and left to<br />

right” principle. However, some programming methods not following this principle still perform the<br />

same control results. Here are some examples explaining this kind of “fuzzy syntax.”<br />

Example 1:<br />

X0 X2 X4<br />

Better method<br />

OK method<br />

X1<br />

X3<br />

X5<br />

LD X0 LD X0<br />

OR X1 OR X1<br />

LD X2 LD X2<br />

OR X3 OR X3<br />

ANB LD X4<br />

LD X4 OR X5<br />

OR X5 ANB<br />

ANB<br />

ANB<br />

The two instruction programs can be converted into the same ladder diagram. The difference<br />

between Better and OK method is the ANB operation conducted by MPU. ANB instruction cannot<br />

be used continuously for more than 8 times. If more than 8 ANB instructions are used continuously,<br />

program error will occur. Therefore, apply ANB instruction after a block is made is the better<br />

method to prevent the possible errors. In addition, it’s also the more logical and clearer<br />

programming method for general users.<br />

Example 2:<br />

X0<br />

Good method<br />

Bad method<br />

X1<br />

X2<br />

X3<br />

LD X0 LD X0<br />

OR X1 LD X1<br />

OR X2 LD X2<br />

OR X3 LD X3<br />

ORB<br />

ORB<br />

ORB<br />

The difference between Good and Bad method is very clear. With longer program code, the<br />

required MPU operation memory increases in the Bad method. To sum up, following the general<br />

principle and applying good / better method when editing programs prevents possible errors and<br />

improves program execution speed as well.<br />

Common Programming Errors<br />

PLC processes the diagram program from up to down and left to right. When editing ladder<br />

diagram users should adopt this principle as well otherwise an error would be detected by WPLSoft<br />

when compiling user program. Common program errors are listed below:<br />

1-12

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!