Wecon LX Series Istruzioni operative

WECON Technology Co., Ltd.
1
WECON
Programming
WECON Technology Co., Ltd.
Website: http://www.we-con.com.cn/en
Technical Support: cheng[email protected].cn
Skype: Jason.chen842
Phone: 86-591-87868869

WECON Technology Co., Ltd.
2
Basic Program Instructions
1. What is a Program?
A program is a connected series of instructions written in a language that the PLC can
understand. There are two forms of program format; instruction, ladder.
panels only work with instruction format while most graphic programming tools will
work with both instruction and ladder format.
2. Outline of Basic Devices Used in Programming
There are six basic programming devices. Each device has its own unique use. To
enable quick and easy identification each device is assigned a single reference letter;
- X: This is used to identify all direct, physical inputs to the PLC.
- Y: This is used to identify all direct, physical outputs from the PLC.
- T: This is used to identify a timing device which is contained within the PLC.
- C: This is used to identify a counting device which is contained within the PLC.
- M and S: These are used as internal operation flags within the PLC.
All of the devices mentioned above are known as ‘bit devices’. This is a descriptive
title telling the user that these devices only have two states; ON or OFF, 1 or 0.
3. How to Read Ladder Logic
Ladder logic is very closely associated to basic relay logic. There are both contacts
and coils that can be loaded and driven in different configurations. However, the basic
principle remains the same.
A coil drives direct outputs of the PLC (ex. a Y device) or drives internal timers,
counters orflags (ex. T, C, M and S devices). Each coil has associated contacts.
These contacts are available in both “normally open” (NO) and “normally closed” (NC)
configurations.
The term “normal(ly)” refers to the status of the contacts when the coil is not
energized.
Using a relay analogy, when the coil is OFF, a NO contact would have no current flow,
that is, a load being supplied through a NO contact would not operate. However, a NC
contact would allow current to flow, hence the connected load would be active.
Activating the coil reverses the contact status, that is, the current would flow in a NO

WECON Technology Co., Ltd.
3
contact and a NC contact would inhibit the flow.
Physical inputs to the PLC (X devices) have no programmable coil. These devices
may only be used in a contact format (NO and NC types are available).
Example:
Because of the close relay association, ladder logic programs can be read as current
flowing from the left vertical line to the right vertical line. This current must pass
through a series of contact representations such as X0 and X1 in order to switch the
output coil Y0 ON. Therefore,in the example shown, switching X0 ON causes the
output Y0 to also switch ON. If however,the limit switch X1 is activates, the output Y0
turns OFF. This is because the connection between the left and the right vertical lines
breaks so there is no current flow.
4.Load, Load Inverse
Program example:

WECON Technology Co., Ltd.
4
Basic points to remember:
- Connect the LD and LDI instructions directly to the left hand bus bar.
- Or use LD and LDI instructions to define a new block of program when using the
ORB
5.Out
Basic points to remember:
- Connect the OUT instruction directly to the right hand bus bar.
- It is not possible to use the OUT instruction to drive ‘X’ type input devices.
- It is possible to connect multiple OUT instructions in parallel (for example see the
previous page; M100/T0 configuration)
5.1 Timer and Counter Variations
When configuring the OUT instruction for use as either a timer (T) or counter (C) a
constant must also be entered. The constant is identified by the letter “K” (for example
see previous page; T0 K19).
In the case of a timer, the constant “K” holds the duration data for the timer to operate,
i.e. if a 100 msec timer has a constant of “K100” it will be (1005 100 msec) 10 seconds
before the timer coil activates.
With counters, the constant identifies how many times the counter must be pulsed or
triggered before the counter coil activates. For example, a counter with a constant of
“8” must be triggered 8 times before the counter coil finally energizes.
The following table identifies some basic parameter data for various timers and
counters;

WECON Technology Co., Ltd.
5
5.2 Double Coil Designation
Double or dual coiling is not a recommended practice. Using multiple output coils of
thesame device can cause the program operation to become unreliable. The example
program shown opposite identifies a double coil situation; there are two Y3 outputs.
The following sequence of events will occur when inputs X1 = ON and X2 = OFF;
1.The first Y3 tuns ON because X1 is ON. The contacts associated with Y3 also
energize when the coil of output Y3 energizes. Hence,output Y4 turns ON.
2.The last and most important line in this program looks at the status of input X2.
If this is NOT ON then the second Y3 coil does NOT activate. Therefore the status of
the Y3 coil updates to reflect this new situation, i.e. it turns OFF. The final outputs are
then Y3 = OFF and Y4 = ON.
Use of dual coils:
• Always check programs for incidents of dual coiling. If there are dual coils the
program will not operate as expected - possibly resulting in unforeseen physical
The last coil effect:
• In a dual coil designation, the coil operation designated last is the effective coil. That
is, it is the status of the previous coil that dictates the behavior at the current point in
the program.
6. And, And Inverse

WECON Technology Co., Ltd.
6
Program example:
Basic points to remember:
- Use the AND and ANI instructions for serial connection of contacts. As many
contacts as required can be connected in series (see following point headed
“Peripheral limitations”).
- The output processing to a coil, through a contact, after writing the initial OUT
instruction is called a “follow-on” output (for an example see the program above; OUT
Y4). Followon outputs are permitted repeatedly as long as the output order is correct.
Peripheral limitations:
• The PLC has no limit to the number of contacts connected in series or in parallel.
However, some programming panels, screens and printers will not be able to display
or print the program if it exceeds the limit of the hardware. It is preferable for each
line or rung of ladder program to contain up to a maximum of 10 contacts and 1 coil.
Also, keep the number of follow-on outputs to a maximum of 24.
7. Or, Or Inverse

WECON Technology Co., Ltd.
7
Program example:
Basic points to remember:
- Use the OR and ORI instructions for parallel connection of contacts. To connect a
block that contains more than one contact connected in series to another circuit block
in parallel, use an ORB instruction.
- Connect one side of the OR/ORI instruction to the left hand bus bar.
Peripheral limitations:
• The PLC has no limit to the number of contacts connected in series or in parallel.
However, some programming panels, screens and printers will not be able to display
or print the program if it exceeds the limit of the hardware. It is preferable for each
line or rung of ladder program to contain up to a maximum of 10 contacts and 1 coil.
Also keep number of follow-on outputs to a maximum of 24.
8. Load Pulse, Load Trailing Pulse

WECON Technology Co., Ltd.
8
Program example:
Basic points to remember:
- Connect the LDP and LDF instructions directly to the left hand bus bar.
- Or use LDP and LDF instructions to define a new block of program when using the
ORB and ANB instructions (see later sections).
- LDP is active for one program scan after the associated device switches from OFF
to ON.
- LDF is active for one program scan after the associated device switches from ON to
OFF.
9. And Pulse, And Trailing Pulse
Program example:
Basic points to remember:

WECON Technology Co., Ltd.
9
- Use the ANDP and ANDF instructions for the serial connection of pulse contacts.
- Usage is the same as for AND and ANI; see earlier.
- ANP is active for one program scan after the associated device switches from OFF
to ON.
- ANF is active for one program scan after the associated device switches from ON to
OFF.
10. Or Pulse, Or Trailing Pulse
Program example:
Basic points to remember:
- Use the ORP and ORF instructions for the parallel connection of pulse contacts.
- Usage is the same as for OR and ORI; see earlier.
- ORP is active for one program scan after the associated device switches from OFF
to ON.
- ORF is active for one program scan after the associated device switches from ON to
OFF.
2.11 Or Block
Program example:

WECON Technology Co., Ltd.
10
Basic points to remember:
- An ORB instruction is an independent instruction and is not associated with any
device number.
- Use the ORB instruction to connect multi-contact circuits (usually serial circuit blocks)
to the preceding circuit in parallel. Serial circuit blocks are those in which more than
one contact connects in series or the ANB instruction is used.
- To declare the starting point of the circuit block use a LD or LDI instruction. After
completing the serial circuit block, connect it to the preceding block in parallel using
the ORB instruction.
Batch processing limitations:
• When using ORB instructions in a batch, use no more than 8 LD and LDI instructions
in the definition of the program blocks (to be connected in parallel). Ignoring this will
result in a program error (see the right most program listing).
Sequential processing limitations:
• There are no limitations to the number of parallel circuits when using an ORB
instruction in the sequential processing configuration (see the left most program
listing).
12. And Block
Program example:
Indice
Altri manuali Wecon Controllori



















