The purpose of this book is to give programming inspires for the VS series PLC. For the installation, wiring,
maintenance and safety precautions of VS Series PLC, please refer to the VS Series PLC Product Manual.
Name of Manual
VS Series PLC
Programming Manual
(This book)
VS Series PLC Product Manual
Content
Descriptions of VS Series PLC components
Functions of basic instructions and application instruction
Precautions regarding programming
Introduction to VS Series PLC
Environment, wiring and installation cautions of VS Series PLC
Precautions of environment, wiring and installment
Instructions of optional devices
Trade m a rk
VIG OR
WINDOWS is a registered tradem ark o f Mic rosoft Corporation in the United States.
Other products or serv ice n ame s appeared in this book are the property of their companies .
is a registered trademark of VIGOR ELECTRIC CORP. in Taiwan.
®
Page 2
Table of Contents
1. Introduction of VS series PLC
1-1 The Basic Concept of PLC Users
1-1-1 Introduction of PLC
1-1-2 Conguration of PLC
1-1-3 PLC Operation and Scan Time
1-1-4 PLC Input Signals
1-1-5 PLC Output Signals
1-1-6 Some Improper Diagrams at a PLC Program
1-1-7 Double Coil Output
1-1-8 Conclusion
1-2 The VS Series PLC Products Overview
1-3 Specification Table of All the VS Series Main Units
1-4 Overview of VS series PLC models
2. Component Descriptions
2-1 Table of Components
2-2 External Input (X) and External Output (Y)
2-2-1 External Input (X)
2-2-2 External Output (Y)
2-2-3 External Input/Output Assigned Numbers
1
1
1
1
3
4
5
5
6
6
7
8
10
13
13
14
14
15
16
2-3 Auxiliary Relay (M)
2-4 Step Relay (S)
2-5 Timer (T)
2-5-1 General Timers
2-5-2 Retentive Timers
2-5-3 Using a Timer in a Subroutine
2-5-4 Methods to Appoint the Set Value of a Timer
2-5-5 Detailed Description about the Output Action and Accuracy of a Timer
2-6 Counter (C)
2-6-1 16- bit Counter
2-6-2 32- bit Counter
2-6-3 Methods to Appoint the Set Value of a Counter
2-7 Software High Speed Counter
2-7-1 1-Phase High Speed Counter
2-7-2 2-Phase High Speed Counter
2-7-3 A/B Phase High Speed Counter
2-7-4 Precautions for Using the Software High Speed Counter
18
19
20
20
20
21
21
21
22
22
23
24
25
26
27
28
29
2-8 Data Register (D) and Expansion Register (R)
31
Page 3
2-9 Index Register (V and Z)
2-9-1 Using Index Register in Basic Instruction
2-9-2 Using Index Register in Application Instruction
2-9-3Demonstration Program Using Index Register
32
32
33
33
2-10 Mark Pointer and Branch Pointer (P)
2-11 Table Nickname and Table Code (Q)
2-12 Interrupt Pointer (I)
2-13 Numerical System
2-14 Special Relay and Special Register
2-14-1 Table of Special Relay
2-14-2 Instruction Table of Special Register
2-14-3 Error Code Description
2-15 The X0~X7 High Speed Input Function Description
2-15-1 External Interrupt
2-15-2 Pulse Capture
2-15-3 Pulse Measurement
2-15-4 Hardware High Speed Counter
2-16 Expansion Card Related Components
2-16-1 The DIO Expansion Card Related Components
2-16-2 The Communication Expansion Card Related Components
2-16-3 The Special Function Expansion Card Related Components
35
36
37
39
42
42
47
52
53
54
55
56
58
61
62
63
65
2-17 Special Function Module
2-17-1 Buffer Memory BFM in the VS-4AD Module
2-17-2Buffer Memory BFM in the VS-2DA Module
2-17-3 Buffer Memory BFM in the VS-3A Module
2-17-4 Buffer Memory BFM in the VS-6A Module
2-17-5Buffer Memory BFM in the VS-4TC Module
2-17-6 Buffer Memory BFM in the VS-8TC Module
2-17-7 Buffer Memory BFM in the VS-2PT Module
2-17-8 Buffer Memory BFM in the VS-4PT Module
3. Basic Instruction
3-1 Basic Instruction Table
3-2 The LD, LDI, AND, ANI, OR, ORI, INV, OUT and END Instructions
3-3 The LDP, LDF, ANDP, ANDF, ORP, OPF, MEP and MEF Instructions
3-4 The ANB and ORB Instructions
3-5 The MPS, MRD and MPP Instructions
3-6 The MC and MCR Instructions
70
71
72
73
74
75
76
77
78
79
79
81
82
83
84
85
3-7 The SET and RST Instructions
3-8 The PLS and PLF Instructions
86
86
Page 4
3-9 The OUT and RST Instructions for the Timer or Counter
87
3-10 Significant Notes for Programming
3-10-1 Convert the Ladder Diagram to the Instruction List
3-10-2 Programming Techniques
4. Sequential Function Chart (SFC) and Step Ladder (STL)
4-1 What is the Sequential Function Chart (SFC)
4-1-1 The Framework of SFC
4-1-2 Basic Components of SFC
4-1-3 State and Action of SFC
4-1-4 Types of SFC
4-2 Compiling the Sequential Function Chart (SFC)
4-2-1 Create the Flowchart of the Sequential Procedures
4-2-2 Convert the Flowchart to the SFC
4-2-3 Use the Ladder Master S to Edit the SFC
4-3 Description the Application Types of SFC
4-3-1 Single Flow, Jump and Repeat Flow During the Flowchart Transfer
4-3-2 Selective Branch and Merge
4-3-3 Simultaneously Parallel Branch and Merge
4-3-4 Special Notices About the SFC
88
88
89
91
91
91
91
92
93
94
94
95
95
96
96
97
97
98
4-4 Precautions About the Composition of the SFC
4-5 STL / SFC Relevant Special Components
4-6 The Relationship Between the SFC and STL
4-6-1 The Step Ladder Instruction (STL)
4-6-2 Compare the Descriptive Methods Between the SFC and STL
4-7 Examples of SFC Applications
4-7-1 Construct the Repeat / Single Run / Single Step Control Modes for a Park Fountain
4-7-2 Filling Bottles
4-7-3 Trafc Lights
4-7-4 Mechanical Double-Decked Parking Space
5 General Rules of Application Instructions
5-1 The Formats of Application Instructions
5-2 Data Process of Application Instructions
5-3 Precautions of Using Application Instruction
6. Application Instructions
99
101
102
102
103
105
105
107
110
119
121
121
123
124
125
6-1 Application Instruction Table
6-2 Program Flow Instructions
6-3 Comparison, Move and Code Exchange Instructions
125
131
139
Page 5
6-4 Arithmetic and Logical Operation Instructions
149
6-5 Rotary and Shift Instructions
6-6 Data Operation Instructions
6-7 High Speed Processing Instructions
6-8 Handy Instructions
6-9 External Setting and Display Instructions
6-10 Serial Communication Instructions
6-11 Handy Instructions
6-12 Floating Point Arithmetic Instructions
6-13 Advanced Data Processing and MBUS Instructions
6-14 Real Time Clock Related Instructions
6-15 Code Conversion and Timer Instructions
6-16 RND, DUTY, CRC and HHCMV Instructions
6-17 Block Data Handling Instructions
6-18 Character String Handling Instructions
6-19 Data Table Handling and Shift Instructions
157
165
177
193
205
217
243
255
281
293
303
311
317
321
335
6-20 In-Line Comparison Instructions
6-21 Handy Instructions and DABIN, BINDA, HSCT Instructions
6-22 Positioning Control Instructions
7. Statement of Communication Functions
7-1 Key Points of Communication Functions
7-1-1 Fundamental Object about the Communication Function
7-1-2 Notes for Constructing Communication Systems
7-2 Structure of Communication System
7-2-1 Main Unit Built-in Communication Port
7-2-2 VS-485-EC Communication Expansion Card
7-2-3 VS-485A-EC Communication Expansion Card
7-2-4 VS-D485-EC Communication Expansion Card
7-2-5 VS-D485A-EC Communication Expansion Card
7-2-6 VS-D232-EC Communication Expansion Card
7-2-7 VS-D52A-EC Communication Expansion Card
7-2-8 VS-ENET-EC Communication Expansion Card
341
343
353
355
355
355
356
358
362
363
364
365
366
367
368
369
Page 6
7-3 Communication Types
7-3-1 Selections of Communication Types
7-3-2 VS Computer Link Slave
7-3-3 VS Computer Link Master
7-3-4 VB Computer Link Slave
7-3-5 MODBUS Slave
7-3-6 MODBUS Master
7-3-7 CPU Link
7-3-8 Non Protocol
370
370
371
375
382
383
384
391
397
7-4 VS Series PLC Communication Protocol
8. Statement of Positioning Control Functions
8-1 Positioning Parameter Setup
8-1-1 Assign the positioning Units
8-1-2 Basic Parameters
8-1-3 Positioning Operation Setting Up
8-2 Special Components Related to Positioning Control Instructions
8-3 Positioning Control Instructions
8-4 Positioning Program Example
8-4-1 Positioning Program Example for the VS1 or VS2 Series PLC
8-4-2 Positioning Program Example for the VSM or VS3 Series PLC
8-4-3 8 Axes Positioning Program Example
408
417
418
419
420
421
425
429
468
468
470
472
Page 7
1. Intr od uction of V S se ri es PLC
1-1 The Basic C o ncept of PLC Use rs
1-1-1 Introduction of PLC
The programmable Logic Controller (PLC) is an industrial computer control system that is easy to maintain, low cost
and saves space. In addition to its programmable features, because it is used in the eld of industrial control, PLC is
also required to have high reliability and resistance to climate.
The concept of PLC was introduced by General Motors in 1968. It has been developed by decades. The initial PLC only
had the simple logic control ability, and thus was named as a programmable logic controller. Since Today's PLC
functions have covered the scopes of mathematical operations, servo control and communication links, the more
correct name for it should be programmable controller (referred to as PC), which means a controller that is
programmable. Due to the fact that it shares the same English abbreviation with the personal computer (referred to as
PC). Therefore, in order to distinguish, the programmable controller is referred to as PLC.
PLC has micro controller at its core. The rapid development of semiconductor technology has substantially increased
PLC's computing speed, program capacity and communication connectivity and decreased its prices. Coupled with the
demands on high reliability and resistance to climate the design requirements, PLC is widely used in the eld of
automatic control, and has become an extremely important part.
The conguration of programmable controller is shown in Fig. 1-1. Below describes the elements of a PLC briey:
Power supply Inside of a PLC consists of ordinary electronic circuit that must use low voltage DC power.
Currently, a PLC manufacturer provides with the AC or DC power input model for the customer to choose from.
The AC power model has a power supply circuit within the PLC to convert AC to DC. The DC power model needs to
provide its power from an external DC source (usually DC 24V) then the PLC uses the internal DC to DC circuit to
convert the power to supply the internal circuit require.
In the past, user prefers to use the AC power input models. However, since there are many related equipments
inside the control panel also required DC power, the use of an external DC power supply to provide all DC
consumptions is popular in recent years.
This is because the use of external DC power supply can avoid the event of unstable AC power input to damage the
controller (this problem is easy to handle if an external DC power supply is used);This is because the use of external
DC power supply can avoid the event of unstable AC power input to damage the controller (this problem is easy to
handle if an external DC power supply is used); therefore, the use of external power supply increases the stability of
control systems. On the other hand, it lowers the general cost of control systems. It is to kill two birds with one stone.
Program processing unit The CPU is the core of a PLC, that is responsible for interpreting the user programs
and calculating the results to achieve the purpose of control.
Small PLCs usually use microcontrollers as the core. Now the semiconductor technology has been able to integrate
CPU, memory and a variety of peripheral circuits into a SOC (System On Chip). This not only improves the overall
performance, but also reduces costs. So now, even small PLCs use high-performance 32-bit CPU chip to produce
controllers with fast execution, large program capacity and diverse functions, the real value for money.
1
Page 8
Program memory The memory for the PLC user to store the compiled control program, can let the CPU to
interpret and compute then produces the control procedures.
The program memory must have the ability to preserve its contents, in order to continue work after the power is
resumption. At present, there are two ways.
The rst way is to use the SRAM (static random access memory) cooperated with a lithium battery. The advantages
of this method are more exible and less restrictive. But, the disadvantage is once the battery is exhausted, all the
program and settings will disastrously disappear.
The second method is to use non-volatile memory (such as EEPROM, Flash ROM, FRAM, etc.). By the no battery
required characteristic of those semiconductor components to preserve the program. Its advantages are stable and
reliable; but usually with higher cost, has the restriction on the number of writing times and slower in writing.
A control system which is composed by a small PLC usually got less care from the owner. Therefore, it is a better
choice to use battery-free non-volatile memory to store the user program.
Data memory
The data memory in PLC is responsible for storing the data.
Both the operating system and the user program must have data workspace. Typically, SRAM (static random access
memory) is used as the data work area.
However, a part of the PLC data memory area must have latched feature to preserve the relevant parameter settings
and specic operating results when power is missing. There are two components can cooperate with the SRAM to
latch, one is the lithium battery, the other is the non-volatile (such as EEPROM, Flash ROM, FRAM, etc.) memory.
Regarding their advantages and disadvantages, please refer to the description of program memory.
Input interface The PLC reads external signals through its input interface to in order to operate as a reference
for the program.
In general, in order to prevent noise interference, the internal circuit of PLC inputs will isolate by photocouplers.
The acceptable voltage of the input photocoupler is not high, so special attention should be paid to the external
wiring. High voltage will damage the photocoupler and cause the input interface break down.
Output interface The PLC sends the computed result to its output interface, then to drive components and
reach the control action concretely.
In order to avoid interference from noises, at the output interface of a PLC has the isolation circuit. Typically, the
outputs are relays (by mechanically magnetic isolation) or transistors with photocouplers.
The relay output is the dry contact of switch which with the advantage of intuitive no current direction limit and
accepts AC or DC signal. The disadvantages are shorter life of contact, which is not a durable part and will affect the
controller's life. Also, the movement of its contact is slow (about 5 ~ 10ms) which is not suited for the fast response
output.
The transistor is a semiconductor contactless switch, which has advantages and disadvantages just opposite to a
relay.
According to the characteristics of the control objectives, should choose an appropriate output type when designing
the control system. In addition, for the purpose of the system reliability, may choose the transistor output type if it is
possible.
Programming interface The communication interface for to link the programming device with the PLC.
The user uses the programming device to write a control program and through the programming interface to load to
the PLC. Furthermore, monitoring and debugging to complete the program's calibration test.
Generally, the programming interface is a serial communication interface, the RS-232, RS-422 or RS-485 port is
popular. Recently there have been some PLC introduced with the USB interface to provide faster communication link.
Communication interface An interface which is responsible for linking PLC with the surrounding equipment for
data transmission.
Nowadays, the common communication interfaces are the RS-232, RS-422 and RS-485, also the use of Ethernet is
gradually increased.
In addition to protocol with their own products, the PLC manufacturers usually provide communication protocol with
MODICON's MODBUS to facilitate connecting with peripherals.
With the increasing complexity of automatic control systems, PLC manufacturers also pay attention to the
communication capacity to link with more peripherals. Therefore, higher level of PLC can provide several
communication interfaces to make it work with more peripherals and complete complex control demands.
Programming device The PLC manufacturer provides a device for users to program and debug.
Common programming devices include handheld programming device and PC programming software.
The handheld programming device usually uses the simple-text of Instruction List (IL), in fact it is an important part in
the programming development of a PLC. However, with the progress of the times and the popularity of personal
computers. The software at PC which can provide graphical interface and has become the best choice for PLC
programming.
Peripheral equipment Various devices are linked with the PLC to complete the control system together.
A PLC is often linked with peripheral equipments, such as the computer, human-machine interface (HMI), inverter,
thermostat, servo drive, power meter and other PLC.
The most commonly peripheral equipment which PLC operates with are:
1. A computer or human-machine interface connected to a PLC for machine settings and monitoring
2. A computer or human-machine interface connected with multiple PLCs that becomes a local network team and its
monitor.
3. Linking several PLCs for proceeding decentralized control.
4 Linking PLC to a variety of peripheral equipment of specic use, for extending control areas.
2
Page 9
1-1-3 PLC Operation and Scan Ti m e
The PLC systems use microcomputer technology to achieve the purpose of simulating traditional relay control panel.
The microcomputer rst reads the external inputs and then sequentially scans and executes the user program, so as to
calculate the control result that the user wants to achieve. Finally, it outputs the result to drive the external loads and
performs the real control action. The PLC execution order is shown in Fig. 1-2.
The PLC will sequentially execute the cycle ( ① receive external inputs; ② process the user program; ③ output the
computed results). Then, the time spent for one cycle is called a “Scan Time”.
One cycle of
“Scan Time”
① To receive the
external inputs
② To process the
user program
③ To output the
computed results
Fig. 1-2 PLC operation order and scan time
Loads the status (ON/OFF) form external input components via
the input interface and stores that into the data memory.
The CPU uses the status in the data memory and the rule of user
program to compute the results, then stores all the results into the
data memory.
X0
X1
Y0
Y0
˙˙˙˙˙˙˙˙
User program
Y20M0M100
Y25
M105
Transmits the operation result from the data memory to the
output part, via the output interface to control external loads.
The PLC processes user program by the Sequential Scan (in the Ladder Diagram scans from left to right then from top
to bottom), as shown in Fig. 1-3. Therefore, must pay extra attention to the procedural order of the program.
Fig. 1-3 PLC makes the sequential scan at the Ladder Diagram
The “Scan Time” and “Sequential Scan” are the basic and the most important concepts. A PLC user must fully
understand those meanings, and pay attention about the inuences when designing the PLC program.
3
Page 10
1-1-4 PLC Input Signals
PLC's input endpoint is a window for PLC to accept control signals from outside, and is used to interface with a variety
of switches and sensing elements. In recent years, the PLC functions have been tending to more developed
diversication, detecting elements connected with the input points are also Therefore, it is necessary for more diverse.
users to further understand the interface of PLC input point. Here are a few things to note:
1. As the PLC's work environment is often lled with a variety of noises and interfering sources, in order to work properly,
photocouplers are often used at input endpoint to isolate noises.
2. The reaction speeds of different photocouplers are varied. The High-speed photocouplers can transmit signals faster,
but the cost is higher. Therefore, high-speed photocouplers are often used at the input points of PLC which need
high-speed responses. In the rest of case, general photocouplers are used.
3. In order to prevent noise interferences, the input circuit of a PLC in addition to photocouplers, also added with lters.
Filters are divided into analog lters (composed of RC circuit) and digital lters (lter time is adjustable).
According to functional requirements the PLC inputs can be divided into high-speed and general inputs. The general
inputs are usually used in receiving signals which are not too fast, and often connected to the mechanical switchs
(signal may have bounce in action). Thus, approximately 10ms lter circuits are added with in the general inputs.
The high-speed inputs are usually designed for multiple functional inputs, those can be used as general inputs (need
longer lter time) and can also process high-speed signals (need tiny lter time). Therefore, digital lters are used
with high-speed inputs, they adjust lter time according to different needs (higher speed does not always mean better).
4. There is a time delay between the PLC's CPU received and the external signal input. The delay time is accumulated
with the aforementioned photocoupler and added lter.
5. In order to meet multiple requirements, the current PLCs are usually designed with some high-speed input
endpoints to execute some functions which require high speeds, such as high-speed counting, external
interruption, pulse capture, frequency meter and pulse measurement.
These signals usually require rapid responses and are relatively susceptible to noises. Therefore, in use, extra
attention should be paid to its wiring. To avoid interfering sources, isolation cables can be used to avoid any
interference.
6. There is certain amount of drive current at the PLC input endpoint, when using sensing elements, one must pay
attention, especially when using two-wire sensing elements.
7. PLC cannot read input signals which change too fast. For PLC, regardless of input signals, ON or OFF, its duration
must be longer than the scan time; otherwise, PLC is likely failed to read correct signals, as shown in Fig.1-4.
When input signal changes too fast to be read normally, the interrupt input function or pulse wave capture function
can be employed.
This ON signal is unreadable This ON signal is readable This OFF signal is unreadable
Input signal
Output the computed
ONOFFONOFF
User program processingUser program processingUser program processing
One cycle of
“Scan Time”
results
Receive the external
inputs
Fig. 1-4 PLC cannot read input signal which is swap over too fast
Time
4
Page 11
1-1-5 PLC Output Signals
The PLC's output endpoint is a window for PLC to send out the computed results, and is used to interface with a variety
of loads. Since the output signals are to drive external loads and to complete machine's actions, must pay extra
attention about the safety. Please note the following points:
1. Never ignore the possibility of the PLC failure. It is required to design an external safety circuit and safety mechanism
to avoid accidents.
2. PLCs typically push external loads through relays or transistors. The difference between the characteristics of two is
great, with each advantages and disadvantages. In designing, one should select properly.
The advantages of using a relay are that its contact switch has no current polarity and promotes more current (about
2A), and AC or DC power supply can be used. Its shortcomings are that the contact switch is mechanical, with
mechanical life and electrical life limits. Basically, the relay is not a durable product, and becomes the unreliable
factor in a control system.
The advantages of using a transistor are since it switches by the semiconductor. The number of swap times is
unlimited and the speed of switch is fast, depending on demands could reach hundreds KHz. Its shortcomings are
has current polarity, can only be used for DC load, below 30V and with less current (about 0.1A ~ 0.5A).
When using a relay output, must pay attention to the frequency of action then to calculate the machine's life. That is
for to avoid controller breakdown due to the damage of the relay. Therefore, most control panels take the approach
of attaching a relay externally. Using external relays to promote loads can be considered as the most correct way to
assemble panels. At this point, a transistor output controller can be used to enhance the panel's reliability.
3. In order to prevent interference from noises, the PLC outputs must take isolation measures. The relay output is
magnetically isolated and this can cause an output delay of about 10 ms. The transistor output is isolated by a
photocoupler, the output delay is below 1ms for the general output but only several µs delay for high-speed output.
4. There is a specication of output capability for the load and should be taken seriously. Do not use excessively. In
general, the output specication of the relay is AC220V 2A or less; the transistor is DC30V 0.1A ~ 0.5A or less. For
the unsuitable load to push excessive output at a short time may not have a problem. However, it will certainly affect
the service life of PLC.
1-1-6 Some Improper Diagrams at a PLC Program
Some conventional circuits of relay switchboards cannot be directly replaced by the Ladder Diagrams at PLC.
The following diagrams indicate such circuit loops on the left and the alternative for PLC are on the right.
X0
X1
X0
X0
X1
X2
Y0
Y0
Y1
Y1
Y0
X1
X1X2
X0
X0
X1
X0
X0
X1
X2
X1
Y0
Y1
Y1
Y0
Y0
5
Page 12
1-1-7 Double Coil Output
The PLC program with the following characteristic will affect the operation result, please pay special attention.
1. When executing the user program PLC follows sequential scan (from left to right, up to down).
2. In the PLC executing process, only the contents of the data memory will be used and changed. Actually to drive the
external loads are performed after the execution of the program and there is a procedure to output the computing
results.
As the figure below shows, Y0 is set as OUT twice, which is referred to as double coil output In this case, it is the state
of X1 that actually drives external loads.
X0
Y0
X1
To resolve the confusion of double coil output, methods are recommended as follows:
Parallel connect the driving conditions and then output once.
Use the SET, RST instructions.
Use the CJ instruction.
Use the Step Ladder (STL) instruction or Sequential Function Chart (SFC)
˙˙˙˙˙˙˙˙˙˙
Y0
1-1-8 Conclusion
A PLC usually performs the important part in the automatic control system. Appropriate protection of the PLC can
improve the reliability of the system.
Traditional PLCs which we are familiar with usually use AC power supply, relay output and terminal block wiring. The AC
power supply unit is susceptible to damage due to the instability of the power system (especially in non-industrial
advanced countries). The relay output has the lifespan limit because of mechanical contact. Also, to disassemble the
wiring at terminal blocks is time-consuming, inconvenient to fault repair (although has separable terminal products but
with higher price).
The best conguration for the new generation of PLCs should be the combination of DC power supply, transistor output
and connector wiring to exclude factors which affect the reliability from PLC systems as far as possible. In addition, this
way makes it possible to reduce wiring time, reduce costs and improve maintenance convenience. It would be more p
erfect if they are equipped with a memory card to store programs and data . When a PLC fails, the really important and
difcult part is to transfer the program (which need system-related professionals to deal with), rather than the work of
dissembling a terminal block (what a general electromechanical person can handle). With a memory card, the PLC
replacement work can become easy.
Before using a PLC, you should really understand the specications of each elements and avoid excessive use (with
particular attention to power capacity and output specications). Also, choose the right products according to your
needs in order to design a high cost-effective control system.
PLC is th e core of a co ntrol sy stem!
Having correct knowledge and ideas helps you establish a
stable and reliable control system.
6
Page 13
1-2 The VS Seri e s PLC Products O v erview
VS Series Controller Provides [Comprehensive] Control Application
Item
Process Time of
Basic Instruction
Memory Capacity of Project
Max. Input/Output Points
Programming Port
Unit Built-In Comm. Port
Expandable Comm. Port
Multi-Func. High Speed In
Pulse Output
Number of Special Modules
Number of Special Cards
Function of Expansion Card
Function of Memory Card
☆
For the VSM-28ML-D Line D river model, its two Hardware High-Speed Counte rs ca n cou nt 1 MHz pulses respectively.
※
Those 4 outputs are a vai lable generate 1 MHz pulses individually at th e VSM -28-ML-D Line Driver model; 200 kHz at
Series
VS1 General VS2 Advanced VSM Motion Control
0.17µs / St ep
16K Words
128 pt. + 24 (at Exp. Cards)256 pt. + 24 (at Exp. Cards)256 pt. + 24 (at Exp. Cards)512 pt. + 24 (at Exp. Cards)
Built-in 12Mbps high-speed Mini USB port
CP1 (RS-485) provides various communication modes: Computer Link, MODBUS (Master / Slave), CPU Link, Non-protocol...
CP2
8 points 10 kHz 8 points 50 kHz
4 points ( ax es) 50 kHz
1
EC1 ~ EC3 for the DIO, communication (RS-232, RS-485) or special card (e.g. Analog, Temperature, Inverter Speed Control)
Maintenance-free user project & large data memory card provides the best subject transplanting method for system maintain
※
0.17 µs / Step
32K Words32K Words64K Words
CP2 ~ CP3
4 points ( ax es) 50 kHz
8
3
※
0.17 µs / Step0.15 µs / Step
CP2 ~ CP3CP2 ~ CP5
4 points 200 kHz & 4 points 50 kHz
4 points ( ax es) 200 kHz
8
3
VS3 High Performance
☆
※
16
3
the VSM/VS3's NPN; 50 kHz at the VS1/VS2' s NPN o r 5 kHz a t the PNP Main Unit. Not available in the relay outp ut un it.
The VS Family has the VS1 General, VS2 Advanced, VSM Motion Control and VS3 High Performance series controllers, the
complete product line can satisfy various applications from basic to high-end and the combination of the best balance between cost
and performance. Also, based on the concept of “the most suitable product” to enhance the competitive power and achieve the
value beyond price.
The VS1 General Series is suitable for various easy auto-control systems to satisfy with simple sequence control functions, such as
cargo lift, parking equipment, conveyor, shoe machinery, brick machinery, woodwork machinery, etc.
The VS2 Advanced Series is suitable for general purpose auto-control systems to satisfy with analog or temperature demanded
controls, such as passenger lift, rubber vulcanizer, plastic injection molding machine, metal stamping machine, packing machinery,
etc.
The VSM Motion Control Series is a good match for various industrial machinery needing precise positioning functions by
servo/stepper motors, which including labeling machine, sleeving machine, dispenser, lm laminating machine, pipe bending
machine, cutting machine, bar feeder, etc.
The VS3 High Performance Series is the solution for various control systems of complicated sequence or large scale, that
including printing machinery, automatic production line, semiconductor peripheral device, automated storage/retrieval system,
electroplating procedure control, etc.
7
Page 14
1-3 Specific a tion Table of All the VS Serie s Main Units
Item
Operation Control Method
Programming Language
I/O Control Method
Process
Time
Number of
Instructions
Project Memory Capacity (Flash ROM)
Max. Input/Output Points
Digital
Input /
Output
Internal
Relay
Timer (T)
Counter
(C)
Software
High Speed
Counter
(C)
Hardware High Speed Counter
Data
Register
Pointer
Basic Instruction
Application Instruction
Basic Instruction
SFC Instruction
STL Instruction
Application Instruction
External Input (X)
External Output (Y)
(M)
(S)
General
Latched
Special
Initial
General
Latched
Annunciator
General
Latched
General
Latched
1-Phase
2-Phase
A / B Phase
Auxiliary
Relay
Step Relay
100mS
10mS
1mS (Retentive)
100mS (Retentive)
1mS
16-bit Up
32-bit
Up / Down
32-bit
Up / Down,
Latched
General (D)
Latched (D)
Special (SD)
Index Register (V / Z)
Extension Register (R)
Mark Pointer
Branch Pointer (P)
Table Nickname
Table Code (Q)
Interrupt Pointer (I)
Nest Pointer (N)
VS1 SeriesVS2 SeriesVSM SeriesVS3 Series
Cyclic Operation by Stored Program
Ladder Diagram + Sequential Function Chart (SFC) or Ladder Diagram + Step Ladder (STL)
Batch Processing
0. 17 µs
A few µs ~ Hundreds of µs
29
2
2
1 69 171171
The project at the memory is including the parameter area, user program, pointers, tables and comments.
Support 1, 2 or AB phase counting mode, 1-phase 8 points or 2/AB phase 4 sets max.
2 sets: HHSC1 and HHSC2. Support U, U/D+DIR, U+D, AB×1, AB×2 or AB×4 operating mode
Cooperate with high speed pulse output to control positioning
4 points 50kHz (4-axis
positioning control)
By installing VS-MCR Multi-Function Memory Card to indicate year, month, day, hour, min., sec. and week
By installing a VS-MCR/VS-MC card to expand no-battery required 16Mb latched memory for user project
and 655,360 Words data bank
10/14M Main Unit (EC1), 20/24M Main Unit (EC1~EC2), 28/32M Main Unit (EC1~EC3)
DI/DO, communication or special function card (AI, AO, temperature input, inverter speed control, etc.)
(VS-3AV-EC won't occupy)
~
CP4 ~ CP5 (at the EC3)
50kHz × 8 points
4 points 50kHz (4-axis
positioning control)
8 8
Analog I/O Module, Temperature Input Module, etc.
1
333
200kHz × 4 points ☆
50kHz × 4 points
4 points 200kHz (4-axis positioning control) ☆
200kHz × 4 points
50kHz × 4 points
16
output points can individually generate 1MHz pulses.
9
Page 16
1-4 Overvie w of VS series PLC m o dels
Item
VS1 Series
Main Unit
VS2 Series
Main Unit
VSM Series
Main Unit
VS3 Series
Main Unit
DIO
Expansion
Module
Power
Module
Special
Function
Module
Model Name
VS1-10M -D
VS1-14M -D
VS1-20M -D
VS1-24M -D
VS1-28M -D
VS1-32M -D
★
★
★
★
★
★
VS1-32MT-DI
VS2-24M -D
VS2-32M -D
★
★
VS2-32MT-DI
VSM-Mini
VSM-14MT-D
VSM-24MT-D
VSM-32MT-D
VSM-28ML-D
VSM-32MT-DI
VS3-32M -D
★
VS3-32MT-DI
VS-8 / 16X
VS-8 / 16Y
VS-8XY
VS-16XY
VS-28XYR
VS-32XY
★
★
★
★
VS-16X-I
VS-16YT-I
VS-16XYT-I
VS-32XYT-I
VS-PSD
-
VS 4AD
-
VS 2DA
-
VS 3A
-
VS 6A
-
VS 4TC
-
VS 8TC
-
VS 2PT
-
VS 4PT
Main Specification
VS1 Main Unit: 6 DI (DC 24V, X0~X5 10 kHz); 4 DO ★; 16K words project memory; 1 Expansion Card socket;
I/O by screw-clamp terminal
VS1 Main Unit: 8 DI (DC 24V, X0~X7 10 kHz); 6 DO ★; 16K words project memory; 1 Expansion Card socket;
I/O by screw-clamp terminal
VS1 Main Unit: 12 DI (DC 24V, X0~X7 10 kHz); 8 DO ★; 16K words project memory; 2 Expansion Card sockets;
I/O by screw-clamp terminal
VS1 Main Unit: 4 DI (DC 24V, X0~X7 10 kHz); 10 DO ★; 16K words project memory;
2 Expansion Card sockets; I/O by screw-clamp terminal
VS1 Main Unit: 16 DI (DC 24V, X0~X7 10 kHz); 12 DO ★; 16K words project memory;
3 Expansion Card sockets; DIO Expansion Module available; I/O by screw-clamp terminal
VS1 Main U ni t: 20 DI (DC 24V, X0~X7 10 kH z) ; 12 DO ★; 16K words p ro ject memory ;
3 Expans io n Card socket s; D IO Expansio n Mo dule availa bl e; I/O by scr ew -c lamp term in al
VS1 Main Unit: 16 DI (DC 24V, X0~X7 10 kHz); 16 DO (100mA NPN transistor, Y0~Y3 50 kHz);
16K words project memory; 3 Expansion Card sockets; DIO Expansion Module available; I/O by IDC connector.
VS2 Main Unit: 12 DI (DC 24V, X0~X7 50 kHz); 12 DO ★; 32K words project memory; 2 Expansion Card sockets;
DIO Expansion & 8 Special Modules available; I/O by screw-clamp terminal
VS2 Main Unit: 16 DI (DC 24V, X0~X7 50 kHz); 16 DO ★; 32K words project memory; 3 Expansion Card sockets;
DIO Expansion & 8 Special Modules available; I/O by screw-clamp terminal
VS2 Main Unit: 16 DI (DC 24V, X0~X7 50 kHz); 16 DO (100mA NPN transistor, Y0~Y3 50 kHz);
32K words project memory; 3 EC sockets; DIO Expansion & 8 Special Modules available; I/O by IDC connector
VSM Development Tool Unit: Inner connected DI/DO (Y0~Y7 to X0~X7); 32K words project memory;
Memory Card Socket; CP1 RS-485 Communication Port
VSM Main Unit: 8 DI (DC 24V, 4×200 kHz + 4×50 kHz); 6 DO (500mA NPN transistor, Y0~Y3 200 kHz);
32K words project memory; 1 Expansion Card socket; I/O by screw-clamp terminal
VSM Main Unit: 12 DI (DC 24V, 4×200 kHz + 4×50 kHz); 12 DO (500mA NPN transistor, Y0~Y3 200 kHz);
32K words project memory; 2 Expansion Card sockets; DIO Expansion & 8 Special Modules available;
I/O by screw-clamp terminal
VSM Main Unit: 16 DI (DC 24V, 4×200 kHz + 4×50 kHz); 16 DO (500mA NPN transistor, Y0~Y3 200 kHz);
32K words project memory; 3 Expansion Card sockets; DIO Expansion & 8 Special Modules available;
I/O by screw-clamp terminal
VSM Main Unit: 4 Line Driver DI (for 2 hardware counters up to 1 MHz) + 12 DI (DC 24V, 4×50 kHz & 8 normal);
8 Line Driver DO (4 × 1 MHz & 4 normal) + 4 DO (500mA NPN transistor); 32K words project memory;
3 Expansion Card sockets; DIO Expansion & 8 Special Modules available; I/O by screw-clamp terminal
VSM Main Unit: 16 DI (DC 24V, 4×200 kHz + 4×50 kHz); 16 DO (100mA NPN transistor, Y0~Y3 200 kHz);
32K words project memory; 3 Expansion Card sockets; DIO Expansion & 8 Special Modules available;
I/O by IDC connector.
VS3 Main Unit: 16 DI (DC 24V, 4×200 kHz + 4×50 kHz); 16 DO ★(Y0~Y3 200 kHz at NPN transistor model);
64K words project memory; 3 Expansion Card sockets; DIO Expansion & 16 Special Modules available;
I/O by screw-clamp terminal
VS3 Main Unit: 16 DI (DC 24V, 4×200 kHz + 4×50 kHz); 16 DO (100mA NPN transistor, Y0~Y3 200 kHz);
64K words project memory; 3 EC sockets; DIO Expansion &16 Special Modules available; I/O by IDC connector
DI Expansion Module: 8 / 16 DI (DC 24V); input by screw-clamp terminal
DO Expansion Module: 8 / 16 DO ★; output by screw-clamp terminal
DIO Expansion Module: 4 DI (DC 24V); 4 DO ★; I/O by screw-clamp terminal
DIO Expansion Module: 8 DI (DC 24V); 8 DO ★; I/O by screw-clamp terminal
DIO Expansion Module: 16 DI (DC 24V); 12 DO (2A Relay); I/O by screw-clamp terminal
DIO Expansion Module: 16 DI (DC 24V); 16 DO ★; I/O by screw-clamp terminal
DI Expansion Module: 16 DI (DC 24V); input by IDC connector
DO Expansion Module: 16 DO (100mA NPN transistor); output by IDC connector
DIO Expansion Module: 8 DI (DC 24V); 8 DO (100mA NPN transistor); I/O by IDC connector
DIO Expansion Module: 16 DI (DC 24V); 16 DO (100mA NPN transistor); I/O by IDC connector
Power Repeater Module: DC 24V power input to transfer to DC 5V 500mA + DC 12V 800mA,
those inner power outputs provide for the Modules behind
Analog Input Module: 4 channel (16-bit) inputs, each channel could input either –10~+10V, 4~20mA or
–20~+20mA; isolated
Analog Output Module: 2 channel (16-bit) outputs, each channel could output either –10~10V, 4~20mA or
–20~+20mA; isolated
Analog I/O Module: 2 channel (16-bit) inputs + 1 channel (16-bit) output, each channel could input/output either
–10~+10V, 4~20mA or –20~+20mA; isolated
Analog I/O Module: 4 channel (16-bit) inputs + 2 channel (16-bit) outputs, each channel could input/output either
–10~+10V, 4~20mA or –20~+20mA; isolated
Thermocouple Temperature Input Module: 4 channel thermocouple (K, J, R, S, T, E, B or N type) inputs,
0.1℃ / 0.1℉ resolution ; isolated
Thermocouple Temperature Input Module: 8 channel thermocouple (K, J, R, S, T, E, B or N type) inputs,
VS-8X I-E C
VS-8Y TI- EC
VS-48 5-E C
VS-48 5A- EC
VS-D 485 -EC
VS-D 485 A-E C
VS-D2 32- EC
VS-D5 2A- EC
VS-EN ET-EC
VS-3AV-E C
VS-4A D-E C
VS-2DA-E C
VS-4A -EC
VS-3I SC-E C
VS-2TC-E C
VS-4TC-E C
VS-1P T-EC
V S -2P T-EC
VS -MC
VS -MCR
VS PC-2 00A
V SEC - □□ □
VB -T 8 R
V B -T 8RS
V B -T 8M
VB-T16 M
VB-T16 TB
V BID C - □□ □
V BIW- □ □□
V BID C -FC 100
V BID C -FC 250
V BID C -HD 20
V BID C -HD 100
V B -HT 214
Main Specification
DI Expansion Card: 4 DI (DC 24V); output by screw-clamp terminal
DI Expansion Card: 8 DI (DC 24V); input by screw-clamp terminal
DO Expansion Card: 4 DO ★; output by screw-clamp terminal
DO Expansion Card: 8 DO (DC 24V, 300mA NPN transistor); output by screw-clamp terminal
DIO Expansion Card: 2 DI (DC 24V); 2 DO ★; I/O by screw-clamp terminal
DIO Expansion Card: 4 DI (DC 24V); 4 DO ★; I/O by screw-clamp terminal
DI Expansion Card: 8 DI (DC 24V); input by IDC connector
DO Expansion Card: 8 DO (DC 24V, 100mA NPN transistor); output by IDC connector
RS-485 Communication Expansion Card: One non-isolated RS-485 port with TX / RX indicators; dist. 50m Max.
RS-485 Communication Expansion Card: One isolated RS-485 port with TX / RX indicators; dist. 1000m Max.
RS-485 Communication Expansion Card: Dual non-isolated RS-485 ports with TX / RX indicators; dist. 50m Max.
RS-485 Communication Expansion Card: Dual isolated RS-485 ports with TX / RX indicators; dist. 1000m Max.
RS-232C Communication Expansion Card: Dual non-isolated RS-232 ports with TX / RX indicators;
dist. 15m Max.; wiring by the RX / TX / SG terminals
RS-485 + RS-232C Communication Expansion Card: One isolated RS-485 port (1000m) &
one non-isolated RS-232C port (15m), both with TX / RX indicators and wiring by terminals
Ethernet + RS-485 Communication Expansion Card: One Ethernet port (with additional non-isolated RS-485, dist.
50m) & one non-isolated RS-485 port (dist. 50m), both with TX / RX indicators
Brief Voltage I/O Card: 2 channel (0 ~ 10V, 12-bit) inputs; 1 channel (0 ~ 10V, 10-bit) output; with a calibrated
DC 10V output; non-isolated
Analog Input Card: 4 channel (12-bit) inputs, each channel could output either –10 ~ +10V, 4 ~ 20mA or
–20 ~ +20mA; non-isolated
Analog Output Card: 2 channel (12-bit) outputs, each channel could input either –10 ~ +10V, 4 ~ 20mA or
–20 ~ +20mA; non-isolated
Analog I/O Card: 2 channel (12-bit) inputs + 2 channel (12-bit) outputs, each channel could input/output either
–10 ~ +10V, 4 ~ 20mA or –20 ~ +20mA; non-isolated
Inverter Speed Control Card: 3 channel (0.1% resolution) voltage outputs; totally isolated for each channel
Thermocouple Temperature Input Card: 2 channel (K, J, R, S, T, E, B or N type thermocouple, 0.2 ~ 0.3℃
resolution) inputs; non-isolated
Thermocouple Temperature Input Card: 4 channel (K, J, R, S, T, E, B or N type thermocouple, 0.2 ~ 0.3℃
resolution) inputs; non-isolated
R: 2A Relay;
T: 0.5A NPN transistor (EC cards are 0.3A), at Y0~3 could generate purse (VS1/2: 50kHz; VSM/3: 200 kHz);
P: 0.5A PNP transistor, at Y0~3 could generate 1kHz purse
All Main Unit, Special Module and IDC's module are required DC 24V -15% / +20% power input
11
Page 18
12
Page 19
2. Comp on ent Descrip ti ons
2-1 Table of Comp o nents
Item
External Input
(X)
External Output
(Y)
Au xil iar y Rel a y
(M )
St ep Re lay
(S )
Timer
(T )
Counter
(C)
Software
High Speed
Counter
(C)
Register
(D)
Index Register (V & Z)
Extension Register
(R)
Mark Pointer
Branch Pointer (P)
Table Nickname
Table Code (Q)
Interrupt Pointer
(I)
Nested Pointer N
VS1 Series
VS2 Series
VSM Series
VS3 Series
VS1 Series
VS2 Series
VSM Series
VS3 Series
General use
Latched
Special use
General use
Latched
Special use
Annunciator
100mS
10mS
1mS Retentive
100mS Retentive
1mS
16-bit Up
32-bit Up / Down
32-bit Up / Down, Latched
General use
Latched
Special use
VS1, VS2, VSM Series
VS3 Series
External Interrupt
Timer Interrupt
Software High Speed Counter
Hardware High Speed Counter
Description
X0~X77, 64 Pt.(named by the octal system)
X0~X177, 128 Pt.(named by the octal system)
X0~X177, 128 Pt.(named by the octal system)
X0~X377, 256 Pt.(named by the octal system)
Y0~Y77, 64 Pt.(named by the octal system)
Y0~Y177, 128 Pt.(named by the octal system)
Y0~Y177, 128 Pt.(named by the octal system)
Y0~Y377, 256 Pt.(named by the octal system)
M0~M1999 , M4000~M8191, Tot.= 6192 Pt.
M2000~M3999 , 2000 Pt.
M9000~M9511 , 512 Pt.
S0~S9 , 10 Pt.
S10~S499, S1500~S4095 , Tot.= 3086 Pt.
S500~S899, S1000~S1499 , Tot.= 900 Pt.
S900~S999, 100 Pt. latched
T0~T199, 200 Pt.Range: 0.1~3,276.7 Sec.
T200~T245, 46 Pt.Range: 0.01~327.67 Sec.
T246~T249, 4 Pt.Range: 0.001~32.767 Sec.
T250~T255, 6 Pt. Range: 0.1~3,276.7 Sec.
T256~T511, 256 Pt. Range: 0.001~32.767 Sec.
C0~C99, 100 Pt. Range: 0~32,767
C100~C199, 100 Pt. (Range: 0~32,767; Latched)
C200~C219, 20 Pt. (Range: -2,147,483,648~2,147,483,647)
C220~C234, 15 Pt. (Range: -2,147,483,648~2,147,483,647; Latched)
C235~C245, 11 Pt. 1-phase counter
C246~C250, 5 Pt. 2-phase counter
C251~C255, 5 Pt., AB-phase counter
D0~D6999, 7000 Pt.
D7000~D8999, 2000 Pt.
D9000~D9511, 512 Pt.
V0~V7, Z0~Z7, 16 Pt.
R0~R9999, 10000 Pt.
R0~23999, 24000 Pt.
1024 points: Each pointer can be named by P0~P1023 or
16 characters
1024 points: P0~P1023
32 points: Each table can be named by Q0~Q31 or 16 characters
32 points: Q0~Q31
8 points: IX0P/F~IX7P/F
3 points: ITA□□ ~ITC□□
8 points: IHC0~IHC7
2 points: IHHC1~IHHC2
N0~N7, 8 Pt.
For the X0~X7,
each can be
used once
1024 pointers in total
32 tables in total
Decimal
(K)
Hexadecimal
(H)
Real Number (E)
16-bit
32-bit
16-bit
32-bit
32-bit
K– 32, 768 ~K3 2 ,76 7
K –2, 147 ,48 3,64 8~K 2,1 47, 483, 647
H 0~ HFF FF
H 0~H FFF FFF FF
E 3.402 +38~E3.402 +38 decimal or exponent notation
−
13
Page 20
2-2 Externa l I nput (X) and Ext e rnal Output (Y )
2-2-1 External Input (X)
VS Series PLCs read the ON/OFF status of various external switches and sensing elements as operating conditions
through the input points. To prevent problems such as noise interference and switch bouncing, there is a filter of about
10ms equipped at each input point. Since the external input X0~X7 of a Main unit are designated as multi-function input
points to perform various high speed functions, therefore, the filter time of these 8 input points is adjustable.
Functions of these 8 output points are listed below.
Fu ncti o n
Common Input
Frequency Meter
Software High
Speed Counter
External Interrupt
Pulse Capture
Hardware High
Speed Counter
Pulse Measurement
Positioning Control
Ex tern a l Inp u t Poin t
X0
Use D9020 to adjust the lter time as 0~60ms
Use the SPD instruction to perform the speed detection function
Use C235~C255 1-phase/2-phase/AB phase counters, besides to generate IHC0~IHC7 interrupt
IX0P/FIX1P/FIX2P/FIX4P/FIX5P/FIX6P/FIX7P/F
M9170M9171M9172M9173M9174M9175M9176M9177
HHSC1, to make
the IHHC1 interrupt
Width / Period
measurement
Can be the input points of the positioning control's DOG, PG0, INT signals or for the handwheel.
X1X2
X3
IX3P/F
HHSC2, to make
the IHHC2 interrupt
Width / Period
measurement
X4
X5X6
X7
Re f .
Pa ge
179
186
25
54
55
58
56
423
For the descriptions of each item, please refer to the page listed at the “Ref. Page ” above.
The contact of a common input point in the program is available to work with an other special function.
When one of the X0~X7 performs a mentioned special function above, this input point is not reusable with another
special function. However, the External Interrupt could cooperate with Pulse Measurement function. (For details,
please see the specific function description.)
When a mentioned special function above performs, the filter time of this input point will be automatically adjusted to
0ms (deviates form D9020). To prevent noise interference, input points X0~X7 are also equipped with RC filters.
Thus, the filter time of 0 ms is not true 0 ms. In addition, the response time of input points X0~X7 is varied depending
on the Series of VS1, VS2, VSM or VS3.
When filter time is adjusted as 0ms, the minimum pulse width required to transmit input signals to respective input
points are listed as follows.
Se r ies
VS 1
VS 2
VS M
VS M-2 8ML
VS 3
X0
50 µs
10 µs10 µs10 µs10 µs10 µs10 µs10 µs10 µs
X1X2
50 µs50 µs
2.5µs2.5µs2.5µs2.5µs10 µs10 µs10 µs10 µs
0.5µs0.5µs0.5µs0.5µs10 µs
2.5µs2.5µs2.5µs2.5µs
10 µs
Ex tern a l Inp u t Poin t
X3
50 µs50 µs50 µs50 µs50 µs
X4
X5X 6
10 µs10 µs10 µs
10 µs10 µs10 µs
X7
When a multi-function input point is performing a special function, the response of the point requires fast and
relatively sensitive (the fast reaction, the more sensitive), contrarily susceptible to noise interference.Therefore, pay
special attention to its external wiring, try to avoid interfering sources, and use isolation lines.
14
Page 21
2-2-2 External Output (Y)
The contacts of external output in the VS Series PLC are for the purpose of to drive external loads. By transmitting the
operation results through its external output points, the PLC drives various loads, such as motors, electromagnetic
valves, electromagnetic conductors, etc. and virtually perform control motions.
For various loading needs, the VS Series PLCs have different output types, such as relay, NPN transistor and PNP
transistor. Every relay has a coil and contact that uses magnetically coupled to separate the PLC internal circuit from
the external, but a transistor output uses a photocoupler to prevent noise interference.
Relay outputs have approximately 10ms of output delay, while transistor outputs have approx. 1ms. These delays
result that certain applications cannot be fully met. Therefore, the 4 output points of Y0~Y3 are designated to be
multi-function output points.
Fu ncti o n
Common Output
Paulse output
PWM Output
Positioning Control
Ex tern a l out p ut poi nt
Y0
The output type is selectable, that includes the relay, NPN transistor or PNP transistor.
Use the PLSY or PLSR instruction to generate a pulse string to the driver of stepper or servo motor
Use the PWM instruction to generate PWM signal
Use the Positioning Control instruction to generate positioning pulses directly to the driver of the
step motor or servo motor, by the method to execute the accurate positioning control
Y1Y2
Y3
Re f .
Pa ge
No .
18 7
18 9
42 3
Except for the common output function, the other functions mentioned above can only available be used at a
transistor output main unit.
For the descriptions of each item, please refer to the page listed at the “Ref. Page No.” above.
At a time, each Y0~Y3 output point allows to execute one instruction of special function only. Also, cannot intermix
different functional groups mentioned above.
The frequency of the Y0~Y3 output at the VS1, VS2, VSM or VS3 series is different, the list below is the capability:
Se r ies
VS 1
VS 2
VS M
VS M-2 8ML
VS 3
Y0
50 KHz
50 KHz
20 0KH z20 0KH z20 0KH z20 0KH z
1M Hz
20 0KH z20 0KH z20 0KH z20 0KH z
Ex tern a l out p ut poi nt
Y1Y2
50 KHz
50 KHz
1M Hz1MHz1M Hz
50 KHz
50 KHz
Y3
50 KHz
50 KHz
15
Page 22
2-2-3 External Input/Output Assigned Numbers
The identification numbers of the External Input/Output points are assigned by the octal numeral system.
The table below lists the assigned numbers of Input (X) and Output (Y) in the VS1 Main Unit:
The table below lists the assigned numbers of Input (X) and Output (Y) in the VS3 Main Unit:
Models
Input No.
Output No.
VS3-32MVS3-32MT- DI
X0~X17
16 Pt.
Y0~Y17
Pt.16
X0~X17
16 Pt.
Y0~Y17
Pt.16
X0~X17
6 Pt.1
Y0~Y17
Pt.16
X0~X17
16 Pt.
Y0~Y13
Pt.12
Notes for the VS1 Series PLC Module Expansion
The Main Unit of VS1-10M/VS1-14M/VS1-20M/VS1-24M is not equipped with the module expansion slot.
The Main Unit of VS1-28M/VS1-32M is equipped with the module expansion slot, which can reach 64 inputs and 64
outputs (X0~X77, Y0~Y77), 128 points in total.
The module expansion slot of the VS1 series PLC can be equipped with DIO modules, but not allow special module.
The Main Unit of VS1-28M/VS1-32MT-DI occupies the assigned numbers of X0~X17 and Y0~Y17. Therefore, the
first expansion module is started from X20 and Y20.
The Main Unit of VS1-32M occupies the assigned numbers of X0~X27 and Y0~Y17. Therefore, the first expansion
module is started from X30 and Y20.
X0X2 3X3 0X4 0
X2X1X0S S
X0 1 2
INPU T X
VS- 8X
PWR
3 456 7
X6X5X4X3
X7
DC24 V
INPU T
VS1 -32 MR
3 456 7
X0 1 2
10
15 16
11121314
17
23
20
2122
RUN
PWR
ERR
3 456 7
Y0 1 2
10
13
1112
Y0Y1 3
Y0
C0
Y2 0
X2X1X0S S
INPU T X
VS- 16X YR
X0 1 2
PWR
Y0 1 2
Y1 Y 2
3 456 7
3 456 7
OUTP UT Y
Y3
X6X5X4X3
X7
Y6
Y5
C1
Y7
Y4
The VS-8XY module occupies 8 input points and 8 output points.
The VS-28XYR expansion module will occupy 16 input and 16 output points. Besides, it is unable to expand any
module on its right side.
16
Page 23
Notes for VS2, VSM and VS3 Series PLCs module expansion.
The Main Unit of VSM-14M is not equipped with the module expansion slot, cannot be connected with any
module or special module.
The Main Unit of VS2, VSM or VS3 equips a module expansion slot, could connect with DIO expansion modules and
special modules. (excluded the VSM-14M)
The Main Unit of VS2 or VSM can use expansion modules to handle up to 128 inputs (X0~X177) and 128 outputs
(Y0~Y177), total 256 I/O points. And also available 8 special modules.
The Main Unit of VS3 can use expansion modules to handle up to 256 inputs (X0~X377) and 256 outputs
(Y0~Y377), total 512 I/O points. And also available 16 special modules.
All the Special and DIO Expansion Modules are serial connected on the right side of the Main Unit, and the
connection sequence is without reserved. The closest Special Module is designated as the 1 Special Module.
After that, the followed Special Module is the 2 , and so on. But, the DIO Expansion Module will not interfere with
nd.
st.
the ranking of Special Modules.
The Main Unit of VS2, VSM or VS3 will occupy the assigned numbers X0~X17 and Y0~Y17, thus the beginning I/O
address of the rst expansion unit/module are the X20 and Y20.
X0X1 7X2 0X3 0
st.
Y0Y1 7
Y2 0
The 1 Special Module
The VS-8XY module occupies 8 input points and 8 output points.
The VS-28XYR expansion module will occupy 16 input and 16 output points. Besides, it is unable to expand any
module on its right side.
The VS Main Unit has the circuit for inner power supplying but the expanded modules and cards do not have, all
power is from the Main Unit Please be aware of power consumption. If the inner power is insufficient, add the VS-PSD
power repeater module is required.
For the power consumption calculations of individual expansion modules and expansion cards, please refer to
“1-8 Specifications of Power Supply” in the Product Manual.
17
Page 24
2-3 Aux iliary Relay ( M )
The PLC includes considerable internal Auxiliary Relays (M), the function of those are to store up plenty ON/OFF status,
which provided data for the processing demand. The operating method of an Auxiliary Relay is the same way to
operate the External Output Y, but the contact of Auxiliary Relay can not directly drive an external load.
The identifier number of an Auxiliary Relay M uses the decimal method, and the functions can be divided into three
different types:
(1) General Auxiliary Relay
When the input power is cut off during the PLC operation, the contents of this kind relay will be cleared. After the
power resumes, the contents of this kind relay are all OFF.
(2) Latched Auxiliary Relay
When the input power is cut off during the PLC operation, the contents of this kind relay will be latched. After the
power resumes, the contents still remain. That means, if the content of a latched relay is ON before power cut, its
state will keep ON at the moment when the power is back.
Below show some examples:
Suppose there is a platform that, when the motor rotates forward and backward, it drives the platform to move left
and right. In addition, the left limit switch (X0) and the right limit switch (X1) are connected to the left and right
limitations of the moving range. If the operation of the motor should finish the uncompleted movement after the
power is returned, that must use a latched auxiliary relay.
X0X1
M2000
M2000
Self-holding circuit, use M2000 to retain the platform moving to the right.
X1
X0
M2001
Self-holding circuit, use M2000 to retain the platform moving to the left.
M2001
Also, now there are many mechines using human-machine interface (HMI) as operation interface. In such cases,
many setups to PLCs by HMI may need the latched function.
(3) Special Auxiliary Relay
Each special relay has its own specific function. Some special relay has only the readable contact of its status, but
without the writable coil to be driven by the program. Do not use special relays which are not defined. For the details
of special relays, please refer to the section 2-14 “Special Relay and Special Register”.
The auxiliary relays in the VS1,VS2,VSM and VS3 series share exactly the same ranges.:
A Step Relay is the basic component in the Sequential Function Chart (SFC) or Step Ladder (STL). The identifier number
of a Step Relay S uses the decimal method, and the functions can be divided into four different types:
(1) Initial Step Relay
It is used in the initial status of the Sequential Function Chart .
(2) General Step Relay
It is for general use in the Sequential Function Chart. When power cut off occurs during PLC operation, the status will
be reverted to void (OFF).
(3) Latched Step Relay
When power cut off occurs during PLC operation, the status will be retained. When the power resumes, PLC can
continue its work from the Latched Step Relay.
(4) Annunciator Step Relay
The annunciator with latched function. It is mainly driven by the ANS (FNC46) instruction as a contact of the
annunciator, used to record the relevant warning messages to facilitate troubleshooting.
The Step Relays in the VS1, VS2, VSM and VS3 series share exactly the same ranges.
The timers count the time are by increase counting. When the timer's Present Value = Set Value (the value designated
to a Timer), the contact of the timer is (ON).
The real Set Value of a timer = Designated number × Unit of the timer
The set value of a timer can be set directly by using a constant number K or indirectly by using the content value in a
Data Registers D or R. Also, can be modified by using the Index Register V/Z.
The definition of timers at the VS1,VS2,VSM and VS3 serie are exactly the same:
100ms timer
0.1~3276.7 Sec.
T0~T199
200 Pt.
2-5-1General Ti m e r s
X0
T0
X0
Present value of T0
Y0
General (non-retentive) timer
10ms timer
0.01~327.67 Sec.
T200~T245
46 Pt.
K100
T0
When X0 = ON, the present value of timer T0 starts to up count clock
pulse by 100ms, and when its value reaches the set value, K100
(10 seconds), its contact will be activated.
Y0
When the input contact X0 = OFF or power cut, the present value of the
timer will return to “0” and the contact will turn into OFF.
10 Sec.
1ms timer
0.001~32.767 Sec.
T256~T511
256 Pt.
Retentive timer
1ms timer
0.001~32.767 Sec.
T246~T249
4 Pt.
Set val ue (K 100)
100ms timer
0.1~3276.7 Sec.
T250~T255
6 Pt.
2-5- 2 R eten t ive Tim e rs
X1
T246
T246
X2
RS T
X1
Present value of T2 46
Y1
X2
Y1
K2000
T2 46
t1t2
Retentive
time
When X1 = ON, the present value of timer T246 starts to up count clock
pulse by 1ms, and when its value reaches the set value K2000
(2 seconds), its contact will be activated.
During the timer is counting, if the X1 turned OFF or power cut, the T246
will pause counting and retain the present value. After the X1 turned ON
again, it will resume counting to increase its present value continually,
until its present value = set value K2000 (2 seconds) and its contact will
become ON.
When X2 = ON, the present value of timer T246 returns to “0” and its
contact will be OFF.
t1+t2=2 Sec.
Retentive
time
Set value
20
Page 27
2-5-3 Using a Ti m e r i n a S u b r o u t i n e
When the PLC scans to the coil of an general non-retentive timer (not includs T192~T199), it accumulates or clears the
present value of the timer then controls its contact.
When the PLC scans to the END instruction, it accumulates or clears the current value of each T192~T199 timer then
controls its contact.
At the 1 ms system interrupt, it accumulates the present value of activated T246~T249 timers. Then when the PLC
scans to the timer's coil, it controls the contact of the timer.
To conclude, reminders for using timers in subroutine are shown below:
(1) A subroutine which will be executed once during each scan time can adopt all types of timers.
(2) A subroutine which will be executed several times during each scan time can adopt T192~T199 and T246~T249
timers.
(3) The subroutine which may not be executed at every scan time can adopt T192~T199 timers.
(4) An interrupt subroutine (which is only executed in interruption) must adopt T192~T199 timers.
2-5-4 Methods to Appoint the Set Va l ue of a Timer
Direct setting by using a constant number K
X0
K150
T200
Indirect setting by using a Data Register D
X0
MOV K200 D0
X1
D0
T200
T200 is a timer using a 10 ms as the time unit.
When the setting constant K is 150, the set value of T200 is 1.5 Sec.
(150×10 ms=1500 ms=1.5 s).
T200 is a timer using a 10 ms as the time unit.
If D0=200 , T200 = 2 Sec. timer.
If D0=1000 , T200 =10 S ec. t ime r.
The set value of T200 can be modified by to change the content value
of D0.
2-5-5 Detailed Description about the Output Action and Accuracy of a Ti m e r
Below shows the action procedures of a general non-retentive timer:
X0
T0
˙˙˙˙˙˙˙˙˙˙
input processing
K120
T0
X0=OFF→ ON
Timer T0 is started
During the timer T0 is started and the CPU repeatedly to
execute its “OUT” coil. That may increase the present value
of the timer by a few numbers (not only 1) if the period of
scan time is more than the timer's resolution unit.
Y1
st
1 scan
At the moment, the accumulated time is reaching to 12 Sec.
Since the scan of CPU already passed the coil of T0, so the contact of
T0 would not be activated.
nd
2 scan
th
n scan thn+1 scan
Below describes the accuracy of a timer, from the coil is triggered to the contact is turned ON:
α: 0.001 sec. for the 1 ms timer; 0.01 sec. for the 10 ms timer; 0.1 sec. for the 100 ms timer
+Ts
-α
T : Set time of timer (sec.)
Ts: scan time (sec.)
T0
contact turned
to ON
Y1
ON
If in the program, a timer contact is written in front of its coil, the maximum timing error would be extra 2 Ts.
If the set time of timer is “0”, the output contact will action in the next scan.
For the T246~T249, which is using the system's 1ms interrupt to increase the current value if the coil of
the timer has been triggered.
21
Page 28
2-6 Counter ( C )
When the pulse input signal in a counter turns from OFF to ON, the present value of the counter will increase (+1 in a
up count) or decrease (-1 in a down count) each time, based on the counting types of counters. If the present value
equals to set value, the counter's contact turns to be ON.
The counrer's set value can be set directly by using a constant number K or indirectly by using the content value that
stored in the register D, R. Also, this can be modified by the Index Register V/Z.
The characteristics of the 16-bit and 32-bit counters are shown in the following table:
Item
Count Direction
Available Set Value
Set Value Appoint
Changes of
Present Value
Status of Contact
Reset Action
Present Value
Register
The definition of counters at the VS1,VS2,VSM and VS3 serie are exactly the same:
Genera l
C0~C99
100 Pt.
1 6- bit counter 3 2- bit counter
Up count
1~32,767 (equivalent to 1, if the set value exceeds the
range)
Constant K or a data register
Increase; retain if reaching the set value
Turns ON & retains if the current value reaches the set value
When the RST instruction is executed, the present value becomes “0” and the contact will turn to be OFF.
16 bits
1 6- bit counter 3 2- bit counter
Latche d
C100~C 19 9
100 Pt.
Up or Down Count, bi-directional
-2,147,483,648~+2,147,483,647
Same as in the left column, but each 32-bit
value ocupies 2 data registers
Continuing changing once reaching the set value
Up count: turns ON if reaches the set value
Down count: turns OFF if passes through the set value
32 bits
Genera l
C200~C 21 9
20 Pt.
Latche d
C220~C 23 4
15 Pt.
2-6-1 16- bit Counter
The present value of a general counter will be reset when a PLC encounters power cut off. However, the latched
counter will retain its present value before the power is cut off and starts from there when it is powered.
X0
X1
C0
Reset signal
Count signal
Present value of C0
X0
X1
Y0
RS T C 0
C0
Y0
2
1
0
K10
3
The contact signal X1 is to drive the C0 counter. When the signal X1
turns from OFF to ON once, the present value of C0 will increase by 1.
Then, on the tenth input turning ON, C0's output contact is activated,
turns ON. After that, the present value remains unchanged even the X1
changes.
When reset signal X0 is ON, the RST instruction operates. The present
value of C0 is reset to “0” and its contact will become OFF.
10
9
8
7
6
5
4
Set value
The counter's set value can be set by using a constant K directly or a content value in the Data Register D, R
indirectly. Also, this can be modified by the Index Register V/Z.
When the MOV instruction transfers a new present value to the counter and which is greater than its set value, the
counter's contact will turn to be ON promptly at the next input signal is ON, and meanwhile the present value will
become the same as the set value.
22
Page 29
2-6-2 32- bit Counter
X0
X1
X2
C200
UP/Down control signal X0
Rest signal X1
Counting signal X2
Present value of C200
Y0
M9200
RS T C 2 00
K- 5
C200
The X0 drives the M9200 to define the UP/Down count direction of the
C200. It OFF is defined as an UP count; while ON for Down count.
When the counting signal X2 switches from OFF to ON, C200
accumulates counting, and the present value in the register alters.
When the present value of a counter changes from -6 to -5, its output
contact switches from OFF to ON. When the present value of a counter
Y0
changes from -5 to -6, its output contact switches from ON to OFF.
When the rest signal X1 is ON, the RST instruction is executed.
The present value of this counter will reset to “0” and its contact will be
OFF.
UpUp
If the output contact was ON
Down
Since the range of a 32-bit present value is between -2,147,483,648 to +2,147,483,647. If a counter up counts
beyond +2,147,483,647, the present value will automatically change to -2,147,483,648. Similarly, the down counting
below - 2,147,483,648 will have the result +2,147,483,647. This is a typical “Ring Counter” technique.
When the power is turned off, the latched counter will retain its present value and status of the contact.
The 32-bit counter can be used as a 32-bit data register.
If use the DMOV instruction to transfer a number to the counter's present value register and which is greater than its
set value, then at the next input ON signal will let its present value accumulated but will not change the status of
contact.
The Up/Down direction control for a 32-bit counter C200~C234 is defined by the special relay M9200~M9234.
The C200's direction is defined by M9200. If the M9200 is OFF, the C200 executes up counting; ON counts down.
While the M9201 is to control the direction of the C201, and so on.
The counter's set value can be set by using a constant number K directly or a content value in a pair of continuous
Data Registers D, R indirectly. The value can be either a 32-bit positive or negative number.
In the part of 32-bit counter's output coil, its component ID number is not available to modify by the Index Register
V/Z. However, the set value can be modified by the V/Z.
23
Page 30
2-6-3 Methods to Appoint the Set Va l ue of a Counter
16-bi t Cou nte r
Direct setting by a constant number K
X0
C0 becomes a UP counter with 100 counts.
32 -bit C oun ter
Direct setting by a c ons tant number K
X0
C200 becomes a UP/Down counter
with the set value of K43210.
K100
C0
K43210
C200
Indirect setting by using a Data Register D
X0
X1
When D0=50, C0 becomes a counter with 50 counts.
When D0=200, C0 becomes a counter with 200 counts.
The set number of counts can be modified by changing
the value of D0.
Indirect setting by using a double word Data Register D
X0
X1
When the content's set value of a 32-bit register that
composed by D1 and D0 is K-5, the C200 becomes a
Up/Down counter with the set value of -5. (the D1 is for
upper 16-bit, D0 is for lower 16-bit).
The set value of the C200 can be modified by to change
the content value of the combined D1 and D0.
MOV K50 D0
D0
C0
DMOV K-5 D0
D0
C200
24
Page 31
2-7 Softwar e H igh Speed Coun t er
Each one of the input points X0~X7 in the VS series PLC can be used for high speed function, such as the high speed
counter, external interrupt or frequency meter. If a X0~X7 is not designed for high speed function, it can still be used as
a general input point.
For the purpose of the Software High Speed Counter, it uses the interrupt to receive and count every high speed input
pulse, hence with a “Software” in the front of its name. The counter is a 32-bit Up/Down counter with latched function,
and can be classified into three types. Their characteristics are shown in the table below:
Counter's ID No.
C235~C 24 5
C246~C 25 0
C2 5 1 ~C 2 5 5
When input points X0~X7 are applied to perform the Software High Speed Counters (SHSC), there are two operation
modes available. The setting page is at the “Project Parameter Setup” within the programming software.
SHSC Mode 1
Input
C235 C236 C237 C238 C239 C240
X0
U/D
X1
X2
X3
X4
X5
X6
X7
U/D
Counter Type Range of Set Value
1-phase
high speed counter
2- phase
high speed counter
A/B phas e
high spe ed c ounter
Determined by M9235~M9245. OFF is defined as up count while
ON as down count.
The up and down count signals have their own input points.
The direction can be identified from M9246~M9250.
OFF means up counting; ON means down counting.
Determined by the sequence of A/B phase input signals.
Up counting if A-phase signal is ON then B-phase signal turns
from OFF to ON.
Down counting if A-phase signal is ON then B-phase signal turns
from ON to OFF.
The direction can be identified from M9251~M9255.
OFF means Up counting; ON means Down counting.
1-phase
High Speed Counter
C241 C242
C243
U/D
R
U/D
U/D
U/D
U/D
U/D
R
U/D
R
Count Direction
C245 C246
C244
U/D
R
U/D
R
S
S
2-phase
High Speed Counter
C248 C249 C250 C251 C252 C253 C254 C255
C247
U
U
D
D
R
U
D
R
U
D
R
S
High Speed Counter
A
A
B
B
R
U
D
R
S
-2,147,483,648
+2,147,483,647
A/B phase
A
B
R
~
A
B
R
A
B
R
S
S
SHSC Mode 2
Input
C235 C236 C237 C238 C239 C240
X0
U/D
X1
X2
X3
X4
X5
X6
X7
U/D
U/D
U/D
1-phase
High Speed Counter
C241 C242
U/D
U/D
U/D
U/D
C243
U/D
R
C244
U/D
R
C245 C246
U
D
U/D
R
2-phase
High Speed Counter
C248 C249 C250 C251 C252 C253 C254 C255
C247
U
U
D
D
U
D
High Speed Counter
U
A
B
D
R
A
B
A/B phase
A
B
A
B
U: Count up input; D: Count down input; A: A-phrase input; B: B-phrase input
U/D: Up/Down counting signal input; R: Built-in Reset Input; S: Built-in Start-up input
Since a PLC only has 8 high speed inputs X0~X7, once an input point is occupied then it cannot be used for other
high speed functions. Therefore, users should plan carefully in order to make good use of these input points.
This section only describes the software high speed counters; for planning the PLC program, please refer to other
sections which are regarded more functions of high speed input points.
In Sections 2-7-1~2-7-3, the descriptions of various counters are based on SHSC Mode 1.
A
B
R
25
Page 32
2-7-1 1-Phase High Speed Counter
X20
The X20 drives the M9235 to define the Up/Down count direction of the C235.
M9235
X21
X22
RS T C 2 35
K- 5
C235
When the X22 is ON, the C235 will receive that count signal from the X0.
When the signal X21 is ON, the RST instruction is executed. C235's present
value is reset to “0” and its output contact becomes OFF.
The C235~C240 (and the C241~C242 at the SHSC Mode 2) are 1-phase
high speed counters which should use the user program to control the
activation and reset processes.
Up/Down count control
Reset signal
start-up signal
count signal
Present value of C235
Output contact of C235
X20
X21
X22
X0
UpUp
If the output contact was ON
Down
When the start-up signal X22 is ON and there is pulse input from the X0 point, the present value of C235 will
Up/Down change.
When the present value of the C235 increases from -6 to -5, its output contact switches from OFF to ON. When the
present value of a counter decreases from -5 to -6, its output contact switches from ON to OFF.
If the counter up counts accumulated beyond +2,147,483,647, the present value will automatically change to
-2,147,483,648. Similarly, the down counting below -2,147,483,648 will have the result +2,147,483,647.
When the rest signal X1 is ON, the RST instruction is executed. Meanwhile, the C235 present value is reset to “0” and
its output contact becomes OFF.
The direction of Up/Down count for an 1-phase counter C235~C245 is determined by the ON/OFF status of related
M9235~M9245. If the relay is OFF, the counter executes Up counting; while ON is for Down counting.
X20
X21
X22
M9242
RS T C 2 42
D0
C242
The X20 drives the M9242 to define the UP/Down count direction of the
C242.
When X22 is ON, C242 is activated to receive the counting signal from X2.
When X21 is ON, the RST instruction is executed. The C242's present
value resets to “0” and its output contact becomes OFF. If the application
of C242 is not demanded to reset by the program, could ignore this line.
When X3 (the designated built-in reset signal of C242) is ON, the present
value of C242 will be reset to “0” and its contact will become OFF.
The set value of C242 is provided by the content value of D1 and D0.
The C241~C243 at the Mode 1 or C243~C245 at the Mode 2 are
1-phase high speed counters which should use the program to activate
then by the program or built-in reset input to clear.
X20
X21
X22
M9244
RS T C 2 44
K200
C244
The X20 drives the M9244 to define the UP/Down count direction of the
C244.
When X22 is ON and X6 is ON (the built-in start-up signal of C244),
the C244 is activated to receive the counting signal from X0.
When X21 is ON, the RST instruction is executed. The C244's present
value resets to “0” and its output contact becomes OFF. If the application
of C244 is not demanded to reset by the program, could ignore this line.
When X1 (the designated built-in reset signal of C244) is ON, the present
value of C244 will be reset to “0” and its contact will become OFF.
The C244~C245 at the Mode 1 are 1-phase high speed counters which
should use the program and start-up input to activate then by the
program or built-in reset input to clear.
26
Page 33
2-7-2 2-Phase High Speed Counter
X20
X21
RS T C 2 46
K-5
C246
When X21 is ON, the C246 receives counting signal from either X0 or X1
input point.
When X20 is ON, the RST instruction is executed. C246's present value is
reset to 0, and its output contact becomes OFF.
The C246 2-phase high speed counter which should use the user program
to control the activation and reset processes.
Reset signal X20
Start-up signal X21
Up count signal X0
Down count signal X1
Present value of the C246
If the output contact was ON
Output contact of C246
When the start-up signal X21 is ON and there is a pulse entering from either X0 or X1, the present value of C246 will
Up/Down change.
When X0 changes from OFF to ON, the present value of C246 increases by 1.
When X1 changes from OFF to ON, the present value of C246 decreases by 1.
When the present value of the C235 increases from -6 to -5, its output contact switches from OFF to ON. Oppositely,
when the present value of a counter decreases from -5 to -6, its output contact switches from ON to OFF.
If the counter up counts accumulated beyond +2,147,483,647, the present value will automatically change to
-2,147,483,648. Similarly, the down counting below -2,147,483,648 will have the result +2,147,483,647.
The Up/Down counting direction of a 2-Phase High Speed Counter C246~C250 can be watched by to monitor the
M9246~M9250. The related relay OFF means up counting; ON means down counting.
X20
X21
RS T C 2 48
D0
C248
When X21 is ON, C248 is activated to receive the counting signal from
X3 or X4.
When X3 changes from OFF to ON, the present value of C248 increases
by 1.
When X4 changes from OFF to ON, the present value of C248 decreases
by 1.
When X20 is ON, the RST instruction is executed. The C248's present value is reset to “0” and its output contact
becomes OFF. If the application of C248 is not demanded to reset by the program, could ignore this line.
When X5 (the designated built-in reset signal of C248) is ON, the present value of C248 will be reset to “0” and its
contact will become OFF.
The set value of C248 is provided by the content value of D1 and D0.
The C247~C248 at the Mode 1 are 2-phase high speed counters which should use the program to activate then
by the program or built-in reset input to clear.
X20
X21
RS T C 2 49
K100
C249
When the X21 is ON and the X6 (designated start-up input of C249) is
ON, the C249 is activated to receive the counting signal from X0 or X1.
When X0 changes from OFF to ON, the present value of C249 increases
by 1.
When X1 changes from OFF to ON, the present value of C249 decreases
by 1.
When X20 is ON, the RST instruction is executed. The C249's present value is reset to “0” and its output contact
becomes OFF. If the application of C249 is not demanded to reset by the program, could ignore this line.
When X2 (the designated built-in reset signal of C249) is ON, the present value of C249 will be reset to “0” and its
contact will become OFF.
The C249~C250 at the Mode 1 are 2-phase high speed counters which should use the program and start-up
input to activate then by the program or built-in reset input to clear.
27
Page 34
2-7-3 A/B Phase High Speed Counter
The A/B phase high speed counter is exclusively for receiving A/B phase pulses from a rotary or linear encoder.
X20
X21
RS T C2 51
K-5
C251
When X21 is ON, C251 is activated to receive pulse signals from input
point X0 (A-phase) and X1 (B-phase). Then bases on the sequence of
input signals to perform Up/Down count.
when X20 is ON, the RST instruction is executed. C251's present value is
reset to 0, and its output contact becomes OFF.
The C251 A/B phase high speed counter should use the user program to
control the activation and reset processes.
Reset signal X20
Start-up signal X21
A-phase pulse X0
B-phase pulse X1
Present value of C251
Contact point of C251
Rotary encoder reverses here
If the output contact was ON
When the start-up signal X21 is ON and there are orderly pulses entering from X0 and X1, the present value of C251
will Up/Down change.
When X0 is ON (A-phase pulse is ON) and X1 turns from OFF to ON (B-phase pulse turns from OFF to ON),
the present value of C251 increases by 1.
When X0 is ON (A-phase pulse is ON) and X1 turns from ON to OFF (B-phase pulse turns from ON to OFF),
the present value of C251 decreases by 1.
The Up/Down counting direction of the A/B Phase High Speed Counter C251~C255 can be watched by to monitor
the M9251~M9255. The related relay OFF means up counting; ON means down counting.
The rotary encoder which is connected to a motor shaft that produces corresponding A/B phase pulse according to
the motor's forward/backward rotation. This A/B phase pulses are transmitted to C251's A/B phase inputs. Therefore,
the present value of C251 increases/decreases according to the motor's moving direction.
X20
X21
RS T C 2 52
D10
C252
When the X21 is ON and A/B phase pulses entering from X0 and X1 for
the C251.
When X0 is ON and X1 turns from OFF to ON, the present value of C251
increases by 1.
When X0 is ON and X1 turns from ON to OFF, the present value of C251
decreases by 1.
When the X20 is ON, the RST instruction is executed. The C252's present value is reset to “0” and its output
contact becomes OFF. If the application of the C252 is not demanded to reset by the program, could ignore this
line.
When the X2 (designated built-in reset input of C252) is ON, the present value of C252 will be reset to “0” and its
contact will become OFF.
The set value of C252 is provided by the content value of D11 and D10.
The C252~C253 at the Mode 1 are A/B phase high speed counters which should use the program to activate
then by the program or built-in reset input to clear.
X20
X21
RS T C 2 55
K-200
C255
When the X21 is ON and the X7 (designated start-up input of C255) is
ON, the C255 is activated to receive the counting signals from X3 and X4.
When X3 is ON and X4 changes from OFF to ON, the present value of
C255 increases by 1.
When X3 is ON and X4 changes from ON to OFF, the present value of
C255 decreases by 1.
When the X20 is ON, the RST instruction is executed. The C255's present value is reset to “0” and its output
contact becomes OFF. If the application of C255 is not demanded to reset by the program, could ignore this line.
When the X2 (designated built-in reset input of C255) is ON, the present value of C255 will be reset to “0” and its
contact will become OFF.
The C254~C255 at the Mode 1 are A/B phase high speed counters which should use the program and start-up
input to activate then by the program or built-in reset input to clear.
28
Page 35
2-7-4 Precautions for Using the Software High Speed Counter
The VS series PLC is equipped with the Software High-Speed Counters (SHSC) and the Hardware High-Speed
Counters (HHSC). Since the Software High-Speed Counters operate in a way of interrupt and thus occupy
considerable CPU's capacity and influence its efficiency. In contrast, the Hardware High Speed Counters are
equipped with their own hardware circuits in charge of counting, which hardly occupy the efficacy of CPU. At the
application of high speed counter, the Hardware High-Speed Counters are recommended.
The Software High-Speed Counter comparison instructions (HSCS, HSCR, HSZ and HSCT) were to compare and
produce results immediately when the related inputs change, then the results could immediately transmit to the
specified outputs to drive the load.
Thus, using the Software High-Speed Counter comparison instruction can get the fastest comparison result.
However, because each related input changing is to be compared, that consumes the CPU time and reduces the
overall performance. Therefore, after a Software High-Speed Counter is started in the program, according to
application requirements user should appropriately make a choice between the use of this counter's output or
counter's comparison instructions.
The use of software high-speed counter comparison instructions in the program has the following limitations:
(1) Use not more than eight instructions simultaneously among HSCS, HSCR, HSZ and HSCT instructions.
(2) The HSCT instruction can only be used once in the program.
Note that the signal source of high-speed counters should not have clutter or even switch bounce signals. They will
cause the high-speed counter to count incorrectly.
When the Software High-Speed Counter is used in the program, the filter time of correlative inputs will automatically
adjust to the high speed mode.
The output contact status of the Software High-Speed Counter is determined by the count operation of the counter
input. The state of output contact cannot be affected by to insert a new present value which is equal to the set value.
To Active the Software High-Speed Counter
The conditional contact with the program for driving a Software High-Speed Counter is not the same as to use
for an input point of a general contour.
Therefore, please do not use the pulse input point corresponding to the Software High-Speed Counter as the
conditional for driving itself in the program. Doing so will make the count error.
Ideally the special relay M9000 should be used for activation.
M9000
Correct
The Output of Software High-Speed Counter
M9000
C235
K100
C235
K100
C235
Y0
X0
K100
C235
Incorrect
The Software High-Speed Counter operate by the interrupt, the counting is not dependent to the scan time.
Therefore, when the external inputs make the counter's (present value) = (set value), the output contact of the
counter will change immediately.
However, as shown in the gure above, the contact state of the C235 will be transferred to Y0 when the program
is scanned there, and the state of Y0 will be actually sent to the output when the END instruction is executed. It is
still relevant to the scan time and is not an immediate output that drives the load.
If an immediate output is desired, the specic Software High-Speed Counter comparison instructions FNC 53
(DHSCS), FNC 54 (DHSCR), FNC 55 (DHSZ) and FNC 280 (DHSCT) can be used.
Finally, using relay outputs will still cause an output delay of about 10ms. If transistor outputs are used, there will
be an output delay of less than 1 ms. (depending on the response speed of the output point). This needs to be
taken into consideration if necessary.
29
Page 36
The Counting Frequency of SHSC
There are two important factors in determining the frequency of SHSC counting:
(1) Limit of hardware circuit: the reaction speed of the photo couplers at high-speed input points X0~X7 and the
filter time of input filter circuits, those are limited the maximum pulse frequency can be fed into the PLC.
According to the controller series, the pulse frequency is listed in the following table.
Se r ies
VS 1
VS 2
VS M
VS M-28 M L
VS 3
X0
10 KHz10 KHz10K H z1 0KHz10KHz10KHz10KHz
50 KHz50 KHz50K H z5 0KHz50KHz50KHz50KHz50 KHz
20 0KHz50 KHz20 0KHz200K H z50KH z5 0KHz50 KHz20 0KHz
1M Hz
20 0KHz50 KHz20 0KHz200K H z50KH z5 0KHz50 KHz20 0KHz
X1X2
10 KHz
1M Hz1M Hz1MH z
50 KHz50 KHz50K H z5 0KH z
X3
X4
X5X 6
X7
When these input points are combined for an A/B phase counter, the counting frequency is reduced to half.
(2) Limit of total interruption frequency that PLC system can accept:
The VS series PLC can accept about 200kHz of total interruption frequency.
(The sum of 1-phase counting frequencies) + (The sum of 2-phase counting frequencies) + (The sum of
A/B-phase counting frequencies) × 2
= The total of the interrupt frequencies that occur by the Software High-Speed Counter
A lot of applications need to use interrupt at the PLC, those including the software HSC, external interrupt,
frequency meter, pulse measurement, pulse output instruction, timer interrupt and so on. When considering
the total interrupt frequency, these factors should be taken into an overall assessment.
The Notice About to Reset the Software High-Speed Counter
Usually to reset the Software High-Speed Counter, we use the following program. The counter stops counting
when the RST instruction is activated in the example.
X20
RS T C 2 35
Count signal X0
3
Although the pulse persistent,
it won't count during this period.
C235 is continuously being reset
Current value of C235
Reset signal X20
RST C235
2
1
To avo id above s ituati ons, pl e ase use t h e follo w ing pro gram.
X20
A
RS T C 2 35
- - - -
M9001
- - - -
B
3
2
1
1
Part releases the RST
B
Counting signal X0
Present value of C235
Reset signal X20
RST C235
RS T C 2 35
Part enables the RST
A
3
2
1
4
3
2
Because RST instruction was released,
it's ready to count.
30
Page 37
2-8 Data Regi s ter (D) and Expa nsion Regist e r (R)
The characteristics of the Data Register D and the Extension Register R are identical, so hereafter referred to as a Data
Register. The data register is used to store a numerical data. The data length is 16 bits and the Most Significant Bit
represents a positive/negative sign. A register can store a content value between -32,768 and +32,767. Also, that is
possible to combine two 16-bit registers into a 32-bit one; the 16 bits with a smaller number is defined as the lower 16
bits and the larger number is the upper 16 bits. A 32-bit data register can store a content value between -2,147,483,648
and +2,147,483,647, the Most Significant Bit represents a positive/negative sign.
The data register can be distinguished by its use as follows:
(1) General Register
When the PLC turns from RUN to STOP or its power is cut out the data in the register is reset to zero. If the M9033
is ON then the PLC turns from RUN to STOP, the data will retain; however, when the power is cut out, the data will
still be cleared and become “0”.
(2) Latched Register
When the PLC's power is disconnected, the data in the Latched Register will be maintained as same as the value
stored before the event occurred.
To clear the contents in the Latched Register, could use the RST or ZRST instruction.
The main purposes of the Latched Register are to store setup data, record data and the memory of mold parameter.
When the number of Latched Register is not enough or the stored data has the demand to be transplant, should
use the expanded memory card and put the data into the card.
VS series Memory Cards
The VS series PLC provides the VS-MC and VS-MCR memory cards. After the installation of a memory card,
655,360 words of latched data storage space are available. Data can be transferred between the data register
and the memory in the card via the data bank write instruction DBWR (FNC 91) and the data bank read
instruction DBRD (FNC 90).
Since the memory card uses Flash ROM to store data, the number of writes is limited to 100,000 times. The
improper use may shorten the lifespan of the Flash ROM. Therefore, use the DBWRP to substitute the DBWR
instruction in a program to write data, that could avoid unnecessary operations and extend the lifespan of the
Flash ROM.
(3) Special Register
Each Special Register has its own specific function, the main usage is as the storage of system status, error code
or status monitoring. For details, please refer to the section 2-14 “Special Relay and Special Register”.
(4) Extension Register
When the PLC turns from RUN to STOP or its power is cut out the data in the register is reset to zero.
If the M9033 is ON then the PLC turns from RUN to STOP, the data will retain; however, when the power is cut out,
the data will still be cleared and become “0”.
The function and discrimination of registers D in the VS1, VS2, VSM and VS3 series are exactly the same:
Series
VS 1
VS 2
VS M
VS 3
General Register
D0~D6999
Tot.= 7000Pt.
Latched Register
D7000~D8999
Tot.= 2000 Pt.
Special Register
D9000~D9511
Tot.= 512 Pt.
Extension Register
R0 R9999 Tot.= 10000 Pt. ~,
R0 R25999, Tot.= 26000 Pt. ~
31
Page 38
2-9 Index Reg i ster (V and Z)
Index Register V, Z is a very special register in the VS series PLC. Its purpose is to use the index to modify the operand
in an instruction, to serve the purpose of specifying the operand indirectly and exchangeable, thereby improving the
flexibility and efficiency of program editing.
The index register provides the ability to specify the operand with flexibility when the instruction is being executed. That
providing great help in the preparation of complex control program, and can often simplify the process. Here are some
possible applications for reference:
(1) At the Subroutine. There is generally a need for a subprogram to perform the same function repeatedly for different
operands.
(2) The instruction in the program has limitation about the used number of times.
(3) When the data in bulk needs process, the source or target data can be specified by the index register.
The index register is a 16-bit register, numbered from the V0 to the V7 and from the Z0 to the Z7, 16 points in total.
V, Z registers can be paired up to form a 32-bit register. In the 32-bit application instruction, V, Z registers should be
paired up as (V0, Z0) (V1, Z1)..... (V7, Z7); in specifying the operands, only Z register needs to be assigned.
16 -bit
V0
V1
V2
V3
V4
V5
V6
V7
16 -bit
Z0
Z1
Z2
Z3
Z4
Z5
Z6
Z7
V0
V1
V2
V3
V4
V5
V6
V7
Upper 16 bits Lower 16 bits
2-9-1 Using Index Register in Basic Instruction
The Index Registers can be used to modify the operand in a basic instruction, the modifiable components are shown
below:
The set value of T: when it uses K, D or R at the OUT coil.
The set value of C: when it uses K, D or R at the OUT coil.
Here provide some examples that Index registers V, Z modify operands:
When Z0=10, X0Z0=X12 (The X is named by octal number system)
Y5Z0=Y17 (The Y is named by octal number system)
M10Z0=M20
S2Z0=S12
K100Z0=K110
D0Z0=D10
32 -bit
Z0
Z1
Z2
Z3
Z4
Z5
Z6
Z7
In the 32 bits instructions, only the Z0
needs to be specified.
Examples of using index register in basic instructions:
X0Z0
Y0Z0
X0
X1Z0
Y0Z0
T0V0
As shown in the left diagram it is a self-holding circuit.
When Z0 = 0, that triggers by X0, releases by X1 and has an output at Y0.
When Z0 = 5, that triggers by X5, releases by X6 and has an output at Y5.
D0Z0
When Z0 = V0 = 0, X0 drives the T0 timer and D0 is the set value.
When Z0 = 1 and V0 = 2, X0 drives the T2 timer and D1 is the set value.
32
Page 39
2-9-2 Using Index Register in Application Instruction
The Index Registers can be used to modify the operand in an application instruction, the modifiable components are
shown below:
Bit component: X, Y, M, S
Pointer: P, Q (P as the label name of the jump or subroutine cannot be modified)
Word component: The present value of T and C
Index register D, R
The KnX, KnY, KnM, KnS which is composed by X, Y, M, S (Kn itself can not be modified)
The UnG at the part of G (Un itself can not be modified)
Constant: K, H
When using the index register in a 32-bit application instruction, be sure to use paired V, Z registers. At this point, pay
special attention to whether there is residual value in the upper register V. To be safe, use the DMOV instruction when
placing value into the V, Z paired registers.
Here provide some examples that Index registers V, Z are used to modify operands:
32-bit instructions(will occupyV,Zregisters), when (V1, Z1)=8,
① 16-bit instructions, when Z0=4,
Y27Z0=Y33 (The Y is named by octal
number system)
T5Z0=T9
D0Z0=D4
K4M8Z0=K4M12
②
X20Z1=X30 (The X is named by octal number system)
M0Z1=M8
D0Z1=D8
K8M40Z1=K8M48
R10Z1=R18
U1G0Z0=U1G4
2-9-3Demonstration Program Using Index Register
Using index register in a subrountine
X0
MO V K 0 Z0
When X0=OFF, Z0=0
X0
MO V K 10 Z0
When X0=ON, Z0=10
M9000
CALL ARITHMETIC
˙˙˙˙˙˙˙˙˙˙
Call the “ARITHMETIC” subroutine
FE ND
AR ITHMET I C
The pointer label of the subroutine which is named “ARITHMETIC”
M9000
AD D D0Z0 D1Z 0 D 3Z0
MU L D3Z0 D 2Z0 D3Z0
When Z0=0, operates (D0+D1)×D2→(D4,D3)
When Z0=10, operates (D10+D11)×D12→(D14,D13)
SR ET
With the following program and external wiring, you can use the coded inputs to change the value of Z0. Then, can
select one of the present values in T0~T9 and display the number in the external seven-segment display.
M9000
BI N K 1X20 Z0
BCD T0Z0 K4Y20
Inputs X20~X23 are from the thumbwheel switch,
then the instruction converts these inputs to a BIN
value and sends to the Z0, thus Z0 = 0~9.
Convert the present value of T0Z0
(one of the selected T0~T9) to the
Usin g th umb wheel switch
to sel ect a Timer to dis play
2
BCD code and send to Y20~Y37,
then via the external seven-segment
display to show the value.
X2 3 〜X20
33
Y3 7 〜 Y20
Display the present value
of selected Timer
Page 40
To add up all values in D0~D9 and store the result into the D10.
M9000
RS T
Reset the content of V1 to zero
V1
Reset D100 to zero, this component is to store the result
Assign to execute 10 times within the loop, that for every command between the For
and Next instructions.
The value of D0V1 is accumulated to the D100 once at each cycle.
Add 1 to the value of V1, and point to the next value to be accumulated.
M9000
RS T
D1 00
FO R K 10
AD D D0V1 D10 0 D 100
INC V 1
End of the FOR~NEXT loop
NE XT
If you want to get the result of the sum (D0~D99) at the D100 instead in the above program, only need to change the
K10 in FOR K10 to K100.
The sprinkler system sets different opening and closing times from Sundays to Saturdays. The following example
uses the set ON time at D0~D13 and the set OFF time at D20~D33 to drive the sprinkler motor by the output Y0.
The time data of the Real-Time Clock (RTC) is compared with the setting value of the time schedule to determine the
ON / OFF of the sprinkler motor.
Hr. Mi n.
D0
D1
D3
D2
D5
D4
D6
D7
D9D8
D1 0
D1 1
D1 3D1 2
Sun.
Mon.
Tue.
Wed.
Thu.
Fri.
Sat.
Hr. Mi n.
D2 0
D2 1
D2 3
D2 2
D2 5
D2 4
D2 6
D2 7
D2 9D2 8
D3 0
D3 1
D3 3D3 2
The time data of RTC:
D9 0 19 0(Sun.)~6(Sat.)
D9 0 14
D9 0 15
Minute
Hour
Se t ON time Set O FF time
M9000
AD D D 9 01 9 D 9 01 9 Z 0
Double the day of a week from the RTC and put the
result to the Z0, that becomes the index for the time
comparison
D= D 90 14 D 0Z 0
D= D 90 14 D 20 Z0
SE TY 0
RS TY 0
Compare with the “Set ON time” to drive the Y0 ON.
Compare with the “Set OFF time” to drive the Y0 OFF.
The simple program above can achieve the requirement easily, isn't it? In fact, dealing with a large number of regular
data, the most important thing is to select an appropriate data structure (method for data storage). Then, with the
characteristics of the index register, you can compile efficient programs.
34
Page 41
2-10 Mark Poi n ter and Branch P ointer (P)
The purpose of the Mark Pointer and Branch Pointer (P) is to specify a specific point in the program. Usually they are
used to indicate the destination of the CJ instruction, or the start position of a subroutine of the CALL instruction.
In the past, the VB series PLC only had Branch Pointer P, which indicates a specific location with indication number, but
the program's readability was disadvantageous. Therefore, the VS series PLC newly enhances the Mark Pointer indicator
function to enable programmers use illustrative text to indicate a specific address, thus greatly increases the readability.
The ID numbers of Branch Pointer P in the VS1, VS2, VSM and VS3 series are exactly the same: P0~P1023, 1024
points in total.
The Branch Pointer P63 or P255 is equal to the position of END in the program.
The Mark Pointer is made up of 16 English characters or numbers, and its use is exactly the same as the Branch
Pointer P.
A maximum of 1024 Mark or Branch Pointers P in the program can be used.
The ID number at Branch Pointer P can be modified by the V, Z Index Register; texts in a Mark Pointer cannot use the
V, Z Index Register. By the characteristics, choose the suitable one at the program.
Among the exemplary programs are the Mark Pointer (left) and Branch Pointer P (right), the left one that uses the
Mark Pointer can acquire better readability.
CA LL EME RGENCY _ STOP
˙˙˙˙˙˙˙˙˙˙
˙˙˙˙˙˙˙˙˙˙
FE ND
EM E RGENCY _STOP
P0
SR ET
EN D
An example of using Branch Pointer P and combine with Index Registers V, Z.
M9000
MO V D 9019 Z0
M9000
CA LL P0Z 0
˙˙˙˙˙˙˙˙˙˙˙˙˙
Read the day of a week (D9019) from the Real-Time Clock as the index
value.
Call the corresponding subroutine that according to the index value. One related
subroutine will be executed at the day in a week.
FE ND
CA LL P0
FE ND
SR ET
EN D
P0
P6
When Z0=0 (Sunday),do the P0 subroutine.
SR ET
When Z0= 1~5 (Monday to Friday), do one of the subroutine P1~P5
respectively.
˙˙˙˙˙˙˙˙˙˙˙˙˙
When Z0= 6 (Saturday), do the P6 subroutine.
SR ET
35
Page 42
2-11 Table Nic kname and Table Co de (Q)
PLC users sometimes have to set up a lot of data in order to cope with needs such as formulas, control parameters and
communication commands.
In the past, people often set up the necessary reference materials through programming.
Not only a lot of program capacity and manpower were consumed, but also the data content established mostly had
poor readability, and were difficult to change and maintenance.
In order to meet the demands, the VS series PLC has provided the “Table” as a data source form. The table is a data set
by collecting data of relevant characteristics, such as data table, MBUS communication table, LINK communication
table. Each table has its own specific type and purpose. We use the computer programming software to provide the
tables' editing interfaces, so these tables are easy to establish and manage, furthermore can significantly improve
programming efficiency. The editing method of the table will be described in the programming software.
Those tables will occupy the memory space in the PLC. When the programming software writes a project to a PLC,
tables will be written into the memory with the program together. Besides, to read a project from a PLC, the tables are
read out from the its memory with the program together. The tables are a part of the PLC project.
At the VS series PLC, every table has its own Table Nickname or Table Code Q to identify. Then, the related application
instruction can use that Table Nickname or Table Code Q to get a particular table.
Table Codes Q0~Q31 are marked with index numbers; while the Table Nicknames are composed of 16 English
characters or numerals. The Table Nicknames have better readability. The drawback is that they cannot modify by Index
Register V, Z. In contrast, Table Codes Q0 to Q31 have less readability but they are irreplaceable when used with the
Index Register V, Z.
The ID numbers of Table Code in the VS1, VS2, VSM and VS3 series are exactly the same.
The Table Nicknames are made up of 16 English characters or numbers.
A maximum of 32 Tables in the program can be used.
Among the exemplary programs are making use of the Table Nickname and Table Code, the upper one that uses the
Table Nickname can acquire better readability.
X20
MB U S INVER TER_CO M_1 D100 K 1
When X20= ON, CP1 executes the MODBUS
communication of which the content is based on the
communication table of “INVERTER_COM_1”
X21
˙˙˙˙˙˙˙˙˙˙
MB U S THER M OSTAT_COM _ 1 D200 K2
When X21= ON, CP2 executes the MODBUS
communication of which the content is based on the
communication table of “THERMOSTAT_COM_1”
X20
X21
MB U S Q0 D100 K 1
˙˙˙˙˙˙˙˙˙˙
MB U S Q1 D200 K 2
When X20= ON, CP1 executes the MODBUS communication of which
the content is based on the communication table at the Q0.
When X21= ON, CP2 executes the MODBUS communication of which
the content is based on the communication table at the Q1.
Example of using Table Code Q and Index Register V, Z.
X0
MO V K 0 Z 0
X0
MO V K 1 Z 0
X20
MB US Q 0Z 0 D 1 00 K1
When X0 = OFF, the following MBUS instruction s to execute the
communication table at the Q0;
when X0 = ON, the following MBUS instruction is to execute the
communication table at the Q1.
CP1 executes the MODBUS communication. With the index modify
function, it can choose an expected table to execute the
communication.
36
Page 43
2-12 Interr u pt Pointer (I)
In general, the PLC executes user program in the way of sequential scanning. Even the system itself also follows a
sequence of execution (receive external inputs → process the user program → output the computed results).
However, such an ordinary operation is occasionally unable to meet the needs for quick control responses. Therefore,
the interruption function is generated which meets the required of to cut-in a processing sequence immediate.
The interrupt, as the name suggests, is to break the sequentially executed program, and then insert a program section
to be processed immediately. In the VS series PLC, every Interrupt Pointer is bound up with its interrupt subroutine to
deal with the user's requirement for the insertion of interruption.
The purpose of the Interrupt Pointer is to specify the start position of interrupt subroutine in the program.
The ID numbers of Interrupt Pointer I in the VS1, VS2, VSM and VS3 series are exactly the same:
External Interrupt Timer Interrupt
External Input Interrupt Pointer
□
X0
X1
X2
X3
X4
X5
X6
X7
□
=P means interrupt on the rising edge
□
=F means interrupt on the falling edge
I
X0
□
I
X1
□
I
X2
□
I
X3
□
I
X4
□
I
X5
□
I
X6
□
I
X7
Inhibit Flag
M905 0
M905 1
M905 2
M905 3
M905 4
M905 5
M905 6
M905 7
Interrupt Pointer
□□
I
TA
□□
I
TB
□□
I
TC
□□=01~99 means
the interval time is 1~99ms
Inhibit Flag
M905 8
M905 9
M906 0
Software HSC Interrupt
Interrupt Pointer
I
HC0
I
HC1
I
HC2
I
HC3
I
HC4
I
HC5
I
HC6
I
HC7
The interrupt is processed
with the DHSCS instruction.
Inhibit FlagInhibit Flag
M906 1
Hardware HSC Interrupt
Interrupt Pointer
I
HHC1
I
HHC2
When the present value
reaches to the set value, the
interrupt can be processed.
M906 2
M906 3
Each interrupt pointer has an inhibitory special relay to control the interrupt, the user can avoid the interrupt by
activating the corresponding special relay.
By the characteristics, those interrupt pointers can be divided into external interrupt, timer interrupt, software
high-speed counter interrupt and hardware high-speed counter interrupt.
① External Interrupt:
The rising or falling signal from the specific input point (X0 to X7) generates an interrupt signal to interrupt the
program in execution, jump to a designated interrupt pointer (IX0 □ to IX7 □ ) and execute a corresponding
interrupt subroutine. The External Interrupt at the VS series PLC also has the delay action function.
Please refer to “2-15-1 External Interrupt” for more details.
② Timer Interrupt:
When the timer interrupt pointer (ITA □□ , ITB □□ or ITC□□ ) is written into the program, the PLC will
automatically interrupt the program execution at a given time (as defined by the □□ in the interrupt pointer).
Its procedure jumps to the appointed interrupt pointer and executes the interrupt subroutine.
Timer interrupt is mainly used to generate a repeated interrupt that could execute fixed and rapid period timing
subroutine. When a certain section is requiring an execution cycle shorter than the PLC's scan time or a fixed time
cycle, the timer interrupt is considered.
For example, the HKY (FNC71) and SEGL (FNC74) instructions can use the PLC's scan time as the scan cycle of
the instructions. However, too long or too short scan time may cause fault. In this case, a timer interrupt
subroutine can be used to perform appropriate scan operation.
Additionally, the RAMP (FNC67) instruction generally depends the scan time of the program to bring the movement
of ramp steps forward. Usually, the scan time is unregulated, thus the generated ramp result will become irregular.
In this case, a subroutine of timer interrupt can be used for the RAMP instruction to depart it from the scan time,
that may stabilize the movement of step thus to produce the regular ramp result.
③ Software High Speed Counter Interrupt:
The result of a comparison instruction by the FNC53 (DHSCS) high-speed counter can be assigned to execute an
interrupt subroutine. When the DHSCS instruction is assigned to execute a certain interrupt subroutine
(IHC0~IHC7) and the comparison result is equal, then PLC will jump to the specified interrupt pointer and execute
the interrupt subroutine. Please refer to the FNC53 (DHSCS) Instruction for more details.
④ Hardware High Speed Counter Interrupt:
When the hardware high-speed counter HHSC1 reaches its set value by the external input, the IHHC1 interrupt can
be generated; also, the HHSC2 can generate the IHHC2 interrupt. Please refer to “2-15-4 Hardware High-Speed
Counter”.
The interrupt subroutine often needs to immediately read the external state or immediately drive the external load. In
this case, the I / O update instruction REF (FNC 50) should be used in the interrupt subroutine to update the I / O
status promptly.
In the interrupt subroutine, should use the Timer T192~T199 when a timer is necessary.
37
Page 44
The interruption is a special mechanism for to break the rules of regular operation; an interrupt subroutine is not
regularly implemented. Therefore, special attention must be paid to the components that are driven in the interrupt
subroutine.
If a step relay is for to active a part of the SFC, it is not allowed to be driven in an interrupt subroutine.
The following example shows that the elements driven in the interrupt subroutine remain in their state.
X20
K100
C0
FE ND
IX0 P
M9000
C0RS T
Y0
IRE T
The following example shows the modified program.
X20
K100
C0
X21
RS T
Y0
FE ND
IX0 P
M9000
A
RS T
C0
M9001
RS T
C0
B
Y0
X0 interrupt signal
X20 count signal
C0 present value
RST C0
Y0
X0 interrupt signal
X20 count signal
C0 present value
RST C0
Y0
X21
A
RST enable
C0 cannot count accurately
2
1
C0 is continuously being reset
Y0 maintains ON status
2
1
1
RST disable
B
2
IRE T
The applications of Interrupt Pointer and the concepts of interrupt subroutine are explained in detaile in the section of
Application Instructions IRET, EI and DI.
38
Page 45
2-13 Numerical System
(1) Binary Number (BIN)
The value in PLC is operated and stored used the binary system. The binary number and relative
terminology are given as follows:
Bit: the basic of the binary number, each value of a Bit must be either “0” or “1”.
Nibble: composed of 4 sequential bits.
For example, b3 ~ b0 can express an one-Nibble hex value: 0 ~ F.
Byte: composed of 8 sequential bits.
For example, b7 ~ b0 can express a two-Nibble hex value: 00 ~ FF.
Word: composed of 2 sequential bytes or 16 sequential bits.
For example, b15 ~ b0 can express a four-Nibble hex value: 0000 ~ FFFF.
Double Word: composed of 2 sequential words, 4 sequential bytes or 32 sequential bits.
For example, b31 ~ b0 can express an eight-Nibble hex value: 00000000 ~ FFFFFFFF.
The relations between every binary Bit, Nibble, Byte, Word and Double Word:
W1W0
BY3BY2BY1BY0
NB7NB6NB5NB4NB3NB2NB1NB0
b31 b30 b29 b28
Expression of the value
For Word (16 bits) or Double Word (32 bits), the Most Significant Bit (MSB), e.g. The b15 of a
Word or the b31 of a Double Word, gives the value positive or negative bias, where “0” for
positive and “1” for negative. The rest bits, e.g. b14~b0 or b30 ~ b0, express the value size.
It is a 16-bit value shows below.
The maximum range of the value expressed by 16 bits and 32 bits:
16 b its
32 b its
-3 2 , 76 8〜3 2, 7 6 7
-2 , 1 47 , 4 8 3 , 64 8 ~ 2 , 1 47 , 4 83 , 64 7
0
b0
0
1
16
4
8
1
2's complement
b0
0
1
2
0
1
FFFBH
(Hexadecimal system)
4+1=5
39
Page 46
(2 ) Octal Nu mber (OC T)
The assigned numbers of PLC’s external input and output terminals are displayed by the octal system.
For example,
The external input ports: X0 ~ X7, X10 ~ X17
The external output ports: Y0 ~ Y7, Y10 ~ Y17
(3) Decimal Number (DEC)
Decimal Number is the value system which people are familiar with. In PLC, a decimal number is always headed
with a “K” in front of the value. For example, K123 indicates a decimal number where the value is 123.
Application occasions of Decimal Number:
Used as the set value of the T and C, for example, K10
Used as the component number of the M, S, T or C, for example, M9, S10, etc.
Used as an Operand device in the applied instruction, for example, MOV K1 D1.
(4) Binary Code Decimal (BCD)
BCD is to express a Decimal digit unit with a Nibble or 4 bits. Sequential 16 bits can express 4 Decimal digits. BCD
is mainly used to read the input value of the Digital Switch (Thumbwheel input) or export the data to the
7-Segment Displayer for displaying the value.
(5) Hexadecimal Number (HEX)
In PLC, a Hex number is always headed with an “H”, for example, H123 represents a Hex number and is valued 123.
(6) Bits of the numerical system and the numerical conversion table:
OCTDE CHEXBIN
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 1
10
11
12
13
14
15
16
17
20
0
1
2
3
4
5
6
7
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
00
01
02
03
04
05
06
07
08
09
0A
0B
0C
0D
0E
0F
10
0 0 0 0
0 0 0 1
0 0 1 0
0 0 1 1
0 1 0 0
0 1 0 1
0 1 1 0
0 1 1 1
1 0 0 0
1 0 0 1
1 0 1 0
1 0 1 1
1 1 0 0
1 1 0 1
1 1 1 0
1 1 1 1
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 1
0 0 0 1
0 0 0 1
0 0 0 1
0 0 0 1
0 0 0 1
0 0 0 1
BCD
0 0 0 0
0 0 0 1
0 0 1 0
0 0 1 1
0 1 0 0
0 1 0 1
0 1 1 0
0 1 1 1
1 0 0 0
1 0 0 1
0 0 0 0
0 0 0 1
0 0 1 0
0 0 1 1
0 1 0 0
0 1 0 1
0 1 1 0
143
..........
99
..........
63
..........
0 1 1 0
40
..........
0 0 1 1
1 0 0 1
..........
1 0 0 1
Page 47
(7) Floating Point (Real number)
The PLC was provided with Floating Point instructions therefore the PLC can calculate decimal numbers.
The decimal numbers are storage and calculated in a PLC using two different pattern formats: Binary Floating Point
Number and Decimal Floating Point Number. The expositions are showed below.
Binary Floating Point Number
Inside of the PLC, the Floating Point calculates and decimal number storages are using Binary Floating Point
Numbers. A Binary Floating Point Number's value storage format is composed of 2 sequential registers. It is
an example, using (D1,D0) to explain a format of a Binary Floating Point Number.
D1 ( b 15〜 b 0 )
726
2
S E7
b31 b3 0 b2 9b24 b2 3 b2 2 b21b 16 b 15 b 14b1 b0
E6
Exponent
(8 bits)
1202-12-2
E1 E0A2 2 A2 1
2
-72-82-9
A1 6 A1 5
Mantissa
(23 bits)
D0 ( b 15〜 b 0 )
2
A1 4A1
-222-23
2
A0
(D1,D0)
Mantissa Sing bit ( 1=N egative, 0=Positive)
Binary Floating Point Number's value
0-1-2-22-23(E7×2 +E6×2 +... ..+E1×2 + E0×2 ) 127
=±(2 +A22×2 +A21×2 +.....+A1×2 +A0×2 )×2/2
7610
If S=0, A22=1, A21=1, A20~A0=0
E7=1, E6~E0=0
Therefor, the Binary Floating Point Number's value storage in the register (D1,D0) is equal to
In the PLC program, the real constant value is usually preceded by the “E”. The effective range of real
constants is -3.402×10 ~ 3.402×10 , which can be expressed by the decimal point or exponent.
128-126-126128
-38
Maximum modulus: 3.402×10
3838
38
By the decimal point: Directly use decimal point to express the value, for example, “E102.35” represents
“102.35”.
By the exponent: Use the mathematical exponent to express, for example, “E1.0235+2” represents “102.35”;
“+2” means to multiply by 10 .
+2
Decimal Floating Point Number
A Decimal Floating Point Number’s value storage format is also composed of 2 sequential registers. It is an
example, using (D3,D2) to explain a format of a Decimal Floating Point Number.
D3
D2
(D3,D2)
b15 b 14 b13b2b1 b0 b15 b14 b13b 2
Exponent
(16 bits)
Exponent Sing bit
(1=Negative, 0=Positive) MSB
Mantissa Sing bit
(1=Negative, 0=Positive) MSB
Mantissa
(16 bits)
Decimal Floating Point Number’s value= (Mantissa) ×10
b1 b0
(Expo nent)
Mantissa =±(1000 ~ 9999) Exponent= -41 ~ +35
If D2=1234, D3=-1
Therefor, the Decimal Floating Point Number’s value storage in the register (D3,D2) is equal to
1234×10 =123.4
A Decimal Floating Point Number’s value limit:
Minimum modulus: 1175×10 Maximum modulus: 3402×10
-1
-4135
The Binary Floating Point Number and Decimal Floating Point Number can use the instructions to convert the
value:
FNC118 ( EB C D ): To convert from a Binary Floating Point Number to a Decimal Floating Point Number.D
FNC119 ( EB I N ): To convert from a Decimal Floating Point Number to a Binary Floating Point Number.D
41
Page 48
2-14 Specia l R elay and Spec i al Register
In the tables below, the symbol “ ” represents that the component is not allowed to use an instruction in the program to
■
drive the relay or write data to the register. And if the special relay or the special register is not listed in this table, which
is reserved for the system and can not be used to drive the relay or write the data to the program either.
2-14-1 Table of Special Relay
Relay ID
No.
PLC Operation Status
■
M9 000
■
M9 001
■
M9 002
■
M9 003
■
M9 004
An always “ON”, “a” Contact, M9000 is “ON” during the running PLC.
An always “OFF”, “a” Contact, M9001 is “OFF” during the running PLC.
Initial Pulse, “a” Contact, M9002 will be “ON” for a Scan Time when the moment PLC is
STOP → RUN.
Initial Pulse, “b” Contact, M9003 will be “OFF” for a Scan Time when the moment PLC is
STOP → RUN.
Error occurred. When either one of the error ag relay M9066, M9067 is “ON”, M9004=“ON” .
Clock Pulse or RTC
■
M9 011
■
M9 012
■
M9 013
■
M9 014
M9 015
M9 016
M9 017
■
M9 018
■
M9 019
Alternate pulse by the period of 10ms cycle time. “ON” 5ms/“OFF” 5ms Pulse
Alternate pulse by the period of 100ms cycle time. “ON” 50ms/“OFF” 50ms Pulse
Alternate pulse by the period of 1sec. cycle time. “ON” 0.5sec./“OFF” 0.5sec. Pulse
Alternate pulse by the period of 1min. cycle time. “ON” 30sec./“OFF” 30sec. Pulse
Pause the RTC and write the values in D9013~D9019 to the RTC
Stop reading time data from the RTC
Modify RTC ±30sec.
M9018=“ON” when RTC is installed in the Main Unit.
Write wrong data onto the RTC
Flag
■
M9 020
■
M9 021
M9 022
■
M9 023
■
M9 025
■
M9 029
■
M9 090
■
M9 162
■
M9 163
Zero Flag. M9020=“ON” if the result of an arithmetic instruction is “0”. (except the MUL and DIV)
Borrow Flag. M9021=“ON” if any “Borrow” occurs by the addition or subtraction instruction.
Carry Flag. M9022=“ON” if any “Carry” occurs by the arithmetic, rotary.... instruction.
Zero Flag. M90023= “ON” if the result of multiplication (MUL) or division (DIV) is “0”.
Overow Flag. M90025= “ON” if the result of division (DIV) is overowed.
Instruction execution completed ag. M9029=“ON” when the executions of some applied
instructions are completed (please refer to the relevant instructions).
All bits “ON” ag at the result of a block data comparison BKCMP (FNC194~FNC199) instruction.
To indicate the completion of HSCT instruction.
External Interrupt delay time set-up ag. Use this ag contact to active the interrupt delay function.
PLC System Operation Mode
M9 031
M9 032
M9 033
M9 034
M9 039
Clear the Non-Latched area memory.
Clear the Latched area memory.
When M9033=“ON” and RUN → STOP, the present value and statuses of T, C, D are retained.
All the outputs are disable. When M9034=“ON”, all external outputs are forced to “OFF” but the Y
contacts for the program still operate normally.
To x PLC's Scan Time duration. When M9039=“ON”, the PLC within a constant scan duration and
the period is allocated by the D9039.
Assigning Specification of Applied Operation Instructions Mode
M9 024
M9 026
M9 027
Assign the BMOV moving direction. When M9024= “OFF”, S → D; when M9024=“ON”, S ← D.
Assign the RAMP operating mode. When M9026=“OFF”, a series of ramp process will be
executed; when M9026=“ON”, one trigger signal will ramp once only.
Assign the PR operating mode. Please refer to PR (FNC 77) Instruction for details.
To protect not to operate the FROM/TO instruction repeatedly.
M9 028
When M9028 = “OFF”, disallows interrupt during FROM/TO is in operation.
When M9028 = “ON”, FROM/TO in an interrupt subroutine is ineffective.
M9 035
Assign the PWM operating time base. When M9035=“OFF”, the parameters for the PWM are by
the unit of 1ms.; when M9035= “ON”, by the unit of 0.1ms.
Description
States and contents of devices are reset at the “END”.
All Coils Y, M, S, T, C turn “OFF” and present values of T, C,
D become “0”; But, the Special M and D will not be
changed.
Series
VS2
VS1
○
○
○
○
○
○
○
○
○
○
VS2
VS1
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
VS2
VS1
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
VS2
VS1
○
○
○
○
○
○
○
○
VS1 VS2 VSM
○
○
○
○
○
○
○
○○○○
VSM
○
○
○
○
○
VSM
○
○
○
○
○
○
○
○
○
VSM
○
○
○
○
○
○
○
○
VSM
○
○
○
○
○
○
○
○
VS3
○
○
○
○
○
VS3
○
○
○
○
○
○
○
○
○
VS3
○
○
○
○
○
○
○
○
○
VS3
○
○
○
○
VS3
○
○
○
○
42
Page 49
Relay ID
No.
Description
Assigning Specification of Applied Operation Instructions Mode
Assign the BINDA operating mode.
16-bit instruction: If M9091= “OFF”, will add the end of string 0000H after the result.
M9 091
If M9091=“ON”, will only convert the data without to add the end of string.
32-bit instruction: If M9091=“OFF”, will add the end of string 00H at the result's last upper 8 bits.
If M9091=“ON”, will add the end of string 20H at the result's last upper 8 bits.
M9 160
M9 161
M9 165
M9 167
M9 168
Assign the XCH to execute the SWAP function.
Assign the 8-bit or 16-bit operating mode for the related instructions. When M9161=“OFF”,
those instructions are processed by the 16-bit mode; when M9161=“ON”, are by the 8-bit mode.
Assign the SORT2 instruction operating mode. When M9165=“OFF”, the sort is by ascending
order; when M9165= “ON”, by descending order.
Assign the HKY instruction operating mode. When M9167=“OFF”, by the “DEC” numeric mode;
when M9167=“ON”, by the “HEX” numeric mode.
Assign the SMOV instruction operating mode. When M9168=“OFF”, by the “DEC” numeric mode;
when M9168=“ON”, by the “HEX” numeric mode.
Step Ladder Instruction Correlated Flags
M9 040
■
M9 046
M9 047
■
M9 048
M9 049
To prevent the step transfer. When M9040=“ON”, the STL state transfer function is disabled.
STL step is working. When M9047=“ON” and any relay of S0~S899=“ON” than M9046=“ON”.
STL monitoring is enable. D9040~D9047 will be active only when M9047=“ON”.
The annunciator monitoring has been enabled. When M9049=“ON” and any coil of S900~S999=
“ON”, than M9048=“ON”.
Enable annunciator monitoring. D9049 will be effective only when M9049=“ON”.
Interrupt Prohibit Flag
M9 050
M9 051
M9 052
M9 053
M9 054
M9 055
M9 056
M9 057
M9 058
M9 059
M9 060
M9 061
M9 062
M9 063
To prevent the external interrupt from IX0. The IX0P or IX0F is prohibited.
To prevent the external interrupt from IX1. The IX1P or IX1F is prohibited.
To prevent the external interrupt from IX2. The IX2P or IX2F is prohibited.
To prevent the external interrupt from IX3. The IX3P or IX3F is prohibited.
To prevent the external interrupt from IX4. The IX4P or IX4F is prohibited.
To prevent the external interrupt from IX5. The IX5P or IX5F is prohibited.
To prevent the external interrupt from IX6. The IX6P or IX6F is prohibited.
To prevent the external interrupt from IX7. The IX7P or IX7F is prohibited.
To prevent the timer interrupt ITA. The ITA □□ for timer interrupt is prohibited.
To prevent the timer interrupt ITB. The ITB □□ for timer interrupt is prohibited.
To prevent the timer interrupt ITC. The ITC □□ for timer interrupt is prohibited.
To prevent the SHSCs' interrupt. Software High Speed Counter interrupts IHC0~7 are prohibited.
To prevent the HHSC1's interrupt. Hardware High Speed Counter interrupt IHHC1 is prohibited.
To prevent the HHSC2's interrupt. Hardware High Speed Counter interrupt IHHC2 is prohibited.
Error Message
■
M9 066
■
M9 067
M9 068
Program CHECK SUM error will cause the PLC stop, M9066=“ON” and “ERR” indicator ash (2Hz).
Operation error. If operation error occurs during program execution, then M9067=“ON” but PLC
will keep running.
Operation error latch. When M9068=“ON” and operation error occurs, the step number where
operation error occur will be latched in D9068,D9069.
Loop Counter
M9 072
M9 099
Start the 32-bit up-count loop counter 0~2,147,483,647. (unit: ms)
Start the 16-bit high-speed-up-count loop counter 0~32,767. (unit: 0.1ms)
Pulse Measurement
■
M9 075
M9 076
M9 077
M9 078
M9 079
M9 080
Pulse measurement setting-up ag. Use this ag contact to active the pulse width / period
measurement function at the X0, X1, X3 or X4.
To start the X0 for pulse measurement.
To start the X1 for pulse measurement.
To start the X3 for pulse measurement.
To start the X4 for pulse measurement.
To set the mode of X0's pulse measurement. “OFF”: pulse width measurement,
“ON”: pulse period measurement
Series
VS1 VS2 VSM
○○○○○○○
○○○
○
○
○○○○○
○
VS1
VS2
VSM
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
VS1
VS2
VSM
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
VS1
VS2
VSM
○
○
○
○
○
○
○
○
○
VS1
VS2
VSM
○
○
○
○
○
○
VS1
VS2
VSM
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
VS3
○
○
○
VS3
○
○
○
○
○
VS3
○
○
○
○
○
○
○
○
○
○
○
○
○
○
VS3
○
○
○
VS3
○
○
VS3
○
○
○
○
○
○
43
Page 50
Relay ID
No.
Pulse Measurement
M9 081
M9 082
M9 083
To set the mode of X1's pulse measurement. “OFF”: pulse width measurement,
“ON”: pulse period measurement
To set the mode of X3's pulse measurement. “OFF”: pulse width measurement,
“ON”: pulse period measurement
To set the mode of X4's pulse measurement. “OFF”: pulse width measurement,
“ON”: pulse period measurement
CP1 Communication
M9 100
M9 101
M9 102
M9 103
■
M9 104
CP1 RS instruction data sending out request ag.
CP1 RS instruction data receive completed ag.
CP1 RS instruction data receive time-out ag.
CP1 RS / LINK / MBUS instruction on communication abnormal ag.
CP1 LINK / MBUS instruction on execution table complete once ag.
CP2 Communication
M9 110
M9 111
M9 112
M9 113
■
M9 114
CP2 RS instruction data sending out request ag.
CP2 RS instruction data receive completed ag.
CP2 RS instruction data receive time-out ag.
CP2 RS / LINK / MBUS instruction on communication abnormal ag.
CP2 LINK / MBUS instruction on execution table complete once ag.
CP3 Communication
M9 120
M9 121
M9 122
M9 123
■
M9 124
CP3 RS instruction data sending out request ag.
CP3 RS instruction data receive completed ag.
CP3 RS instruction data receive time-out ag.
CP3 RS / LINK / MBUS instruction on communication abnormal ag.
CP3 LINK / MBUS instruction on execution table complete once ag.
CP4 Communication
M9 130
M9 131
M9 132
M9 133
■
M9 134
CP4 RS instruction data sending out request ag.
CP4 RS instruction data receive completed ag.
CP4 RS instruction data receive time-out ag.
CP4 RS / LINK / MBUS instruction on communication abnormal ag.
CP4 LINK / MBUS instruction on execution table complete once ag.
CP5 Communication
M9 140
M9 141
M9 142
M9 143
■
M9 144
CP5 RS instruction data sending out request ag.
CP5 RS instruction data receive completed ag.
CP5 RS instruction data receive time-out ag.
CP5 RS / LINK / MBUS instruction on communication abnormal ag.
CP5 LINK / MBUS instruction on execution table complete once ag.
Input Pulse Capture Flag
M9 170
M9 171
M9 172
M9 173
M9 174
M9 175
M9 176
M9 177
X0 input signal captured ag.
X1 input signal captured ag.
X2 input signal captured ag.
X3 input signal captured ag.
X4 input signal captured ag.
X5 input signal captured ag.
X6 input signal captured ag.
X7 input signal captured ag.
Hardware High Speed Counter
■
M9 196
■
M9 197
HHSC1's counting direction ag. When M9196=“OFF”, up counting; when “ON”, down counting.
HHSC2's counting direction ag. When M9197=“OFF”, up counting; when “ON”, down counting.
Description
Series
VS1 VS2 VSM
○
○
○
○
○
○
○
○
○
VS1 VS2 VSM
○○○○○○○
○
○
○
○
○
○
○
○
○
VS1 VS2 VSM
○
○
○
○
○
○
○
○
○
○
○
○
○○○○
VSM
VS2
VS1
○
○
○
○
○
○
○
○
○
○
VSM
VS2
VS1
VSM
VS2
VS1
VSM
VS2
VS1
○○○○○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
VSM
VS2
VS1
○
○
○
○
VS3
○
○
○
VS3
○
○
○
○
VS3
○
○
○
○
VS3
○
○
○
○
○
VS3
○
○
○
○
○
VS3
○
○
○
○
○
VS3
○
○
○
○
○
○
○
○
VS3
○
○
44
Page 51
Relay ID
No.
Description
The 32-bit Counter Count Direction Control
M9 2 0 0
M9 2 3 4
When M92 □□ =“OFF”, the C2 □□ is operated as a up counter.
〜
When M92 □□ =“ON”, the C2 □□ is operated as a down counter.
Controlling Flag of Software High Speed Counter Count Direction
M9 2 3 5
M9 2 4 5
When M92 □□ =“OFF”, the C2 □□ is operated as a up counter.
〜
When M92 □□ =“ON”, the C2 □□ is operated as a down counter.
Monitoring Flag of Software High Speed Counter Count Direction
■
M9 2 4 6
■
M9 2 5 5
When C2 □□ is operated a up count, M92 □□=“OFF”.
〜
When C2 □□ is operated a down count, M92 □□=“ON”.
Working Area of the EC1 Expansion Card
M9 2 6 0
M9 2 7 9
EC1 Expansion Card's working area. M9260~M9267= EC1X0~EC1X7;
〜
M9270~M9277=EC1Y0~EC1Y7.
Working Area of the EC2 Expansion Card
M9 2 8 0
M9 2 9 9
EC2 Expansion Card's working area. M9280~M9287= EC2X0~EC2X7;
〜
M9290~M9297=EC2Y0~EC2Y7.
Working Area of the EC3 Expansion Card
M9 3 0 0
M9 3 1 9
EC3 Expansion Card's working area. M9300~M9307= EC3X0~EC3X7;
〜
M9310~M9317=EC3Y0~EC3Y7.
DUTY Instruction Output
M9 330
M9 331
M9 332
M9 333
M9 334
Destination #1 for the timing sequence pulse generative instruction DUTY (FNC186).
Destination #2 for the timing sequence pulse generative instruction DUTY (FNC186).
Destination #3 for the timing sequence pulse generative instruction DUTY (FNC186).
Destination #4 for the timing sequence pulse generative instruction DUTY (FNC186).
Destination #5 for the timing sequence pulse generative instruction DUTY (FNC186).
Y0 Axis's Positioning Control Flag
■
M9 340
■
M9 341
■
M9 342
■
M9 343
■
M9 344
M9 345
M9 346
M9 347
■
M9 348
M9 349
M9 350
Y0 axis's status. “OFF” means the Y0 is in the READY status, it is available for a positioning
instruction; while “ON” = BUSY, the Y0 has been occupying.
Y0 axis's pulse output monitor. “ON” means pulse is generating.
Y0 axis's positioning completed ag.
Y0 axis's positioning abnormal stop ag.
Y0 axis's zero home positioning has been completed.
Y0 axis's stop ag (with gradually slow down).
Y0 axis's immediately stop ag.
Y0 axis's table positioning start signal.
Y0 axis's M-code active ag.
Y0 axis's M-code clear command.
Y0 axis's external interrupt trigger type. When M9350= “OFF”, the interrupt is triggered by a rising
edge; when M9350= “ON”, that is triggered by a falling edge.
Y1 Axis's Positioning Control Flag
■
M9 360
■
M9 361
■
M9 362
■
M9 363
■
M9 364
M9 365
M9 366
M9 367
■
M9 368
M9 369
M9 370
Y1 axis's status. “OFF” means the Y1 is in the READY status, it is available for a positioning
instruction; while “ON” = BUSY, the Y1 has been occupying.
Y1 axis's pulse output monitor. “ON” means pulse is generating.
Y1 axis's positioning completed ag.
Y1 axis's positioning abnormal stop ag.
Y1 axis's zero home positioning has been completed.
Y1 axis's stop ag (with gradually slow down).
Y1 axis's immediately stop ag.
Y1 axis's table positioning start signal.
Y1 axis's M-code active ag.
Y1 axis's M-code clear command.
Y1 axis's external interrupt trigger type. When M9370= “OFF”, the interrupt is triggered by a rising
edge; when M9370= “ON”, that is triggered by a falling edge.
Series
VS1
VS2
VSM
○
○
○
VS1
VS2
VSM
○
○
○
VS1
VS2
VSM
○
○
○
VS1
VS2
VSM
○
○
○
VS1
VS2
VSM
○○○○○
VS1
VS2
VSM
○
VS1 VS2 VSM
VS1
VS2
VSM
○
○
○
○
○
○
○
VS2
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
VSM
○
○
○
○
○
○
○
○
○
○
○
○○
○○
○
○
○
○○○
○
○
○
○○
VS1
○○
○○
○
○
○
○○○
○
○
○
○○
VS3
○
VS3
○
VS3
○
VS3
○
VS3
○
VS3
○
VS3
○
○
○
○
○
VS3
○
○
○
○
○
○
○
○
○
○
○
VS3
○
○
○
○
○
○
○
○
○
○
○
45
Page 52
Relay ID
No.
Y2 Axis's Positioning Control Flag
■
M9 380
■
M9 381
■
M9 382
■
M9 383
■
M9 384
M9 385
M9 386
M9 387
■
M9 388
M9 389
M9 390
Y2 axis's status. “OFF” means the Y2 is in the READY status, it is available for a positioning
instruction; while “ON” = BUSY, the Y2 has been occupying.
Y2 axis's pulse output monitor. “ON” means pulse is generating.
Y2 axis's positioning completed ag.
Y2 axis's positioning abnormal stop ag.
Y2 axis's zero home positioning has been completed.
Y2 axis's stop ag (with gradually slow down).
Y2 axis's immediately stop ag.
Y2 axis's table positioning start signal.
Y2 axis's M-code active ag.
Y2 axis's M-code clear command.
Y2 axis's external interrupt trigger type. When M9390=“OFF”, the interrupt is triggered by a rising
edge; when M9390= “ON”, that is triggered by a falling edge.
Y3 Axis's Positioning Control Flag
■
M9 400
■
M9 401
■
M9 402
■
M9 403
■
M9 404
M9 405
M9 406
M9 407
■
M9 408
M9 409
M9 410
Y3 axis's status. “OFF” means the Y3 is in the READY status, it is available for a positioning
instruction; while “ON” = BUSY, the Y3 has been occupying.
Y3 axis's pulse output monitor. “ON” means pulse is generating.
Y3 axis's positioning completed ag.
Y3 axis's positioning abnormal stop ag.
Y3 axis's zero home positioning has been completed.
Y3 axis's stop ag (with gradually slow down).
Y3 axis's immediately stop ag.
Y3 axis's table positioning start signal.
Y3 axis's M-code active ag.
Y3 axis's M-code clear command.
Y3 axis's external interrupt trigger type. When M9410=“OFF”, the interrupt is triggered by a rising
edge; when M9410=“ON”, that is triggered by a falling edge.
Description
Series
VS1 VS2 VSM
○○
○○
○
○
○
○○○
○
○
○
○○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
VS1 VS2 VSM
○○
○○
○
○
○
○○○
○
○
○
○○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
VS3
○
○
○
○
○
○
○
○
○
○
○
VS3
○
○
○
○
○
○
○
○
○
○
○
46
Page 53
2-14-2 Instruction Table of Special Register
Register
ID No.
PLC Operation Status
D9 000
■
D9 004
D9 010
D9 011
D9 012
Time Setting of Watch Dog Timer. The WDT default value is 200ms (unit: 1ms)
Error code. When M9004= “ON”, this content value will show an error report. Please refer to the
“2-14-3 Error Code Description” for more detail.
Current operation scan time (unit: 0.1ms)
Min. scan time (unit: 0.1ms)
Max. scan time (unit: 0.1ms)
Syst em Stat us
VS1Seri es:10
■
D9 001
The PLC’s model and version.
VS2 Seri es:11
VSMSeri es:12
VS3 Seri es:13
VSM-28 ML Seri es:14
Type of Memory. 00H indicates using the built-in Flash Memory of PLC. 10H indicates using the
extend Flash Memory Card.
Input points (X0~X7) lter response time setting. (unit: 1ms) The default value is 10ms and the
available range is 0~60ms.
To set the xed period of the PLC's Scan Time. The default value is 0ms (unit: 1ms).
Time D a ta of Re al Time Cl ock (R TC)
D9 013
D9 014
D9 015
D9 016
D9 017
D9 018
D9 019
Seconds value. (0~59)
Minute value. (0~59)
Hour value. (0~23)
Date value. (1~31)
Month value. (1~12)
Year value. (2000~20YY, 4 digits)
Day of week. 0 (Sun.) ~ 6 (Sat.)
VS -3AV-EC Vo l tag e I /O Bri ef Exp a nsi o n Card
■
D9 030
■
D9 031
D9 032
The AD converted value of VI1 at the VS-3AV-EC, 0~10V = 0~4000
The AD converted value of VI2 at the VS-3AV-EC, 0~10V = 0~4000
The DA digital input value for the VO at the VS-3AV-EC, 0~1000 = 0~10V
Step L add er Inst ructi on Corr ela ted
■
D9 040
■
D9 041
■
D9 042
■
D9 043
■
D9 044
■
D9 045
■
D9 046
■
D9 047
■
D9 049
st
1 active STL step
nd
2 active STL step
rd
3 active STL step
th
4 active STL step
th
5 active STL step
th
6 active STL step
th
7 active STL step
th
8 active STL step
When M9047= “ON”, the active STL step ID numbers will be stored in
D9040~D9047, where the D9040 will store the lowest active ID number,
the second lowest one will store in the D9041, and so forth.
When M9049=“ON”, it stores the lowest currently active Annunciator in D9049.
Er ror Me s sag e
■
D9 067
D9 068
D9 069
D9 070
D9 071
Error code to identify the operation error.
Lower 16 bits
Upper 16 bits
Lower 16 bits
Upper 16 bits
Latched the step address number of the operation error.
Step address number of the operation error.
Lo o p Cou n ter
D9 072
D9 073
D9 099
Lower 16 bits
Upper 16 bits
The present value of 32-bit up-count loop counter
0~2,147,483,647. (unit: ms)
The present value of 16-bit high-speed-up-count loop counter 0~32,767. (unit: 0.1ms)
Description
011 0 0
Ver sion: V1. 00
Series
VS1
VS2
VSM
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
VS1
VS2
VSM
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
VSM
VS2
VS1
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
VSM
VS2
VS1
○
○
○
○
○
○
○
○
○
VSM
VS2
VS1
○
○
○
○
○
○
VSM
VS2
VS1
○
○
○
○
○
○
○
○
○
VSM
VS2
VS1
○
○
○
○○○○
VS3
○
○
○
○
○
VS3
○
○
○
○
○
VS3
○
○
○
○
○
○
○
VS3
○
○
○
VS3
○
○
VS3
○
○
○
VS3
○
47
Page 54
Register
ID No.
Pulse Measurement
D9 074
D9 075
D9 076
D9 077
D9 078
D9 079
D9 080
D9 081
D9 082
D9 083
D9 084
D9 085
D9 086
D9 087
D9 088
D9 089
D9 090
D9 091
D9 092
D9 093
D9 094
D9 095
D9 096
D9 097
Lower 16 bits
Upper 16 bits
Lower 16 bits
Upper 16 bits
Lower 16 bits
Upper 16 bits
Lower 16 bits
Upper 16 bits
Lower 16 bits
Upper 16 bits
Lower 16 bits
Upper 16 bits
Lower 16 bits
Upper 16 bits
Lower 16 bits
Upper 16 bits
Lower 16 bits
Upper 16 bits
Lower 16 bits
Upper 16 bits
Lower 16 bits
Upper 16 bits
Lower 16 bits
Upper 16 bits
CP1 Communication Port
D9 100
■
D9 101
■
D9 102
The CP1's station number.
The CP1's amount of residual data to be sent out by the instruction RS.
The CP1's amount of the data already received by the instruction RS.
CP2 Communication Port
D9 110
■
D9 111
■
D9 112
The CP2's station number.
The CP2's amount of residual data to be sent out by the instruction RS.
The CP2's amount of the data already received by the instruction RS.
CP3 Communication Port
D9 120
■
D9 121
■
D9 122
The CP3's station number.
The CP3's amount of residual data to be sent out by the instruction RS.
The CP3's amount of the data already received by the instruction RS.
CP4 Communication Port
D9 130
■
D9 131
■
D9 132
The CP4's station number.
The CP4's amount of residual data to be sent out by the instruction RS.
The CP4's amount of the data already received by the instruction RS.
CP5 Communication Port
D9 140
■
D9 141
■
D9 142
The CP5's station number.
The CP5's amount of residual data to be sent out by the instruction RS.
The CP5's amount of the data already received by the instruction RS.
Description
The X0's rising edge to catch the present value of loop counter.
(unit: 1/6 µs)
The X0's falling edge to catch the present value of loop counter.
(unit: 1/6 µs)
The X0's Pulse Width/Period Measurement cached value. (unit: 10µs).
The measurable range of Width: 10µs~100s, minimum Pulse Period: 20µs
The X1's rising edge to catch the present value of loop counter.
(unit: 1/6 µs)
The X1's falling edge to catch the present value of loop counter.
(unit: 1/6 µs)
The X4's Pulse Width/Period Measurement cached value. (unit: 10µs).
The measurable range of Width: 10µs~100s, minimum Pulse Period: 20µs
The X3's rising edge to catch the present value of loop counter.
(unit: 1/6 µs)
The X3's falling edge to catch the present value of loop counter.
(unit: 1/6 µs)
The X4's Pulse Width/Period Measurement cached value. (unit: 10µs).
The measurable range of Width: 10µs~100s, minimum Pulse Period: 20µs
The X4's rising edge to catch the present value of loop counter.
(unit: 1/6 µs)
The X4's falling edge to catch the present value of loop counter.
(unit: 1/6 µs)
The X4's Pulse Width/Period Measurement cached value. (unit: 10µs).
The measurable range of Width: 10µs~100s, minimum Pulse Period: 20µs
Series
VS1 VS2 VSM
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
VS1
VS2
VSM
○
○
○
○
○
○
○
○
○
VS1
VS2
VSM
○
○
○
○
○
○
○
○
○
VS1
VS2
VSM
○
○
○
○
○
○
VS1
VS2
VSM
VS1 VS2 VSM
VS3
○
○
○
○
○
○
○
○
○
○
○
○
VS3
○
○
○
VS3
○
○
○
VS3
○
○
○
VS3
○
○
○
VS3
○
○
○
48
Page 55
Register
ID No.
RND, HSCT, INT
D9 160
D9 161
■
D9 162
D9 163
Lower 16 bits
Upper 16 bits
Providing a number for the RND (FNC184) instruction to produce a
random value. Initial value: K1
The number of count is activated at the table of HSCT instruction.
External interrupt delay time set value ( Unit: ms).
Index Register V, Z
D9 180
D9 181
D9 182
D9 183
D9 184
D9 185
D9 186
D9 187
D9 188
D9 189
D9 190
D9 191
D9 192
D9 193
D9 194
D9 195
Z0 Index Register
V0 Index Register
Z1 Index Register
V1 Index Register
Z2 Index Register
V2 Index Register
Z3 Index Register
V3 Index Register
Z4 Index Register
V4 Index Register
Z5 Index Register
V5 Index Register
Z6 Index Register
V6 Index Register
Z7 Index Register
V7 Index Register
Hardware High Speed Counter
D9 224
D9 225
D9 226
D9 227
D9 228
D9 229
D9 230
D9 231
D9 232
D9 233
HHSC1 counting mode selection. “0” is to disable the HHSC1; “1” ~ “6” represent different modes.
HHSC2 counting mode selection. “0” is to disable the HHSC2; “1” ~ “6” represent different modes.
Lower 16 bits
Upper 16 bits
Lower 16 bits
Upper 16 bits
Lower 16 bits
Upper 16 bits
Lower 16 bits
Upper 16 bits
The present value of HHSC1.
The present value of HHSC2.
The set value of HHSC1.
The set value of HHSC2.
Working Area of the EC1 Expansion Card
D9 2 6 0
D9 2 7 9
EC1 Expansion Card's working area. D9260~D9279=EC1D0~EC1D19.
〜
Working Area of the EC2 Expansion Card
D9 2 8 0
D9 2 9 9
EC2 Expansion Card's working area. D9280~D9299=EC2D0~EC2D19.
〜
Working Area of the EC3 Expansion Card
D9 3 0 0
D9 3 1 9
EC2 Expansion Card's working area. D9300~D9319=EC3D0~EC3D19.
〜
DUTY Instruction Output
■
D9 330
■
D9 331
■
D9 332
■
D9 333
■
D9 334
Cycle counter #1 for the timing sequence pulse generative instruction DUTY (FNC186).
Cycle counter #2 for the timing sequence pulse generative instruction DUTY (FNC186).
Cycle counter #3 for the timing sequence pulse generative instruction DUTY (FNC186).
Cycle counter #4 for the timing sequence pulse generative instruction DUTY (FNC186).
Cycle counter #5 for the timing sequence pulse generative instruction DUTY (FNC186).
Description
Series
VS1 VS2 VSM
○
○○○
○○○
VS1 VS2 VSM
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
VS1 VS2 VSM
○○○
○○○
○
○
○
○
○
○
○
○
○
○
○
○
VS1
VS2
VSM
○
○
○
VS1
VS2
VSM
○
○
○
VS1
VS2
VSM
○
○
○
VS1 VS2 VSM
VS3
○○○
○
○
VS3
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
○
VS3
○
○
○
○
○
○
VS3
○
VS3
○
VS3
○
VS3
○
○
○
○
○
49
Page 56
Register
ID No.
Y0 Axis's Positioning Control
D9 340
D9 341
D 34 29
D 34 39
D 34 49
D9 345
D9 346
D9 347
D 34 89
■
■
D9 350
■
D9 351
D 35 29
D 35 39
D 35 49
D 35 59
Lower 16 bits
Upper 16 bits
The Y0's bias speed (by user unit). (Convert it to the real frequency should between 0~20kHz).
The Y0's acceleration time, range = 0~32,000ms.
If <0, then equal to 0; if >32,000, then equal to 32,000.
The Y0's deceleration time, range = 0~32,000ms.
If <0, then equal to 0; if >32,000, then equal to 32,000.
The Y0's number of PG0 input when to execute the ZRN instruction, range = 1~32,767.
If out of the range, then equal to 1.
Lower 16 bits
Upper 16 bits
The Y0's pulse output speed multiple ratio, ranging from 1~30,000 = 0.1%~3,000.0%.
If over the range, then equal to 1,000 (100.0%).
The Y0's M-code register.
9D 3 4 9
Lower 16 bits
Upper 16 bits
Lower 16 bits
Upper 16 bits
Lower 16 bits
Upper 16 bits
Y1 Axis's Positioning Control
D9 360
D9 361
D 36 29
D 36 39
D 36 49
D9 365
D9 366
D9 367
D 36 89
■
■
D9 370
■
D9 371
D 37 29
D 37 39
D 37 49
D 37 59
Lower 16 bits
Upper 16 bits
The Y1's bias speed (by user unit). (Convert it to the real frequency should between 0~20kHz).
The Y1's acceleration time, range = 0~32,000ms.
If <0, then equal to 0; if >32,000, then equal to 32,000.
The Y1's deceleration time, range = 0~32,000ms.
If <0, then equal to 0; if >32,000, then equal to 32,000.
The Y1's number of PG0 input when to execute the ZRN instruction, range = 1~32,767.
If out of the range, then equal to 1.
Lower 16 bits
Upper 16 bits
The Y1's pulse output speed multiple ratio, ranging from 1~30,000 = 0.1%~3,000.0%.
If over the range, then equal to 1,000 (100.0%).
The Y1's M-code register.
9D 3 6 9
Lower 16 bits
Upper 16 bits
Lower 16 bits
Upper 16 bits
Lower 16 bits
Upper 16 bits
Description
The Y0's maximum speed (by user unit).
(Convert it to the real frequency that should appropriate to the PLC's range:
VS1, VS2 is 1~50kHz; VSM, VS3 is 1~200kHz; VSM-28ML is 1~1MHz)
The Y0's preset value when the ZRN is nished (by user unit).
(Convert it to the number of pulse should between -2,147,483,648~
+2,147,483,647)
The Y0's current speed (by user unit). If used for the PLSY or PLSR
instruction, that is the current speed by the unit of Hz.
The Y0's current location (by the number of pulse). The initial value is 0.
If used for the PLSY or PLSR instruction, that is the pulse output amount.
The Y0's current location (present value, PV) of positioning (by user unit).
The initial value is 0.
The Y1's maximum speed (by user unit).
(Convert it to the real frequency that should appropriate to the PLC's range:
VS1, VS2 is 1~50kHz; VSM, VS3 is 1~200kHz; VSM-28ML is 1~1MHz)
The Y1's preset value when the ZRN is nished (by user unit).
(Convert it to the number of pulse should between -2,147,483,648~
+2,147,483,647)
The Y0's current speed (by user unit). If used for the PLSY or PLSR
instruction, that is the current speed by the unit of Hz.
The Y0's current location (by the number of pulse). The initial value is 0.
If used for the PLSY or PLSR instruction, that is the pulse output amount.
The Y0's current location (present value, PV) of positioning (by user unit).
The initial value is 0.
VS1
○○
○○
○○
○○
○○
○○
○○
○○
○○
○○
VS1
○○
○○
○○
○○
○○
○○
○○
○○
Series
VS2
VS2
VSM
○
○
VSM
○
○
VS3
○
○
○○
○○
○○○○
○○
○○
○○
○○
○○
○○
VS3
○
○
○○
○○
○○○○
○○○○
○○
○○
○○
○○
○○○○
50
Page 57
Register
ID No.
Y2 Axis's Positioning Control
D9 380
D9 381
D 38 29
D 38 39
D 38 49
D9 385
D9 386
D9 387
D 38 89
■
■
D9 390
■
D9 391
D 39 29
D 39 39
D 39 49
D 39 59
Lower 16 bits
Upper 16 bits
The Y2's bias speed (by user unit). (Convert it to the real frequency should between 0~20kHz).
The Y2's acceleration time, range = 0~32,000ms.
If <0, then equal to 0; if >32,000, then equal to 32,000.
The Y2's deceleration time, range = 0~32,000ms.
If <0, then equal to 0; if >32,000, then equal to 32,000.
The Y2's number of PG0 input when to execute the ZRN instruction, range = 1~32,767.
If out of the range, then equal to 1.
Lower 16 bits
Upper 16 bits
The Y2's pulse output speed multiple ratio, ranging from 1~30,000 = 0.1%~3,000.0%.
If over the range, then equal to 1,000 (100.0%).
The Y2's M-code register.
9D 3 8 9
Lower 16 bits
Upper 16 bits
Lower 16 bits
Upper 16 bits
Lower 16 bits
Upper 16 bits
Y3 Axis's Positioning Control
D9 400
D9 401
D 40 29
D 40 39
D 40 49
D9 405
D9 406
D9 407
D 40 89
■
■
D9 410
■
D9 411
D 41 29
D 41 39
D 41 49
D 41 59
Lower 16 bits
Upper 16 bits
The Y3's bias speed (by user unit). (Convert it to the real frequency should between 0~20kHz).
The Y3's acceleration time, range = 0~32,000ms.
If <0, then equal to 0; if >32,000, then equal to 32,000.
The Y3's deceleration time, range = 0~32,000ms.
If <0, then equal to 0; if >32,000, then equal to 32,000.
The Y3's number of PG0 input when to execute the ZRN instruction, range = 1~32,767.
If out of the range, then equal to 1.
Lower 16 bits
Upper 16 bits
The Y3's pulse output speed multiple ratio, ranging from 1~30,000 = 0.1%~3,000.0%.
If over the range, then equal to 1,000 (100.0%).
The Y3's M-code register.
9D 4 0 9
Lower 16 bits
Upper 16 bits
Lower 16 bits
Upper 16 bits
Lower 16 bits
Upper 16 bits
Description
The Y2's maximum speed (by user unit).
(Convert it to the real frequency that should appropriate to the PLC's range:
VS1, VS2 is 1~50kHz; VSM, VS3 is 1~200kHz; VSM-28ML is 1~1MHz)
The Y2's preset value when the ZRN is nished (by user unit).
(Convert it to the number of pulse should between -2,147,483,648~
+2,147,483,647)
The Y2's current speed (by user unit). If used for the PLSY or PLSR
instruction, that is the current speed by the unit of Hz.
The Y2's current location (by the number of pulse). The initial value is 0.
If used for the PLSY or PLSR instruction, that is the pulse output amount.
The Y2's current location (present value, PV) of positioning (by user unit).
The initial value is 0.
The Y3's maximum speed (by user unit).
(Convert it to the real frequency that should appropriate to the PLC's range:
VS1, VS2 is 1~50kHz; VSM, VS3 is 1~200kHz; VSM-28ML is 1~1MHz)
The Y3's preset value when the ZRN is nished (by user unit).
(Convert it to the number of pulse should between -2,147,483,648~
+2,147,483,647)
The Y3's current speed (by user unit). If used for the PLSY or PLSR
instruction, that is the current speed by the unit of Hz.
The Y3's current location (by the number of pulse). The initial value is 0.
If used for the PLSY or PLSR instruction, that is the pulse output amount.
The Y3's current location (present value, PV) of positioning (by user unit).
The initial value is 0.
VS1
○○
○○
○○
○○
○○
○○
○○
○○
VS1
○○
○○
○○
○○
○○
○○
○○
○○
Series
VS2
VS2
VSM
○
○
VSM
○
○
VS3
○
○
○○
○○
○○○○
○○○○
○○
○○
○○
○○
○○○○
VS3
○
○
○○
○○
○○○○
○○○○
○○
○○
○○
○○
○○○○
51
Page 58
2-14-3 Error Code Description
System error information (use the contents of D9004)
Error CodeError Cause
90 64
90 65
90 66
90 67
61 00
61 01
61 05
PLC ID≠Project ID
PLC model is incorrect
Check Sum incorrect
Operation error
ROM access error
RAM access error
Watch Dog Timer exceeding
Opportunity to Detect the Error
STOP → RUN
STOP → RUN
STOP → RUN
During the program processing
Power OFF → ON
Power OFF → ON
During the program processing
Operation error information (use the contents of D9067)
Error Code
0
67 01
67 02
67 04
67 05
67 06
67 08
67 10
Normal, no processing error
The destination pointer of the CJ or CALL instruction is not exist. Usually the pointer is modified by an incorrect index
register.
More than 5 Levels of the CALL instruction have been nested together.
More than 5 Levels of the FOR / NEXT loop have been nested together.
An incompatible device has been specified as an operand for an application instruction.
Specified devices or contents at the operand has been exceeded the range for the application instruction.
The source or destination for the FROM / TO instruction is not existed.
The assigned parameter does not match with the application instruction.
Th e c ode belo w i s for the PI D i nstruc t ion
Error Cause
PLC Status Status of the ERR Indicator
STOP
STOP
STOP
RUN
STOP
STOP
STOP
Twinkling by 1Hz
Twinkling by 1Hz
Twinkling by 1Hz
OFF
ON
ON
Twinkling by 1Hz
Error Code
6730
6732
6733
6734
6735
6736
6740
6742
6743
6744
6745
6746
6747
Error Cause
The setting value of Sampling Time (Ts) is beyond the range (Ts < 1).
The setting value of Input Filter constant (α) is beyond the range (α < 0 or α ≥100).
The setting value of Proportional Gain constant (KP) is beyond the range (KP < 1).
The setting value of Integral Time constant (TI) is beyond the range (TI < 0)
The setting value of Differential Gain constant (KD) is beyond the range (KD < 0 or
KD > 100).
The setting value of Derivative Time constant (TD) is beyond the range (TD < 0).
The Sampling Time <= The Scan Time of PLC
The change of the measured Present Value is too large (△ PV < –32768
or △PV > 32767).
The variance of current Error Value is too large (△ EV < –32768 or △ EV > 32767).
The calculating value of Integral process exceeds –32768~32767.
The value of Proportional Gain (KP) is too large, it cause the calculating value
of proportion which exceeds the range.
The calculating value of Differential process exceeds –32768~32767.
The calculating result value of the PID instruction which exceeds -32768~32767.
Effect to the Instruction
The PID instruction will stop
to operate
The PID instruction will
continue to operate
52
Page 59
2-15 The X0~X 7 H igh Speed Inpu t F unction Desc ription
The input points X0~X7 of the VS Series PLC have the abilities to respond to high-speed input and to execute many
high speed functions. The functions of these 8 output points are listed as follows.
Function
Common Input
Frequency Meter
Software High Speed
Counter
External Interrupt
Pulse Capture
Hardware High Speed
Counter
Pulse Measurement
Positioning Control
External Input Point
X0
Use D9020 to adjust the lter time as 0~60ms.
Use the SPD instruction to perform the speed detection function
Use C235~C255 1-phase/2-phase/AB phase counters, besides to generate IHC0~IHC7 interrupt
IX 0 P / FI X 1 P/ FI X2 P / FIX 4P/ FIX5 P / FI X 6 P / FI X7P/ F
Can be the input points of the positioning control's DOG, PG0, INT signals or for the handwheel.
X1X2
X3
IX 3 P / F
HHSC2, to make
the IHHC2 interrupt
Width / Period
measurement
X4
X5X 6
X7
Re f .
Pa ge
17 9
18 6
25
54
55
58
56
42 3
Common Input is available to work with an other advanced function.
When one of the X0~X7 performs a mentioned advanced function above, this input point is not reusable with another
function. However, External Interrupt could cooperate with Pulse Measurement function. (For details, please see the
specic function description.)
When a mentioned advanced function above performs, the lter time of this input point will be automatically adjusted
to 0 ms (deviates form D9020). To prevent noise interference, input points X0~X7 are also mounted with hardware RC
lters.
Thus, the lter time of 0 ms is not true 0 ms. In addition, the response time of input points X0~X7 is varied depending
on the series of VS1, VS2, VSM or VS3.
When the lter time is adjusted to 0 ms, the minimum ON or OFF signal width of each input point is listed as follows.
Series
VS 1
VS 2
VS M
VS M-28 ML
VS 3
X0
50 µs
10 µs10µ s1 0µs10 µs10µ s10µs1 0 µs10 µ s
X1X2
50 µs50µ s
2.5µs2.5µs2.5µs2.5µs
0.5µs0.5µs0.5µs0.5µs10 µs
2.5µs2.5µs2.5µs2.5µs
10 µs10µ s1 0µs1 0 µs
10 µs
External Input Point
X3
50 µs50µ s5 0µs50 µs50µ s
X4
X5X6
10 µs10µ s1 0µs
10 µs10µ s1 0µs
X7
When a multi-function input point is performing an advanced function, the reaction speed of the point should be very
fast. On the other hand, the consequence is relatively sensitive (higher frequency means more sensitive), which
makes the input vulnerability to noise interference. Therefore, it's necessary to pay special attention to the external
wiring. Keep away from interference sources, or even use isolation cables.
As the adjustable input lter time, speed detection and the functions of high-speed counters have been described
above, the sections below will describe the functions of external interrupt, pulse wave capture, hardware high speed
input and pulse measurement.
53
Page 60
2-15-1 External Interrupt
The VS Series PLC has 8 external interrupt input points X0~X7. The External Interrupt function can be employed when
the external input signal that needs instant response, not to be affected by scan time or to read a narrow width pulse.
The External Interrupt signal works with its corresponding interrupt subroutine to execute an external interrupt.
The External Interrupt pointers are listed in the following table:
※ One external input point only corresponds to one external interrupt pointer. Such as either the IX0P or IX0F can be
used in a program; either the IX1P or IX1F can be used in a program, and so forth.
Program example:
When the external input point X1 turns OFF, the IX1F interrupt subroutine is executed and Y0 is set to ON. And the
status of Y0 ON is immediately sent to the output port via the I / O refresh command REF (FNC 50).
The main program.
The First End instruction. End of the main program.
FE ND
IX1 F
The IX1F external interrupt pointer.
M9000
Set the Y0 ON.
SE T
RE F Y0 K 8
IRE T
Y0
Deliver the memory's status to the
outputs Y0~Y7 immediately.
The end of interrupt subroutine and return.
The IX1F external interrupt subroutine.
The VS series PLC external interrupt has the function of delay interrupt. That delay time is by the unit of 1ms.
This feature allows the user to change the starting of the interrupt subroutine by the parameter adjustments, without
to change the external detector's location where the interrupt signal has occurred.
This interrupt delay time setting is by a series of particular pattern below the interrupt pointer. The pattern format of
this standard program can not be changed.
IX0 P
M9163
MO V K X XX D 91 63
Delay time, unit: ms,
can be assigned by a K, D or R.
The interrupt subroutine
Interrupt Input
X0~X7
The actual timing
of the subroutine
is operated
Delay time
IRET
IRE T
The tables below list the special relay and register related to this function:
■
Represents that component is read only.
Relay ID No.
■
M9 163
Register ID No.
D9 163
External Interrupt delay time set-up ag. Use this ag contact to active the interrupt delay function.
External interrupt delay time set value ( Unit: ms).
Description
Description
54
Page 61
2-15-2 Pulse Capture
The function of pulse capture is to get the input signal which the width of ON is narrow. If an input point X0~X7 is not to
use an input special function, its pulse capture is active automatically.
The pulse signals which X0~X7 input points capture will reect to the special relays M9170~M9177. For each captured
point, its special relay can only be cleared by using the RST instruction. And after the END instruction is executed, the
input point is able to capture the next signal.
Only one signal can be captured at a scan time. Therefore, if there is a demand for to capture more signals at a short
time, the external interrupt function can be used for this purpose.
The table below lists the special relays related to this function:
Relay ID No.
M9 170
M9 171
M9 172
M9 173
M9 174
M9 175
M9 176
M9 177
X0 input signal captured ag.
X1 input signal captured ag.
X2 input signal captured ag.
X3 input signal captured ag.
X4 input signal captured ag.
X5 input signal captured ag.
X6 input signal captured ag.
X7 input signal captured ag.
Description
Program example:
During program operation, when the external input point X0 changes from OFF to ON, the M9170 is set to ON in an
interrupt manner. Subsequently, the M9170 will remain its ON status no matter the X0 changes OFF or ON.
After the X20 is turned ON to reset the M9170 to OFF, the M9170 is able to turned ON again by the next time that X0
changes from OFF to ON.
M9170
X0 Inp ut Si gnal
Y0
M917 0
. . . . . .
X20
RS T
M9170
X20( Re set)
55
Page 62
2-15-3 Pulse Measurement
With the pulse measurement function, the VS series PLC can measure X0, X1, X3, X4 input pulse signal's ON width or
cycle period.
The pulse measurement function uses an 1/6 µs loop counter to store the count value to the specic special registers at
the rising edge and falling edge of the input signal respectively. And then calculate the pulse width or pulse period of
the input signal according to the contents of the registers. The calculated width or cycle is stored in the corresponding
special registers in the unit of 10 µs.
The tables below list the special relays and registers related to this function:
■
Represents that component is read only.
Relay ID No.
■
M9 075
M9 076
M9 077
M9 078
M9 079
M9 080
M9 081
M9 082
M9 083
Register ID No.
D9 074
D9 075
D9 076
D9 077
D9 078
D9 079
D9 080
D9 081
D9 082
D9 083
D9 084
D9 085
D9 086
D9 087
D9 088
D9 089
D9 090
D9 091
D9 092
D9 093
D9 094
D9 095
D9 096
D9 097
Description
Pulse measurement setting-up ag. Use this ag contact to active the pulse width / period measurement
function at the X0, X1, X3 or X4.
To start the X0 for pulse measurement.
To start the X1 for pulse measurement.
To start the X3 for pulse measurement.
To start the X4 for pulse measurement.
To set the mode of X0's pulse measurement. “OFF”: pulse width measurement,
“ON”: pulse period measurement
To set the mode of X1's pulse measurement. “OFF”: pulse width measurement,
“ON”: pulse period measurement
To set the mode of X3's pulse measurement. “OFF”: pulse width measurement,
“ON”: pulse period measurement
To set the mode of X4's pulse measurement. “OFF”: pulse width measurement,
“ON”: pulse period measurement
Description
Lower 16 bits
Upper 16 bits
Lower 16 bits
Upper 16 bits
Lower 16 bits
Upper 16 bits
Lower 16 bits
Upper 16 bits
Lower 16 bits
Upper 16 bits
Lower 16 bits
Upper 16 bits
Lower 16 bits
Upper 16 bits
Lower 16 bits
Upper 16 bits
Lower 16 bits
Upper 16 bits
Lower 16 bits
Upper 16 bits
Lower 16 bits
Upper 16 bits
Lower 16 bits
Upper 16 bits
The X0's rising edge to catch the present value of loop counter. (unit: 1/6 µs)
The X0's falling edge to catch the present value of loop counter. (unit: 1/6 µs)
The X0's Pulse Width/Period Measurement cached value. (unit: 10µs).
The measurable range of Width: 10µs~100s, minimum Pulse Period: 20µs
The X1's rising edge to catch the present value of loop counter. (unit: 1/6 µs)
The X1's falling edge to catch the present value of loop counter. (unit: 1/6 µs)
The X1's Pulse Width/Period Measurement cached value. (unit: 10µs).
The measurable range of Width: 10µs~100s, minimum Pulse Period: 20µs
The X3's rising edge to catch the present value of loop counter. (unit: 1/6 µs)
The X3's falling edge to catch the present value of loop counter. (unit: 1/6 µs)
The X3's Pulse Width/Period Measurement cached value. (unit: 10µs).
The measurable range of Width: 10µs~100s, minimum Pulse Period: 20µs
The X4's rising edge to catch the present value of loop counter. (unit: 1/6 µs)
The X4's falling edge to catch the present value of loop counter. (unit: 1/6 µs)
The X4's Pulse Width/Period Measurement cached value. (unit: 10µs).
The measurable range of Width: 10µs~100s, minimum Pulse Period: 20µs
Must use the M9075 to drive M9076~M9079 to activate the pulse measurement function at the corresponding input
point X0, X1, X3 or X4.
The pulse measurement and external interrupt functions can use an external input point at the same time.
56
Page 63
Program example 1:
Pulse width measurement at the X0 input point.
X0 input signal
Measuring zone
M9075
M9076
Use the M9075 to drive the M9076 to activate the X0's pulse measurement function.
. . . . . .. . . . . .
The First End instruction. End of the main program.
FE ND
IX0 F
M9000
The IX0F external interrupt pointer. When X0= ON → OFF, this subroutine executes once.
DM OV D 90 78 D 0
The end of interrupt subroutine and return.
IRE T
Since the M9080=OFF, it executes the pulse width measurement and moves the result
data from D9079, D9078 to D1, D0 registers.
Program example 2:
Pulse period measurement at the X1 input point.
X1 input signal
Measuring zone
M9075
M9077
Use the M9075 to drive the M9077 to activate the X1's pulse measurement function.
X20
M9081
Use the X20 to drive the M9081. If that is ON, executes the pulse period measurement function.
. . . . . .. . . . . .
The First End instruction. End of the main program.
FE ND
IX1 P
M9000
M908 1
X1
D9085,D9084
will not be updated
The IX1P external interrupt pointer. When X1= OFF → ON, this subroutine executes once.
DM OV D 90 84 D 10
The end of interrupt subroutine and return.
IRE T
will be updated
If the M9081=ON, it executes the pulse period measurement and moves the result
data from D9085, D9084 to D11, D10 registers.
This interval must ≥ one PLC's Scan Time
D9085,D9084
D9085,D9084
will not be updated
D9085,D9084
will be updated
As shown in the figure above, after the period measurement mode (M9081= OFF → ON) is selected, the measured
value of the period in D9085 and D9084 will not be updated at the first rising edge until the next rising edge is
appeared.
57
Page 64
2-15-4 Hardware High Speed Counter
The VS series PLC has two sets of Hardware High-Speed Counter: HHSC1 and HHSC2.
To reach the purposes of high-speed counting, the HHSC uses its hardware circuit to get high-speed pulse input.
Therefore, in the counting process, HHSC will not affect the efficiency of CPU implementation. When planning a control
system, one can make good use of HHSC function.
The HHSC is a 32-bit up/down count counter with a latched function. Also, with the function of set value comparison,
when a pulse input to make its present value and set value are equal, it starts the IHHC interrupt.
The figure below shows the configuration of HHSC:
PLC special registers and special relays (in the memory of CPU)
X0
(X3)
X1
(X4)
HHSC
mode select register
D9224
(D9225 )
Mode
select register
Mode select circuit
Up count
Down
count
Active
HHSC
present value register
D9227、 D9 22 6
(D9229 、 D 92 28)
Present value register
HHSC
counting direction flag
M9196
(M9197 )
Compar at or
Values are equal
set value register
D9231、 D9 23 0
(D9233 、 D 92 32)
Hardw are c ircuit of the HH SC
※The structures of HHSC1 and HHSC2 are identical. The upper components in the
figure indicate the corresponding components of HHSC1, and the components in
brackets represent the corresponding components of HHSC2.
HHSC
Set valu e re gister
HHSC
interrupt prohibit flag
M9062
(M9063 )
Interrupt
prohibition
flag
Interrupt of HHSC1
(HHSC2)
From the figure above, HHSC possesses both CPU's memory registers and hardware circuit registers.
When executing the END instruction, the PLC system program automatically writes the HHSC's mode register, set
value register and interrupt prohibit flag to the hardware circuit. That also reads the HHSC's present value from the
hardware circuit and stores it in the CPU's present value register.
In order to meet the needs of fast and prompt process, the VS PLCs are also designed with the “Hardware high-speed
counter data move, HHCMV (FNC 189)” instruction. With the HHCMV instruction, the present value in the HHSC
hardware circuit can be read out immediately or the set value can be written to the HHSC hardware circuit.
The operating modes of HHSC are illustrated by using the HHSC1.
Mode 1: 1-phase Up count
U(X0)
Mode 2: 1-phase Up/Down count
DIR(X1)
Up count
U/D(X0)
HHSC1
Present value
Mode 3: 2-phase Up/Down count
HHSC1
Present value
Mode 4: AB-phase×1 count
The encoder is reversed here
U(X0)
A(X0)
D(X1)
B(X1)
HHSC1
Present value
HHSC1
Present value
Mode 5: AB-phase×2 count Mode 6: AB-phase×4 count
The encoder is reversed here
The encoder is reversed here
Down count
A(X0)
B(X1)
HHSC1
Present value
A(X0)
B(X1)
HHSC1
Present value
The tables below list the special relays and registers related to the HHSCs:
■
Represents that component is read only.
Relay ID No.
M9 062
M9 063
■
M9 196
■
M9 197
Register ID No.
D9 224
D9 225
D9 226
D9 227
D9 228
D9 229
D9 230
D9 231
D9 232
D9 233
To prevent the HHSC1's interrupt. Hardware High Speed Counter interrupt IHHC1 is prohibited.
To prevent the HHSC2's interrupt. Hardware High Speed Counter interrupt IHHC2 is prohibited.
HHSC1's counting direction ag. When M9196=“OFF”, up counting; when “ON”, down counting.
HHSC2's counting direction ag. When M9197=“OFF”, up counting; when “ON”, down counting.
HHSC1 counting mode selection. “0” is to disable the HHSC1; “1” ~ “6” represent different modes.
HHSC2 counting mode selection. “0” is to disable the HHSC2; “1” ~ “6” represent different modes.
Lower 16 bits
Upper 16 bits
Lower 16 bits
Upper 16 bits
Lower 16 bits
Upper 16 bits
Lower 16 bits
Upper 16 bits
The present value of HHSC1.
The present value of HHSC2.
The set value of HHSC1.
The set value of HHSC2.
Description
Description
59
Page 66
Program example:
This exemplary program is mainly used to describe the actual usage of the HHSC1 and HHSC2.
To use the HHSC, only need to set the counting mode at the special register, then the HHSC can start to count
obediently. When the PLC is executing the END instruction, the PLC system automatically reads the HHSC present
value from the hardware circuit, and store it in the present value register.
To get the most precise present value during the user program is in executing, can use the DHHCMV instruction to
read that from the hardware circuit immediately. When the DHHCMV instruction is executing, the PLC system rstly
reads out the HHSC hardware circuit's present value and stores it in the CPU's present value register, then transports
this value to the destination register of the DHHCMV instruction. Besides, to reset the present value of the HHSC
instantly, must use the DHHCMV instruction rather than use the RST instruction.
In addition, according to the quick response of the application requirement, can use its hardware comparison function
to immediately generate an interrupt, that could avoid the delay from the PLC's Scan Time.
X10
MO V P K0 D92 2 4
X10
MO V P K4 D92 2 4
The X10 is the HHSC1's start signal.
When X10 is OFF, the HHSC1 is disabled.
When X10 is ON, the HHSC1's counting mode is AB-Phase×1.
M9000
DH HCMV D92 2 6 D0
Read the present value from the HHSC1 and store it to the D0.
M0
DH HCMVP K0 D 9226
M9002
DH HCMV K10 0 0 D9230
Set the present value of the HHSC1 to zero.
Set the HHSC1's set value to 1000.
When its present value = set value, the IHHC1's interrupt will occur.
X11
MO V P K0 D92 2 5
X11
MO V P K6 D92 2 5
The X11 is the HHSC2's start signal.
When X11 is OFF, the HHSC2 is disabled.
When X11 is ON, the HHSC2's counting mode is AB-Phase×4.
M9000
DH HCMV D92 2 8 D2
Read the present value from the HHSC2 and store it to the D2.
M1
Set the present value of the HHSC2 to zero.
Set the HHSC2's set value to 2000.
When its present value = set value, the IHHC2's interrupt will occur.
M9002
DH HCMVP K0 D 9228
DH HCMV K20 0 0 D9232
The First End instruction. End of the main program.
FE ND
IHH C1
Y0
M9000
IHH C2
Y1
M9000
The pointer of the interrupt subroutine HHSC1.
Invert the output of the Y0.
Y0
RE F Y0 K8
IRE T
Y1
RE F Y0 K8
IRE T
End of the user program.
EN D
Output the statuses of Y0~Y7 immediately.
The end of interrupt subroutine IHHC1 and return.
The pointer of the interrupt subroutine HHSC2.
Invert the output of the Y1.
Output the statuses of Y0~Y7 immediately.
The end of interrupt subroutine IHHC2 and return.
60
Page 67
2-16 Expans i on Card Relate d Components
The Expansion Card Sockets are designed for exible expansions, on the upper side of the VS Series PLC. Which are
available to install DIO expansion cards to increase a small number of control points in a cost effective way. Also can
install the communication port (CP) expansion card to expand communication capabilities for linking with external
accessories of communication control. In addition, the special function (SF) expansion card is capable to perform
various special controls, such as position inspection, speed control, temperature control, etc. to present a complicated,
high-level control system.
VS Series PLC Expansion Cards
Main Specification
DIO
Expansion
Card
Comm.
Expansion
Card
Special
Function
Card
Model Name Item
★
VS -4X Y - EC
VS -4X-E C
★
VS -4Y - EC
★
VS - 8XY - EC
VS -8X-E C
VS -8Y T-EC
VS -8X I -EC
VS -8Y T I -E C
VS-48 5-E C
VS-48 5A- EC
VS-D 485 -EC
VS-D 485 A-E C
VS-D2 32- EC
VS-D5 2A- EC
VS-E NET-E C
VS-3AV-E C
VS-4A D-E C
VS-2DA-E C
VS-4A -EC
VS-3I SC-E C
VS-2TC-E C
VS-4TC-E C
VS-1P T-EC
V S -2P T-EC
DIO Expansion Card: 2 DI (DC 24V); 2 DO ★; I/O by screw-clamp terminal
DI Expansion Card: 4 DI (DC 24V); output by screw-clamp terminal
DO Expansion Card: 4 DO ★; output by screw-clamp terminal
DIO Expansion Card: 4 DI (DC 24V); 4 DO ★; I/O by screw-clamp terminal
DI Expansion Card: 8 DI (DC 24V); input by screw-clamp terminal
DO Expansion Card: 8 DO (DC 24V, 300mA NPN transistor); output by screw-clamp terminal
DI Expansion Card: 8 DI (DC 24V); input by IDC connector
DO Expansion Card: 8 DO (DC 24V, 100mA NPN transistor); output by IDC connector
RS-485 Comm. Expansion Card: One non-isolated RS-485 port with TX / RX indicators; dist. 50m Max.
RS-485 Comm. Expansion Card: One isolated RS-485 port with TX / RX indicators; dist. 1000m Max.
RS-232C Communication Expansion Card: Dual non-isolated RS-232 ports with TX / RX indicators;
dist. 15m Max.; wiring by the RX / TX / SG terminals
RS-485 + RS-232C Communication Expansion Card: One isolated RS-485 port (1000m) &
one non-isolated RS-232C port (15m), both with TX / RX indicators and wiring by terminals
Ethernet + RS-485 Communication Expansion Card: One Ethernet port (with additional non-isolated
RS-485, dist. 50m) & one non-isolated RS-485 port (dist. 50m), both with TX / RX indicators
Brief Voltage I/O Card: 2 channel (0 ~ 10V, 12-bit) inputs; 1 channel (0 ~ 10V, 10-bit) output;
with a calibrated DC 10V output; non-isolated
Analog Input Card: 4 channel (12-bit) inputs, each channel could output either –10 ~ +10V, 4 ~ 20mA or
–20 ~ +20mA; non-isolated
Analog Output Card: 2 channel (12-bit) outputs, each channel could input either –10 ~ +10V, 4 ~ 20mA
or –20 ~ +20mA; non-isolated
Analog I/O Card: 2 channel (12-bit) inputs + 2 channel (12-bit) outputs, each channel could input/output
either –10 ~ +10V, 4 ~ 20mA or –20 ~ +20mA; non-isolated
Inverter Speed Control Card: 3 channel (0.1% resolution) voltage outputs; totally isolated for each channel
Thermocouple Temperature Input Card: 2 channel (K, J, R, S, T, E, B or N type thermocouple, 0.2 ~ 0.3℃
resolution) inputs; non-isolated
Thermocouple Temperature Input Card: 4 channel (K, J, R, S, T, E, B or N type thermocouple, 0.2 ~ 0.3℃
resolution) inputs; non-isolated
The VS Series PLCs are equipped with one to three Expansion Card Sockets depending on the model. There are
congured with 20 special relays and 20 special registers for each Expansion Card Socket as the work area of the card.
For helping memory and convenience in use, every special component of the Expansion Card at a socket is given a
corresponding “Simple Code”. Hereafter, the “Simple Code” will be used in the following documents.
Expansion Card
Socket
EC1
EC2
EC3
Working Area
Special ComponentSimple Code
M92 6 0 〜 M 9269
M92 7 0 〜 M 9279
D92 6 0 〜 D927 9
M92 8 0 〜 M 9289
M92 9 0 〜 M 9299
D92 8 0 〜 D929 9
M93 0 0 〜 M 9309
M93 1 0 〜 M 9319
D93 0 0 〜 D931 9
EC1 X 0 〜 E C1X7
EC1 Y 0 〜 E C1Y7
EC1 D 0 〜 E C1D1 9
EC2 X 0 〜 E C2X7
EC2 Y 0 〜 E C2Y7
EC2 D 0 〜 E C2D1 9
EC3 X 0 〜 E C3X7
EC3 Y 0 〜 E C3Y7
EC3 D 0 〜 E C3D1 9
Available Card Type for the Socket
DI O CardCP Car dSF Car d *
○
○
○
○○
—
○
(at the VS3 only)
○
○
* The VS-3AV-EC can ONLY be installed at the EC2 expansion socket otherwise it is ineffective. Except for the
VS-3AV-EC, the VS1 series can install one SF card only.
61
Page 68
2-16-1 The DIO Expansion Card Related Components
When a DIO Expansion Card is installed in the Main Unit, those components' X/Y numbers at this card are correspond
to their Simple Codes respectively. (★ Selectable output: R: Relay; T: NPN transistor)
Model Name of
Expansion Card
VS-4X Y-EC
★
VS-4X-E C
★
VS-4Y-EC
VS - 8 XY - E C
★
Model Name of
Expansion Card
VS-8X-E C VS-8X I -EC
Expansion Card
Socket
EC1
EC2
EC3
EC1
EC2
EC3
EC1
EC2
EC3
EC1
EC2
EC3
Expansion Card
Socket
EC1
EC2
EC3
Simple Code at the DIO Card
X0
EC 1X0
X1X2
EC 1X1
X3Y 0
EC 2X0 E C2X1
EC 3X0 E C3X1
EC 1X0 E C1X1 E C 1X2 E C1X 3
EC 2X0 E C2X1 E C 2X2 E C2X 3
EC 3X0 E C3X1 E C 3X2 E C3X 3
EC 1X0 E C1X1 E C 1X2 E C1X 3
EC 2X0 E C2X1 E C 2X2 E C2X 3
EC 3X0 E C3X1 E C 3X2 E C3X 3
Simple Code at the DIO Card
X0
EC 1X0
EC 2X0
EC 3X0
X1
EC 1X1
EC 2X1
EC 3X1
X2
EC 1X2
EC 2X2
EC 3X2
X3
EC 1X3
EC 2X3
EC 3X3
EC 1Y0
EC 2Y0
EC 3Y0
EC 1Y0
EC 2Y0
EC 3Y0
EC 1Y0
EC 2Y0
EC 3Y0
X4
EC 1X4
EC 2X4
EC 3X4
Y1Y2
EC 1Y1
EC 2Y1
EC 3Y1
EC 1Y1
EC 2Y1
EC 3Y1
EC 1Y1
EC 2Y1
EC 3Y1
X5
EC 1X5
EC 2X5
EC 3X5
EC 1Y2
EC 2Y2
EC 3Y2
EC 1Y2
EC 2Y2
EC 3Y2
X6
EC 1X6
EC 2X6
EC 3X6
Y3
EC 1Y3
EC 2Y3
EC 3Y3
EC 1Y3
EC 2Y3
EC 3Y3
X7
EC 1X7
EC 2X7
EC 3X7
Model Name of
Expansion Card
VS-8Y T-EC
VS - 8 YTI- EC
VS1 -32 MR
3 456 7
X0 1 2
10
15 16
11121314
17
23
20
2122
RUN
ERR
PWR
3 456 7
Y0 1 2
10
13
1112
DC24 V
INPU T
Expansion Card
TRTRSGDD
48 5
RX TX
Socket
EC1
EC2
EC3
VI1VI2
3A V
10VOU T
10VVO0V
C0
8X YR
X0 1 2
Y0 1 2
Y0
Y1 Y 2
Simple Code at the DIO Card
Y0
Y1
Y2
Y3
Y4
Y5
Y6
EC 1Y1EC 1Y0E C1Y 2 EC1 Y3 E C 1Y4 E C1Y5 EC1 Y 6 EC1 Y 7
EC 2Y1EC 2Y0E C2Y 2 EC2 Y3 E C 2Y4 E C2Y5 EC2 Y 6 EC2 Y 7
EC 3Y1EC 3Y0E C3Y 2 EC3 Y3 E C 3Y4 E C3Y5 EC3 Y 6 EC3 Y 7
As shown on the left, a VS-8XYR-EC is installed in the
X3
X2X1X0S S
EC3 Expansion Card Socket.
Those X0~X3 on the VS-8XYR-EC are correspond to EC3X0~EC3X3
and Y0~Y3 are correspond to EC3Y0~EC3Y3.
3
3
EC3X0
X0
Y3
EC3Y0
Send the VS-8XYR-EC's X0 input status out via the
Y0
Y0 output point in the Main Unit.
Send the Main Unit's X0 input status out via the
Y0 output point in the VS-8XYR-EC.
Y7
62
Page 69
2-16-2 The Communication Expansion Card Related Components
At the VS1 series PLC, only one CP card can be installed at the EC1 socket. Since the VS1 series PLC has two
communication ports the built-in CP1 and the expandable CP2, thus the installed CP card is to provide the CP2.
At the VS2 or VSM series PLC, only one CP card can be installed at the EC1 socket. Also, the installed CP card is
available to provide the CP2 and CP3 if it is a dual port card. Therefore, the VS2 or VSM series PLC could have three
communication ports CP1~CP3.
At the VS3 series PLC, its EC1 can install a dual port card to provide the CP2 and CP3 and the EC3 can install a dual
port card to provide the CP4 and CP5. Thus the VS3 could have 5 communication ports CP1~CP5. However, if the
CP5 at a VS3 PLC is required, its EC2 socket may install a VS-3AV-EC card or not to use; any DIO or SF Card at EC2
will cause the CP5 at EC3 ineffective.
A communication port at CP card is not related to the working area of DIO expansion or SF card, to operate the port is
directly by the installed setting and program.
The special relays and registers related to the CP1: ( means read only)
Component ID No.
M9 100
M9 101
M9 102
M9 103
■
M9 104
D9 100
■
D9 101
■
D9 102
CP1 RS instruction data sending out request ag.
CP1 RS instruction data receive completed ag.
CP1 RS instruction data receive time-out ag.
CP1 RS / LINK / MBUS instruction on communication abnormal ag.
CP1 LINK / MBUS instruction on execution table complete once ag.
The CP1's station number.
The CP1's amount of residual data to be sent out by the instruction RS.
The CP1's amount of the data already received by the instruction RS.
Description
■
The special relays and registers related to the CP2: ( means read only)
Component ID No.
M9 110
M9 111
M9 112
M9 113
■
M9 114
D9 110
■
D9 111
■
D9 112
CP2 RS instruction data sending out request ag.
CP2 RS instruction data receive completed ag.
CP2 RS instruction data receive time-out ag.
CP2 RS / LINK / MBUS instruction on communication abnormal ag.
CP2 LINK / MBUS instruction on execution table complete once ag.
The CP2's station number.
The CP2's amount of residual data to be sent out by the instruction RS.
The CP2's amount of the data already received by the instruction RS.
The special relays and registers related to the CP3: ( means read only)
Component ID No.
M9 120
M9 121
M9 122
M9 123
■
M9 124
D9 120
■
D9 121
■
D9 122
CP3 RS instruction data sending out request ag.
CP3 RS instruction data receive completed ag.
CP3 RS instruction data receive time-out ag.
CP3 RS / LINK / MBUS instruction on communication abnormal ag.
CP3 LINK / MBUS instruction on execution table complete once ag.
The CP3's station number.
The CP3's amount of residual data to be sent out by the instruction RS.
The CP3's amount of the data already received by the instruction RS.
Description
Description
■
■
The special relays and registers related to the CP4: ( means read only)
Component ID No.
M9 130
M9 131
M9 132
M9 133
■
M9 134
D9 130
■
D9 131
■
D9 132
CP4 RS instruction data sending out request ag.
CP4 RS instruction data receive completed ag.
CP4 RS instruction data receive time-out ag.
CP4 RS / LINK / MBUS instruction on communication abnormal ag.
CP4 LINK / MBUS instruction on execution table complete once ag.
The CP4's station number.
The CP4's amount of residual data to be sent out by the instruction RS.
The CP4's amount of the data already received by the instruction RS.
Description
■
63
Page 70
The special relays and registers related to the CP5: ( means read only)
■
Component ID No.
M9 140
M9 141
M9 142
M9 143
■
M9 144
D9 140
■
D9 141
■
D9 142
Description
CP5 RS instruction data sending out request ag.
CP5 RS instruction data receive completed ag.
CP5 RS instruction data receive time-out ag.
CP5 RS / LINK / MBUS instruction on communication abnormal ag.
CP5 LINK / MBUS instruction on execution table complete once ag.
The CP5's station number.
The CP5's amount of residual data to be sent out by the instruction RS.
The CP5's amount of the data already received by the instruction RS.
64
Page 71
2-16-3 The Special Function Expansion Card Related Components
For convenience, every EC1~EC3 expansion card socket at a VS series PLC will possess 20 special registers that is the
working area of the installed expansion card. When a special card is installed in the socket, the PLC can access related
data for the respective device on the card through its working area.
For easy memorize and convenient application, every special register of each Special Expansion Card is given a
“Simple Code”. The “Simple Code” will be used in the following documents.
Expansion Card
Socket
EC1
EC2
EC3
Simple Code
EC1 D 0 〜 E C1D1 9
EC2 D 0 〜 E C2D1 9
EC3 D 0 〜 E C3D1 9
Expansion Card Working Area
Special Register
D92 6 0 〜 D927 9
D92 8 0 〜 D929 9
D93 0 0 〜 D931 9
The instruction diagram below will move the content value from the EC1D0 of special card to the register D100 of PLC.
(that card is installed at the EC1 socket)
M9000
MO V EC1D 0 D100
The register D100 of the PLC
The EC1D0 of the SF card that is installed at the EC1 socket
The instruction diagram below will move the content value from the register D0 of PLC to the EC2D5 of special card.
(that card is installed at the EC2 socket)
M9000
MO V D 0 EC2 D5
The EC2D5 of the SF card that is installed at the EC2 socket
The register D0 of the PLC
Special Register related to the VS-3AV-EC (For this card the Simple Code EC2Dn are useless)
The VS-3AV-EC can ONLY be installed at the EC2 expansion socket otherwise it is ineffective. Also, to access this
expansion card is through 3 specific special registers below that instead of expansion card working area.
■
Represents that component is read only.
Register ID No.
■
D9 030
■
D9 031
D9 032
The AD converted value of VI1 at the VS-3AV-EC, 0~10V = 0~4000
The AD converted value of VI2 at the VS-3AV-EC, 0~10V = 0~4000
The DA digital input value for the VO at the VS-3AV-EC, 0~1000 = 0~10V
Description
EC Card Register (Simple Code) related to the VS-4AD-EC
EC 1EC2
EC1D 0
EC1D 1
EC1D 2
EC1D 3
EC1D 4
EC1D 18
EC1D 19
EC2D 0
EC2D 1
EC2D 2
EC2D 3
EC2D 4
EC2D 18EC3D 18
EC2D 19EC3D 19
EC 3
EC3D 0
EC3D 1
EC3D 2
EC3D 3
EC3D 4
To assign the analog input modes of AI1~AI4.
Converted digital value of AI1, 0~4000 or 0~3200.
Converted digital value of AI2, 0~4000 or 0~3200.
Converted digital value of AI3, 0~4000 or 0~3200.
Converted digital value of AI4, 0~4000 or 0~3200.
Identication code: K101 (If code = K240, means connecting error between Main Unit and card)
The version number of this card. (the content value XX indicates Ver. X.X)
Component Description
To appoint the modes of analog inputs: (the sliding switch should also consistent with the modes)
b15
Nibble #4
Nibble #3
AI 4AI 3
To assign input modes:
Nibble #2 Nibble #1
AI 2AI1
b0
If the nibble = 0, the channel is assigned for (0~10V) voltage input.
If the nibble = 1, the channel is assigned for (4~20mA) current input.
If the nibble = 2, the channel is assigned for (0~20mA) current input.
If the nibble is any number other than 0, 1 or 2, the channel is disabled.
Example: If VS- 4AD- EC is installed in EC1, and EC1D0 is set to be H3210, then
AI1: voltage input (0~10V)AI2: current input (4~20mA)AI3: current input (0~20mA)AI4: disabled
65
Page 72
EC Card Register (Simple Code) Related to the VS-2DA-EC
EC 1EC2
EC1D 10
EC1D 11
EC1D 12
EC1D 18
EC1D 19
EC 3
EC2D 10
EC2D 11
EC2D 12
EC2D 18EC3D 18
EC2D 19EC3D 19
EC3D 10
EC3D 11
EC3D 12
To assign the analog output modes of AO1~AO2.
Digital set value for AO1, 0~4000 or 0~3200.
Digital set value for AO2, 0~4000 or 0~3200.
Identication code: K102 (If code = K240, means connecting error between Main Unit and card)
The version number of this card. (the content value XX indicates Ver. X.X)
Component Description
To appoint the modes of analog outputs:
b15b0
Nu ll
Nibble #3
Nu ll
Nibble #2 Nibble #1
AO2A O1
To assign
output modes:
Nibble #4
If the nibble = 0, the channel is assigned for (0~10V) voltage output.
If the nibble = 1, the channel is assigned for (4~20mA) current output.
If the nibble = 2, the channel is assigned for (0~20mA) current output.
If the nibble is any number other than 0, 1 or 2, the channel is disabled.
Example: If a VS-2DA-EC is installed at the EC1, and its EC1D10 is set to be H10, then
AO1: voltage output (0~10V) AO2: current output (4~20mA)
EC Card Register (Simple Code) related to the VS-4A-EC
EC 1EC2
EC1D 0
EC1D 1
EC1D 2
EC1D 10
EC1D 11
EC1D 12
EC1D 18
EC1D 19
EC 3
EC2D 0
EC2D 1
EC2D 2
EC2D 10
EC2D 11
EC2D 12
EC2D 18EC3D 18
EC2D 19EC3D 19
EC3D 0
EC3D 1
EC3D 2
EC3D 10
EC3D 11
EC3D 12
To assign the input modes of AI1~AI2.
Read value of AI1, 0~4000 or 0~3200.
Read value of AI2, 0~4000 or 0~3200.
To assign the output modes of AO1~AO2.
Write value of AO1, 0~4000 or 0~3200.
Write value of AO2, 0~4000 or 0~3200.
Identication code: K103 (If code = K240, means connecting error between Main Unit and card)
The version number of this card. (the content value XX indicates Ver. X.X)
Component Description
To appoint the modes of analog inputs: (the sliding switch should also consistent with the modes)
b15b0
Nu ll
Nibble #3
Nibble #2 Nibble #1
Nu ll
AI2AI1
To assign input modes:
Nibble #4
If the nibble = 0, the channel is assigned for (0~10V) voltage input.
If the nibble = 1, the channel is assigned for (4~20mA) current input.
If the nibble = 2, the channel is assigned for (0~20mA) current input.
If the nibble is any number other than 0, 1 or 2, the channel is disabled.
Example: If a VS-4A-EC is installed at the EC1, and its EC1D0 is set to be H10, then
AI1: voltage input (0~10V) AI2: current input (4~20mA)
To appoint the modes of analog inputs:
b15b0
Null
Nibble #3
Nibble #2 Nibble #1
Null
AO2A O1
To assign output modes:
Nibble #4
If the nibble = 0, the channel is assigned for (0~10V) voltage output.
If the nibble = 1, the channel is assigned for (4~20mA) current output.
If the nibble = 2, the channel is assigned for (0~20mA) current output.
If the nibble is any number other than 0, 1 or 2, the channel is disabled.
Example: If VS-4A-EC is installed in EC1, and EC1D10 is set to be H10, then
AO1: voltage output (0~10V) AO2: current output (4~20mA)
66
Page 73
EC Card Register (Simple Code) Related to the VS-3ISC-EC
EC 1EC2
EC1D0
EC1D1
EC1D2
EC1D3
EC1D4
EC1D5
EC1D6
EC1D7
EC1D8
EC1D18
EC1D19
EC2D0
EC2D1
EC2D2
EC2D3
EC2D4
EC2D5
EC2D6
EC2D7
EC2D8
EC2D18EC3D18
EC2D19EC3D19
EC 3
EC3D0
EC3D1
EC3D2
EC3D3
EC3D4
EC3D5
EC3D6
EC3D7
EC3D8
VO set value of CH1, 0~1000
VO set value of CH2 ,0~1000
VO set value of CH3 , 0~1000
V+ measured voltage value of CH1.
V+ measured voltage value of CH2.
V+ measured voltage value of CH3.
VO Max. of CH1.
VO Max. of CH2.
VO Max. of CH3.
Identication code: K104 (If code = K240, means connecting error between Main Unit and card)
The version number of this card. (the content value XX indicates Ver. X.X)
EC Card Register (Simple Code) Related to the VS-2TC-EC
EC 1EC2
EC1D0
EC1D1
EC1D2
EC1D3
EC1D6
EC1D7
EC1D17
EC1D18
EC1D19
EC2D0
EC2D1
EC2D2
EC2D3
EC2D6
EC2D7
EC2D17
EC2D18EC3D18
EC2D19EC3D19
EC 3
EC3D0
EC3D1
EC3D2
EC3D3
EC3D6
EC3D7
EC3D17
To assign the thermocouple types for TC1~TC2.
To assign the unit of temperature measurement. 0:℃; 1:℉; other values: ℃.
Converted temperature value of TC1, with unit as 0.1 ℃ or 0.1 ℉.
Converted temperature value of TC2, with unit as 0.1 ℃ or 0.1 ℉.
To set the average times of TC1
To set the average times of TC2
Status and error ag
Identication code: K105 (If code = K240, means connecting error between Main Unit and card)
The version number of this card. (the content value XX indicates Ver. X.X)
Component Description
The output ratio at the VO terminal that connect to the
analog speed control point of inverter.
This VO set value is the percentage of 0 to “VO Max.”
If the set value <0, the output ratio = 0 (0 %).
If the set value >1000, the output ratio= 1000 (100.0 %).
Measure the external control use power from inverter by a
voltage meter and ll in the result value here. If the result is
10V, then ll in 1000 (by unit of 0.01V). If the lled result is
not between 400 and 1200, then the VO point will output 0V.
Fill in the control input voltage of the maximum speed for
the inverter. If its effective range is 0~10V, then ll in 1000
(by unit of 0.01V). If the lled value is not in the range
between 0 to “V+ measured voltage”, then the VO point will
output 0V.
Component Description
Usable set value is 1~32767; other values =5.
Assign Thermocouple Type:
b15b0
Nibble #4
Nibble #3
Nu llNul l
Nibble #2 Nibble #1
TC2TC1
Value of Nibble
Thermocouple Type
0
1
J
KR
2
3 4
S
5
T E B
6
7
N
Example: If a VS-2TC-EC is installed at the EC1, and its EC1D0 is set to be H0010, then
TC1: K Type of thermocouple input, TC2: J Type thermocouple input.
Status and Error Flag:
b15~b5
b4
b3
b0
b1b2
TC1 disconnected or converted value exceeds the range
TC2 disconnected or converted value exceeds the range
The hardware error ag of this card
If Value of Nibble is not 0~7,
the channel is disabled.
67
Page 74
EC C ard Regi ster (Si mple Co d e) Rela ted to the V S -4TC-E C
EC 1EC2
EC1D0
EC1D1
EC1D2
EC1D3
EC1D4
EC1D5
EC1D6
EC1D7
EC1D8
EC1D9
EC1D17
EC1D18
EC1D19
EC2D0
EC2D1
EC2D2
EC2D3
EC2D4
EC2D5
EC2D6
EC2D7
EC2D8
EC2D9
EC2D17
EC2D18EC3D18
EC2D19EC3D19
EC 3
EC3D0
EC3D1
EC3D2
EC3D3
EC3D4
EC3D5
EC3D6
EC3D7
EC3D8
EC3D9
EC3D17
To assign the thermocouple types for TC1~TC4.
To assign the unit of temperature measurement. 0:℃; 1:℉; other values:℃.
Converted temperature value of TC1, with unit as 0.1 ℃ or 0.1 ℉.
Converted temperature value of TC2, with unit as 0.1 ℃ or 0.1 ℉.
Converted temperature value of TC3, with unit as 0.1 ℃ or 0.1 ℉.
Converted temperature value of TC4, with unit as 0.1 ℃ or 0.1 ℉.
To set the average times of TC1
To set the average times of TC2
To set the average times of TC3
To set the average times of TC4
Status and error ag
Identication code: K106 (If code = K240, means connecting error between Main Unit and card)
The version number of this card. (the content value XX indicates Ver. X.X)
Component Description
Usable set value is 1~32767; other values =5.
To appoint the types of thermocouples:
b15b0
Nibble #4
Nibble #3
TC4TC3
Nibble #2 Nibble #1
TC2TC1
Value of Nibble
Thermocouple Type
0
1
2
J
KR S T E B
5
3
4
6
7
If Value of Nibble is not 0~7,
the channel is disabled.
N
Example: If a VS-4TC-EC is installed at the EC1, and its EC1D0 is set to be H8100, then
TC1 & TC2: K Type of thermocouple input, TC3: J Type thermocouple input, TC4: disabled
Status and Error Flag:
b15~b5
b4
b3
b0
b1b2
The hardware error ag of this card
TC4 disconnected or converted
value exceeds the range
EC Card Register (Simple Code) Related to the VS-1PT-EC
EC 1EC2
EC1D0
EC1D1
EC1D2
EC1D6
EC1D17
EC1D18
EC1D19
EC2D0
EC2D1
EC2D2
EC2D6
EC2D17
EC2D18E C3 D18
EC2D19E C3 D19
Status and Error Flag:
EC 3
EC3D0
EC3D1
EC3D2
EC3D6
EC3D17
b15~b5
To select the frequency of power noise to be ltered out. 0: 60Hz, 1: 50Hz; other values: 60H.
Reduce the inuence of noise from power lines. Always set the value as 1 for 50Hz AC system.
To assign the unit of temperature measurement. 0: ℃;1:℉ ;other values: ℃ .
Converted temperature value of PT1, with unit as 0.1 ℃ or 0.1 ℉ .
To set the average times of PT1. Usable set value is 1~32767; other values = 1.
Status and error ag
Identication code: K107 (If code = K240, means connecting error between Main Unit and card)
The version number of this card. (the content value XX indicates Ver. X.X)
b4
b3
b0
b1b2
TC1 is disconnected or converted value exceeds the range
TC2 is disconnected or converted value exceeds the range
TC3 is disconnected or converted value exceeds the range
Component Description
TC1 is disconnected or converted value exceeds the range
The hardware error ag of this card
68
Page 75
EC Card Register (Simple Code) Related to the VS-2PT-EC
EC 1
EC1D0
EC1D1
EC1D2
EC1D3
EC1D6
EC1D7
EC1D17
EC1D18
EC1D19
EC 2
EC2D0
EC2D1
EC2D2
EC2D3
EC2D6
EC2D7
EC2D17
EC2D18EC3D18
EC2D19EC3D19
Status and Error Flag:
EC 3
EC3D0
EC3D1
EC3D2
EC3D3
EC3D6
EC3D7
EC3D17
b15~b5
Co m pon e nt De s crip tion
To select the frequency of power noise to be ltered out. 0: 60Hz, 1: 50Hz; other values: 60H.
Reduce the inuence of noise from power lines. Always set the value as 1 for 50Hz AC system.
To assign the unit of temperature measurement. 0: ℃ ; 1: ℉; other values: ℃ .
Converted temperature value of PT1, with unit as 0.1 ℃ or 0.1 ℉ .
Converted temperature value of PT2, with unit as 0.1 ℃ or 0.1 ℉ .
To set the average times of PT1.
To set the average times of PT2.
Status and error ag.
Identication code: K108 (If code = K240, means connecting error between Main Unit and card)
The version number of this card. (the content value XX indicates Ver. X.X)
b4
b3
b0
b1b2
Usable set value is 1~32767; other values = 1.
PT1 is disconnected or converted value exceeds the range
PT2 is disconnected or converted value exceeds the range
The hardware error ag of this card
69
Page 76
2-17 Specia l F unction Modu l e
The VS Series PLC offers various Special Function Models, such as analog input/output and temperature input. The
following is the list of selectable special models.
It em
Special
Function
Module
Mo del Na m e
-
VS 4AD
-
VS 2DA
-
VS 3A
-
VS 6A
-
VS 4TC
-
VS 8TC
-
VS 2PT
-
VS 4PT
Analog Input Module: 4 channel (16-bit) inputs, each channel could input either –10 ~ +10V, 4 ~ 20mA
or –20 ~ +20mA; isolated; with an accurate calibration DC 10V output
Analog Output Module: 2 channel (16-bit) outputs, each channel could output either –10 ~ 10V, 4 ~ 20mA or
–20 ~ +20mA; isolated
Analog I/O Module: 2 channel (16-bit) inputs + 1 channel (16-bit) output, each channel could input/output
either –10 ~ +10V, 4 ~ 20mA or –20 ~ +20mA; isolated; with an accurate calibration DC 10V output
Analog I/O Module: 4 channel (16-bit) inputs + 2 channel (16-bit) outputs, each channel could input/output
either –10 ~ +10V, 4 ~ 20mA or –20 ~ +20mA; isolated; with an accurate calibration DC 10V output
Thermocouple Temperature Input Module: 4 channel thermocouple (K, J, R, S, T, E, B or N type) inputs,
0.1℃ / 0.1℉ resolution ; isolated
Thermocouple Temperature Input Module: 8 channel thermocouple (K, J, R, S, T, E, B or N type) inputs,
All the Special and DIO Expansion Modules are serial connected on the right side of the Main Unit. The connecting
sequence is without reserve. The closest Special Module is designated as the 1 Special Module. Then on its right
side, the following Special Module is the 2 , and so on. But, the DIO Expansion Module or Power Module will not
nd.
Sp ecifi c ati o ns
st.
interfere to the ranking. Please pay attention to the power consumption, appropriately add the VS-PSD power repeater
module is required as the picture below if the power is insufcient.
VS2 -32 MT
3 456 7
X0 1 2
10
15 16
11121314
RUN
PWR
3 456 7
Y0 1 2
10
13
15 161714
1112
X0
S SX2X1X5X4X3X7
17
ERR
X6
INPUT X
X13X1 6
X10
X15
X14
X12X11
X17
X2X1X0S S
INPUT X
VS- 16X YT
3 456 7
1 2
X0
PWR
5
3 4
1 2
Y0
X6X5X4X3
X7
7
6
FG
AI AI AI AI AI A IFGAI AI
AI1 AI2
VS- 4AD
PWR
AI3
AI4
VS- PSD
PWR
FG
AI AI AI AI AI A IFGAI AI
AI1 AI2
VS- 6A
PWR
AI3
AI4
DC24V
INPUT
Y0
C0
C1
Y1 Y2Y3Y4
Y5 Y6
OUTPU T Y
Y7
10V OUT
DC24V
Y10
Y13
C2
Y11 Y12
Y15 Y1 6
C3
Y14
Y17
OUTPU T Y
Y0
Y3
Y6
C0
Y1 Y2
Y5
C1
Y7Y4
60mA
INPUT
10V 0V
st.
The 1
Special Module
DC24V
INPUT
The Power
Repeater Module
10V OUT
DC24V
60mA
10V 0V
V I VIIV
nd.
The 2
AO1
INPUT
Special Module
AO2
There are some Buffer Memories (BFM) built-in at every Special Function Module to store the related data.
The VS series Main Unit uses the FROM/TO instruction to read/write the data in the module's BFM thus can achieve the
purpose of data transfer across each other. The FROM instruction is used to read BFMs data from the designated
special module. The TO instruction is used to write data into the designated BFMs at the special module. For detailed
information about the FROM and TO instructions, please refer to the following pages.
Furthermore, can directly use the addressing operation to easily access the data in the special module's BFM.
Op eran d
XYMSKnX Kn Y Kn M KnSTCUnG
D. bR.b
De v ice
V,ZK,H
D, R
" $ "
E
S1
S2
D
Above is the example table of Operand devices for an instruction. The device type of UnG at the table is to indicate
the BFM at a Special Module could be used by the instruction directly. Thus, if the operand U1G3 is used in an
instruction, that means to access the data at the BFM #3 of the 1 Special Module.
st.
Since the Ladder Master S programming software can not get the real time status from a BFM of Special Module, it is
unavailable to monitor the data of operand at the UnG that is used in the instruction.
The program line below is to equally compare the data in the BFM #30 of the 1 Special Module with the constant
st.
value K201, and the comparison result is used to drive the coil of M0.
If the content value of U1G30 is equal to K201, the M0 will be turned ON. Due to the monitor mode of the Ladder
Master S that could not get the value from the U1G30, the in-line comparison symbol in the ladder diagram will not
show the ON result; but, the real output of the program line will not be affected by the display.
U1G30 K201
=
The program line below is to move the value H1100 into the BFM #0 of the 2 Special Module.
M0
nd.
M9000
MO V H 1100 U2G0
70
Page 77
2-17-1 Buffer Memory BFM in the VS-4AD Module
BFM No.
#0
#1
#2
#3
#4
#5
#6
#7
#8
#30
#31
To assign the analog input modes of AI1~AI4. When the power is turned from OFF to ON, the default value is H0000.
To set the average times of AI1.
To set the average times of AI2.
To set the average times of AI3.
To set the average times of AI4.
Converted digital value of AI1 (the average times is designated by BFM #1).
Converted digital value of AI2 (the average times is designated by BFM #2).
Converted digital value of AI3 (the average times is designated by BFM #3).
Converted digital value of AI4 (the average times is designated by BFM #4).
Identication code: VS-4AD = K201 (can use the FROM instruction to check whether the place is this module or not)
The version number of this module. (the content value XX indicates Ver. X.X)
When the power is turned from OFF to ON, the default value is 10.
The available range is 1~32,767, otherwise it is equivalent to 10.
Component Description
BFM#0 To appoint the modes of analog inputs: (the sliding switch should also consistent with the modes)
b15b0BFM# 0
Nibble #4
Nibble #3
Nibble #2 Nibble #1
To assign input modes
AI 2AI1AI 4AI 3
Value of
Nibble
0
1
2
3
4
Other
–10V~+10V voltage input
4mA~20mA current input
–20mA~+20mA current input
Disabled
Analog Input Mode
Converted digital value:–32000~+32000
Converted digital value:–10000~+10000
Converted digital value:0~+16000
Converted digital value:–16000~+16000
Converted digital value:–20000~+20000
Example: If the BFM #0 of a VS-4AD is set to be H5420, then
AI1: For –10V~+10V voltage input, that will be converted to the value –32,000~+32,000 at this mode.
AI2: For 4mA~20mA current input, that will be converted to the value 0~+16,000 at this mode.
AI3: For –20mA~+20mA current input, that will be converted to the value –20,000~+20,000 at this mode.
AI4: Disabled
71
Page 78
2-17-2Buffer Memory BFM in the VS-2DA Module
BFM No.
#20
#21
#22
#23
#30
#31
To assign the analog output modes of AO1~AO2. When the power is turned from OFF to ON, the default value is H00.
The digital set value of AO1.
The digital set value of AO2.
To assign the holding modes of AO1~AO2. When the power is turned from OFF to ON, the default value is H00.
Identication code: VS-2DA = K202 (can use the FROM instruction to check whether the place is this module or not)
The version number of this module. (the content value XX indicates Ver. X.X)
When the power is turned from OFF to ON, the default value is 0.
Component Description
BFM#20 To appoint the modes of analog outputs:
b15b0BFM# 20
Nibble #4
Nibble #3
Nibble #2 Nibble #1
Null
AO2A O1Null
To assign
output modes
Value of
Nibble
0
1
2
3
4
Other
Analog Output Mode
–10V~+10V voltage output
4mA~20mA current output
–20mA~+20mA current output
Disabled
Digital set value: –32000~+32000
Digital set value: –10000~+10000
Digital set value: 0~+32000
Digital set value: –32000~+32000
Digital set value: –20000~+20000
Example: If the BFM #20 of a VS-2DA is set to be H20, then
AO1: For –10V~+10V voltage output, that will use the digital set value –32,000~+32,000 at this mode.
AO2: For 4mA~20mA current output, that will use the digital set value 0~+32,000 at this mode.
BFM#23 To appoint the output holding mode: (for the PLC status turns from RUN to STOP)
b15b0
Nibble #4
BFM# 23
Nibble #3
NullNull
Nibble #2 Nibble #1
AO2A O1
If the value in the nibble = 0, the channel will keep the last output, even PLC
is STOP.
If the value in the nibble ≠ 0, the channel will change its digital set value = 0
at STOP.
72
Page 79
2-17-3 Buffer Memory BFM in the VS-3A Module
BFM No.
#0
#1
#2
#5
#6
#20
#21
#23
#30
#31
To assign the analog input modes of AI1~AI2. When the power is turned from OFF to ON, the default value is H00.
To set the average times of AI1.
To set the average times of AI2.
Converted digital value of AI1 (the average times is designated by BFM #1).
Converted digital value of AI2 (the average times is designated by BFM #2).
To assign the analog output mode of AO1. When the power is turned from OFF to ON, the default value is H0.
The digital set value of AO1.
To assign the holding mode of AO1. When the power is turned from OFF to ON, the default value is H0.
Identication code: VS-3A = K203 (can use the FROM instruction to check whether the place is this module or not)
The version number of this module. (the content value XX indicates Ver. X.X)
When the power is turned from OFF to ON, the default value is 10.
The available range is 1~32,767, otherwise it is equivalent to 10.
When the power is turned from OFF to ON, the default value is 0.
Component Description
BFM#0 To appoint the modes of analog inputs: (the sliding switch should also consistent with the modes)
b15b0
Nibble #4
Null
BFM# 0
Nibble #3
Null
Nibble #2 Nibble #1
AI 2AI1
To assign
input modes
Value of
Nibble
0
1
2
3
4
Other
–10V~+10V voltage input
4mA~20mA current input
–20mA~+20mA current input
Disabled
Analog Input Mode
Converted digital value:–32000~+32000
Converted digital value:–10000~+10000
Converted digital value:0~+16000
Converted digital value:–16000~+16000
Converted digital value:–20000~+20000
Example: If the BFM #0 of a VS-3A is set to be H20, then
AI1: For –10V~+10V voltage input, that will be converted to the value –32,000~+32,000 at this mode.
AI2: For 4mA~20mA current input, that will be converted to the value 0~+16,000 at this mode.
BFM#20 To appoint the mode of analog output:
b15
Nibble #4
BFM# 20
Nibble #3
Null
Nibble #2 Nibble #1
Null
b0
Value of
Nibble
AO1Null
0
1
2
3
4
Other
–10V~+10V voltage output
4mA~20mA current output
–20mA~+20mA current output
Disabled
Analog Output Mode
Digital set value: –32000~+32000
Digital set value: –10000~+10000
Digital set value: 0~+32000
Digital set value: –32000~+32000
Digital set value: –20000~+20000
Example: If the BFM #20 of a VS-3A is set to be H2, then
AO1: For 4mA~20mA current output, that will use the digital set value 0~+32,000 at this mode.
BFM#23 To appoint the output holding mode: (for the PLC status turns from RUN to STOP)
b15b0
Nibble #4
BFM# 23
Nibble #3
NullNull
Nibble #2 Nibble #1
Null
AO1
If the value in the nibble = 0, the channel will keep the last output, even PLC
is STOP.
If the value in the nibble ≠ 0, the channel will change its digital set value = 0
at STOP.
73
Page 80
2-17-4 Buffer Memory BFM in the VS-6A Module
BFM No.
#0
#1
#2
#3
#4
#5
#6
#7
#8
#20
#21
#21
#23
#30
#31
To assign the analog input modes of AI1~AI4. When the power is turned from OFF to ON, the default value is H0000.
To set the average times of AI1.
To set the average times of AI2.
To set the average times of AI3.
To set the average times of AI4.
Converted digital value of AI1 (the average times is designated by BFM #1).
Converted digital value of AI2 (the average times is designated by BFM #2).
Converted digital value of AI3 (the average times is designated by BFM #3).
Converted digital value of AI4 (the average times is designated by BFM #4).
To assign the analog output modes of AO1~AO2. When the power is turned from OFF to ON, the default value is H00.
The digital set value of AO1.
The digital set value of AO2.
To assign the holding modes of AO1~AO2. When the power is turned from OFF to ON, the default value is H00.
Identication code: VS-6A = K204 (can use the FROM instruction to check whether the place is this module or not)
The version number of this module. (the content value XX indicates Ver. X.X)
When the power is turned from OFF to ON, the default value is 10.
The available range is 1~32,767, otherwise it is equivalent to 10.
When the power is turned from OFF to ON, the default value is 0.
Component Description
BFM#0 To appoint the modes of analog inputs: (the sliding switch should also consistent with the modes)
b15b0BFM# 0
Nibble #4
Nibble #3
Nibble #2 Nibble #1
To assign input modes
AI 2AI1AI 4AI 3
Value of
Nibble
0
1
2
3
4
Other
–10V~+10V voltage input
4mA~20mA current input
–20mA~+20mA current input
Disabled
Analog Input Mode
Converted digital value:–32000~+32000
Converted digital value:–10000~+10000
Converted digital value:0~+16000
Converted digital value:–16000~+16000
Converted digital value:–20000~+20000
Example: If the BFM #0 of a VS-6A is set to be H5420, then
AI1: For –10V~+10V voltage input, that will be converted to the value –32,000~+32,000 at this mode.
AI2: For 4mA~20mA current input, that will be converted to the value 0~+16,000 at this mode.
AI3: For -20mA~+20mA current input, that will be converted to the value -32,000~+32,000 at this mode.
AI4: Disabled
BFM#20 To appoint the mode of analog output:
b15b0BFM# 20
Nibble #4
Nibble #3
Nibble #2 Nibble #1
Null
AO2A O1Null
To assign
output modes
Value of
Nibble
0
1
2
3
4
Other
Analog Output Mode
–10V~+10V voltage output
4mA~20mA current output
–20mA~+20mA current output
Disabled
Digital set value: –32000~+32000
Digital set value: –10000~+10000
Digital set value: 0~+32000
Digital set value: –32000~+32000
Digital set value: –20000~+20000
Example: If the BFM #20 of a VS-6A is set to be H20, then
AO1: For -10V~+10V voltage output, that will use the digital set value -32,000~+32,000 at this mode.
AO2: For 4mA~20mA current output, that will use the digital set value 0~+32,000 at this mode.
BFM#23 To appoint the output holding mode: (for the PLC status turns from RUN to STOP)
b15b0
Nibble #4
BFM# 23
Nibble #3
NullNull
Nibble #2 Nibble #1
AO2
AO1
If the value in the nibble = 0, the channel will keep the last output, even PLC
is STOP.
If the value in the nibble ≠ 0, the channel will change its digital set value = 0
at STOP.
74
Page 81
2-17-5Buffer Memory BFM in the VS-4TC Module
BFM No.
#0
#2
#3
#4
#5
#6
#11
#12
#13
#14
#29
#30
#31
To assign the thermocouple types for TC1~TC4. When the power is turned from OFF to ON, the default value is H0000.
To assign the scale of temperature measurement. 0: ℃ ; 1: ℉; other values: ℃ . When the power is turned from OFF to
ON, the default value is 0.
To set the average times of TC1.
To set the average times of TC2.
To set the average times of TC3.
To set the average times of TC4.
Converted temperature value of TC1, with unit as 0.1 ℃ or 0.1 ℉ .
Converted temperature value of TC2, with unit as 0.1 ℃ or 0.1 ℉ .
Converted temperature value of TC3, with unit as 0.1 ℃ or 0.1 ℉ .
Converted temperature value of TC4, with unit as 0.1 ℃ or 0.1 ℉ .
Status and error ag.
Identication code: VS-4TC = K205 (can use the FROM instruction to check whether the place is this module or not)
The version number of this module. (the content value XX indicates Ver. X.X)
When the power is turned from OFF to ON, the default value is 1.
The available range is 1~32,767, otherwise it is equivalent to 1.
Component Description
BFM #0 To appoint the types of thermocouples:
b15b0
Nibble #4
TC4TC3
BFM#0
Nibble #3
Nibble #2 Nibble #1
TC2TC1
Value of Nibble
Thermocouple Type
0
KR S T E B
Example: If the BFM #0 of a VS-4TC is set to be H8100, then
TC1 & TC2: K Type thermocouple input;
TC3: J Type thermocouple input; TC4: disabled.
5
3
1
2
J
6
4
7
If Value of Nibble is not 0~7,
the channel is disabled.
N
BFM #29 Status and Error Flag: (0: normal; 1: error)
b15
Module's external
DC 24V supply is
missing or has a
hardware error
b3b14~b4
b0
b1b2
TC1 is disconnected or converted value exceeds the range
TC2 is disconnected or converted value exceeds the range
TC3 is disconnected or converted value exceeds the range
TC4 is disconnected or converted value exceeds the range
75
Page 82
2-17-6 Buffer Memory BFM in the VS-8TC Module
BFM No.
#0
#1
#2
#3
#4
#5
#6
#7
#8
#9
#10
#11
#12
#13
#14
#15
#16
#17
#18
#29
#30
#31
Component Description
To assign the thermocouple types for TC1~TC4. When the power is turned from OFF to ON, the default value is H0000.
To assign the thermocouple types of TC5~TC8. When the power is turned from OFF to ON, the default value is H0000.
To assign the scale of temperature measurement. 0: ℃ ; 1: ℉; other values: ℃ . When the power is turned from OFF to
ON, the default value is 0.
To set the average times of TC1.
To set the average times of TC2.
To set the average times of TC3.
To set the average times of TC4.
To set the average times of TC5.
To set the average times of TC6.
To set the average times of TC7.
To set the average times of TC8.
Converted temperature value of TC1, with unit as 0.1 ℃ or 0.1 ℉ .
Converted temperature value of TC2, with unit as 0.1 ℃ or 0.1 ℉ .
Converted temperature value of TC3, with unit as 0.1 ℃ or 0.1 ℉ .
Converted temperature value of TC4, with unit as 0.1 ℃ or 0.1 ℉ .
Converted temperature value of TC5, with unit as 0.1 ℃ or 0.1 ℉ .
Converted temperature value of TC6, with unit as 0.1 ℃ or 0.1 ℉ .
Converted temperature value of TC7, with unit as 0.1 ℃ or 0.1 ℉ .
Converted temperature value of TC8, with unit as 0.1 ℃ or 0.1 ℉ .
Status and error ag.
Identication code: VS-8TC = K206 (can use the FROM instruction to check whether the place is this module or not)
The version number of this module. (the content value XX indicates Ver. X.X)
When the power is turned from OFF to ON, the default value is 1.
The available range is 1~32,767, otherwise it is equivalent to 1.
BFM #0 & BFM #1 To appoint the types of thermocouples:
b15b0
Nibble #4
b15b0
Nibble #4
BFM#0
Nibble #3
BFM#1
Nibble #3
Nibble #2 Nibble #1
TC2TC1TC4TC3
Nibble #2 Nibble #1
TC6TC5TC8TC7
Value of Nibble
Thermocouple Type
0
KR S T E B7N
Example: If the BFM #0 of a VS-8TC is set to be H8100, then
TC1 & TC2: K Type thermocouple input;
TC3: J Type thermocouple input; TC4: disabled.
BFM #29 Status and Error Flag: (0: normal; 1: error)
b6b3
b7b 4
Module's external
DC 24V supply is
missing or has a
hardware error
TC8 is disconnected or
converted value exceeds the range
TC7 is disconnected or
converted value exceeds the range
TC6 is disconnected or
converted value exceeds the range
b5b14~b8b15
5
3
1
2
J
b0
b1b2
6
4
If Value of Nibble is not 0~7,
the channel is disabled.
TC1 is disconnected or converted value
exceeds the range
TC2 is disconnected or converted value
exceeds the range
TC3 is disconnected or converted value
exceeds the range
TC4 is disconnected or converted value
exceeds the range
TC5 is disconnected or converted value
exceeds the range
76
Page 83
2-17-7 Buffer Memory BFM in the VS-2PT Module
BFM No.
#2
#3
#4
#11
#12
#29
#30
#31
To assign the scale of temperature measurement. 0: ℃ ; 1: ℉; other values: ℃ . When the power is turned from OFF to
ON, the default value is 0.
To set the average times of PT1.
To set the average times of PT2.
Converted temperature value of PT1, with unit as 0.1 ℃ or 0.1 ℉ .
Converted temperature value of PT2, with unit as 0.1 ℃ or 0.1 ℉ .
Status and error ag.
Identication code: VS-2PT = K207 (can use the FROM instruction to check whether the place is this module or not)
The version number of this module. (the content value XX indicates Ver. X.X)
When the power is turned from OFF to ON, the default value is 1.
The available range is 1~32,767, otherwise it is equivalent to 1.
BFM #29 Status and Error Flag: (0: normal; 1: error)
b14~b2b15
Module's external
DC 24V supply is
missing or has a
hardware error
Component Description
b0
b1
PT1 is disconnected or converted value
exceeds the range
PT2 is disconnected or converted value
exceeds the range
77
Page 84
2-17-8 Buffer Memory BFM in the VS-4PT Module
BFM No.
#2
#3
#4
#5
#6
#11
#12
#13
#14
#29
#30
#31
To assign the scale of temperature measurement. 0: ℃ ; 1: ℉ ; other values: ℃ . When the power is turned from OFF to
ON, the default value is 0.
To set the average times of PT1.
To set the average times of PT2.
To set the average times of PT3.
To set the average times of PT4.
Converted temperature value of PT1, with unit as 0.1 ℃ or 0.1 ℉ .
Converted temperature value of PT2, with unit as 0.1 ℃ or 0.1 ℉ .
Converted temperature value of PT3, with unit as 0.1 ℃ or 0.1 ℉ .
Converted temperature value of PT4, with unit as 0.1 ℃ or 0.1 ℉ .
Status and error ag.
Identication code: VS-4PT = K208 (can use the FROM instruction to check whether the place is this module or not)
The version number of this module. (the content value XX indicates Ver. X.X)
When the power is turned from OFF to ON, the default value is 1.
The available range is 1~32,767, otherwise it is equivalent to 1.
BFM #29 Status and Error Flag: (0: normal; 1: error)
Module's external DC 24V
supply is missing or has a
hardware error
PT4 is disconnected or converted value
exceeds the range
Component Description
b3b14~b4b15
b1b2
b0
PT1 is disconnected or converted value
exceeds the range
PT2 is disconnected or converted value
exceeds the range
PT3 is disconnected or converted value
exceeds the range
78
Page 85
3. Basi c In structi on
3-1 Basic Ins t ruction Table
Mn emon i c F orma tDe v ice s Fu ncti o n
LD
(LOAD)
LDI
(LOAD INVERSE)
LDP
(LOAD PULSE)
LDF
(LOAD FALLING PULSE)
AND
(AND)
ANI
(AND INVERSE)
ANDP
(AND PULSE)
ANDF
(AND FALLING PULSE)
X, Y, M, S, T, C, D.b, R.b
X, Y, M, S, T, C, D.b, R.b
X, Y, M, S, T, C, D.b, R.b
X, Y, M, S, T, C, D.b, R.b
X, Y, M, S, T, C, D.b, R.b
X, Y, M, S, T, C, D.b, R.b
X, Y, M, S, T, C, D.b, R.b
X, Y, M, S, T, C, D.b, R.b
Initial logical operation contact type NO
(Normally Open)
Initial logical operation contact type NC
(Normally closed)
Initial logical operation Rising edge pulse
Initial logical operation Falling edge pulse
Serial connection of NO
(Normally Open) contact
Serial connection of NC
(Normally Closed) contact
Serial connection of Rising edge pulse
Serial connection of Falling edge pulse
OR
(OR)
ORI
(OR I NVERSE)
ORP
(OR PULSE)
ORF
(OR FALLING PULSE)
ANB
(AND BLOCK)
ORB
(OR BLOCK)
MPS
(POINT STORE)
MRD
(POINT READ)
MPP
(POINT POP)
INV
(INVERSE)
MEP
MEF
OUT
(OUT)
SET
(SET)
RST
(RESET)
PLS
(PULSE)
PLF
(PULSE FALLING)
MPS
MRD
MPP
SET
RST
PLS
PLF
Y0
Y0
Y0
Y0
Y0
X, Y, M, S, T, C, D.b, R.b
X, Y, M, S, T, C, D.b, R.b
X, Y, M, S, T, C, D.b, R.b
X, Y, M, S, T, C, D.b, R.b
Y, M, S, T, C, D.b, R.b
Y, M, S, D.b, R.b
Y, M, S, D.b, R.b, T, C, D, R, V, Z
Y, M(Except for sp eci al M)
Y, M(Except for sp eci al M)
Parallel connection of NO
(Normally Open) contact
Parallel connection of NC
(Normally Closed) contact
Parallel connection of Rising edge pulse
Parallel connection of Falling edge pulse
Series connection of multiple parallel
circuit blocks
Parallel connection of multiple contact
circuit blocks
Store the current result of the internal
PLC operation
Read the current result of the internal
PLC operation
Pop (recall and remove) the currently
stored result
Invert the current result of the internal
PLC operation
Conversion of operation result to
Rising edge pulse
Conversion of operation result to
Falling edge pulse
Final logical operation type coil drive
Set component permanently ON
Reset component permanently OFF
Rising edge pulse
Falling edge pulse
79
Page 86
Mn emon i c De v ice s Fu ncti o n
MC
(MASTER CONTROL)
MCR
(MC RESET)
END
(END)
NOP
(NO OPERATION)
Fo rmat
MC N0
MCR N0
END
N0 〜 N7
N0 〜 N7
Denote the start of a master control block
Denote the end of a master control block
Force the current program scan to end
No operation or null step
The related device table for the basic instruction
Instru-
ction
LD
LDI
LDP
LDF
AND
ANI
ANDP
ANDF
OR
ORI
ORP
ORF
OUT
SET
RST
PLS
PLF
XYMS MT
S
De v ice s
16 -bit
C
32 -bit
C
D. b
R. b
DR
V,Z
Means it cannot use the V, Z Index Register to modify Means it could use the V, Z Index Register to modify
To establish the set value of OUT T or OUT C instruction can use the K, D or R, also which can use the Index Register V, Z to
modify.
The basic instructions of the VS series PLC provide the “Bitwise Operation” and the “Bit Index” function. That greatly improving
the convenience of programming, but also greatly enhances the overall performance.
Since a register has 16 bits and they are allocated to
0~F (b0~b15) respectively, the “Bitwise Operation”
function is to treat the individual bit in a register
D or R as a bit component to process, as shown in
the example below:
D0's b3 R1's b5D0's b15
R1.5D0.3
D0.F
D0.F
The left diagram shows
the self-holding circuit
about the b15 of D0.
That starts from the b3
of D0 and may release
D0's b15
by the b5 of R1, then
gets a new output to
The “Bit Index” function is to let the bit operand in the basic
instruction has V, Z modifiable capability, as shown in the
example below:
X0Z0X1Z0
Y0Z0
Y0Z0
When the contents of the Z0
is 0, the self-holding circuit
starts from the X0 and may
release by the X1, then gets
a new output to the Y0.
When the contents of the Z0
is 5, the self-holding circuit
starts from the X5 and may
release by the X6, then gets
a new output to the Y5.
the b15 of D0.
80
Page 87
3-2 The LD, LDI , AND, ANI, OR, ORI, I N V, OUT a n d END Instruct ions
Mn emon i c De v ice s Fu ncti o n
LD
(LOAD)
LDI
(LOAD INVERSE)
AND
(AND)
ANI
(AND INVERSE)
OR
(OR)
ORI
(OR I NVERSE)
INV
(INVERSE)
OUT
(OUT)
END
(END)
Ladder Diagram
Fo rmat
Y0
END
Instruction List
X, Y, M, S, T, C, D.b, R.b
X, Y, M, S, T, C, D.b, R.b
X, Y, M, S, T, C, D.b, R.b
X, Y, M, S, T, C, D.b, R.b
X, Y, M, S, T, C, D.b, R.b
X, Y, M, S, T, C, D.b, R.b
Y, M, S, T, C, D.b, R.b
Initial logical operation contact type NO
(Normally Open)
Initial logical operation contact type NC
(Normally closed)
Serial connection of NO
(Normally Open) contact
Serial connection of NC
(Normally Closed) contact
Parallel connection of NO
(Normally Open) contact
Parallel connection of NC
(Normally Closed) contact
Invert the current result of the internal
PLC operation
Final logical operation type coil drive
Force the current program scan to end
X20X21
Y20
X22
X23
Y21
X24
Y20
Y21
Y22
EN D
LDX2 0
ORY20
AN D
OU TY 20
LD I
OR I
AN IX2 3
OU T
LD
IN V
OU T
EN D
X2 1
X2 2
Y2 1
Y2 1
X2 4
Y2 2
Initial logical operation contact type NO (Normally Open)
Parallel connection of NO (Normally Open) contact
Serial connection of NO (Normally Open) contact
Final logical operation type coil drive
Initial logical operation contact type NC (Normally Closed)
Parallel connection of NC (Normally Closed) contact
Serial connection of NC (Normally Closed) contact
Final logical operation type coil drive
Initial logical operation contact type NO (Normally Open)
Invert the current result of the internal PLC operation
Final logical operation type coil drive
Force the current program scan to end
The OUT instruction for the coil of T or C will have an explicit explanation in the Section 3-9.
When the PLC executes the END instruction, that will force to terminate the current scan and process both output and
input component updates. All instructions in the program and subroutines after the END instruction will not be executed.
The END instruction can be inserted into the middle of the program, it can be used to do the programming debug.
The section after the END instruction is disabled and isolated from the whole program.
81
Page 88
3-3 The LDP, LDF, AND P, ANDF, ORP, OPF, ME P an d M EF Instructi o ns
Y0
Y1
Y2
Y3
Fo rmat
Instruction List
LD PX0
OR P
AN DP
OU T
LD F
OR F
AN DF
OU T
LD
ME P
OU T
LDX7
ME F
OU T
X1
X2
Y0
X3
X4
X5
Y1
X6
Y2
Y3
X, Y, M, S, T, C, D.b, R.b
X, Y, M, S, T, C, D.b, R.b
X, Y, M, S, T, C, D.b, R.b
X, Y, M, S, T, C, D.b, R.b
X, Y, M, S, T, C, D.b, R.b
X, Y, M, S, T, C, D.b, R.b
Initial logical operation Rising edge pulse
Initial logical operation Falling edge pulse
Serial connection of Rising edge pulse
Serial connection of Falling edge pulse
Parallel connection of Rising edge pulse
Parallel connection of Falling edge pulse
Conversion of operation result to
Rising edge pulse
Conversion of operation result to
Falling edge pulse
Initial logical operation Rising edge pulse contact
Parallel connection of Rising edge pulse contact
Serial connection of Rising edge pulse contact
Final logical operation type coil drive
Initial logical operation Falling edge pulse contact
Parallel connection of Falling edge pulse contact
Serial connection of Falling edge pulse contact
Final logical operation type coil drive
Initial logical operation contact type NO (Normally Open)
Conversion of operation result to Rising edge pulse contact
Final logical operation type coil drive
Initial logical operation contact type NO (Normally Open)
Conversion of operation result to Rising edge pulse contact
Final logical operation type coil drive
Mn emon i c De v ice s Fu ncti o n
LDP
(LOAD PULSE)
LDF
(LOAD FALLING PULSE)
ANDP
(AND PULSE)
ANDF
(AND FALLING PULSE)
ORP
(OR PULSE)
ORF
(OR FALLING PULSE)
MEP
MEF
Ladder Diagram
X0X2
X1
X3
X4
X6
X7
X5
The right gure takes the bit device M0 as an example
to illustrate the relationship between the initial logical
operation contact type NO, NC, the Raising and Falling
edge pulse contacts.
The Rising edge contact will be active at the program
for one Scan Time when the associated device status
changes from “OFF” to “ON”.
The Falling edge contact will be active at the program
for one Scan Time when the associated device status
changes from “ON” to “OFF”.
The state of M0
The A type NO contact of M0
The B type NC contact of M0
The Raising edge pulse of M0
The Falling edge pulse of M0
One Scan TimeOne Scan Time
82
Page 89
3-4 The AN B and ORB Instr u ctions
Mn emon i c De v ice s Fu ncti o n Fo rmat
ANB
(AND BLOCK)
ORB
(OR BLOCK)
Ladder DiagramInstruction List
X0X2
X1X3
X4
X5
X6X7
Y0
M0
LDX0
OR
LD
OR
AN B
OU T
LD
AN D
LD
AN D
OR B
OU T
X1
X2
X3
X4
X5
X6
X7
Y0
M0
Series connection of multiple
parallel circuit blocks
Parallel connection of multiple
contact circuit blocks
Initial logical operation contact type NO (Normally Open)
Parallel connection of NO (Normally Open) contact
Initial (the starting point of another circuit block) logical
operation contact type NO (Normally Open)
Parallel connection of NO (Normally Open) contact
Series connection of multiple parallel circuit blocks
Final logical operation type coil drive
Initial logical operation contact type NO (Normally Open)
Serial connection of NO (Normally Open) contact
Initial (the starting point of another circuit block) logical
operation contact type NO (Normally Open)
Serial connection of NO (Normally Open) contact
Parallel connection of multiple contact circuit blocks
Final logical operation type coil drive
To declare the starting points of the circuit block, please use an LD, LDI, LDP or LDF instruction. After completing the
serial circuit block, to connect it to the preceding block by series/parallel connection should use the ANB/ORB instruction.
No more than 8 of the ANB and ORB instructions in a batch circuit.
Please refer to the following program example, it is used both the ANB and ORB instructions in a circuit block.
Ladder Diagram
X20X22X23
Y0
X21X24X25
X26
X27
Instruction List
LD
OR I
LD
AN D
LD I
AN I
OR B
OR
AN B
OR
OU T
X2 0
X2 1
X2 2
X2 3
X2 4
X2 5
X2 6
X2 7
Y0
83
Page 90
3-5 The MPS, MR D a nd MPP Instructio n s
Mn emon i c De v ice s Fu ncti o n Fo rmat
MPS
(POINT STORE)
MRD
(POINT READ)
MPP
(POINT POP)
MPS
MRD
MPP
Store the current result of the internal
PLC operation
Read the current result of the internal
PLC operation
Pop (recall and remove) the currently
stored result
Ladder Diagram
X0
MPS
MRD
X1
X2
X3
MPP
Y20
Y21
Y22
Instruction List
LD
MP S
AN D
OU T
MR D
AN D
OU T
MP P
AN D
OU T
X0
X1
Y2 0
X2
Y2 1
X3
Y2 2
Initial logical operation contact type NO (Normally Open)
Store the current result of the internal PLC operation
Serial connection of NO (Normally Open) contact
Final logical operation type coil drive
Read the current result of the internal PLC operation
Serial connection of NO (Normally Open) contact
Final logical operation type coil drive
Pop (recall and remove) the currently stored result
Serial connection of NO (Normally Open) contact
Final logical operation type coil drive
The MPS instruction stores the state of a connection point of the ladder circuit so that further coil branched can recall the
value later.
The MRD instruction recalls or reads the previously stored connection point data and forces the next contact to connect to
it.
The MPP instruction pops (recalls and removes) the stored connection point data of the last array and removes the
connection point from the result. The last contact or coil circuit must connect to an MPP instruction.
In any continuous connection circuit block, the difference between the number of the active MPS instruction and the
number of the active MPP instruction shall be no greater than 11; when all connection circuit blocks are ended, the total
number of the MPS instruction and the total number of the MPP instruction have been used in the program must be the
same (there must has a MPP instruction corresponding to every signal MPS instruction).
The following diagram shows the program example block with three connections:
Ladder Diagram
X20
MPS
X21
MPS
MPP
X24
MPP
MPS
MPP
X22
Y20
X23
Y21
X25
Y22
X26
Y23
Instruction List
LD
MP S
AN D
MP S
AN D
OU T
MP P
AN D
OU T
MP P
AN D
MP S
AN D
OU T
MP P
AN D
OU T
X2 0
X2 1
X2 2
Y2 0
X2 3
Y2 1
X2 4
X2 5
Y2 2
X2 6
Y2 3
84
Page 91
3-6 The MC and MC R I nstruction s
Mn emon i c De v ice s Fu ncti o n Fo rmat
MC
(MASTER CONTROL)
MCR
(MC RESET)
MC N0
MCR N0
N0 〜 N7
N0 〜 N7
Denote the start of a master control block
Denote the end of a master control block
Ladder Diagram
X0
MC N0
X1
Y20
M10
Y21
MCR N0
Instruction List
LDX 0
MC
LD
OU T
LD
OU T
MC R
N0
X1
Y2 0
M1 0
Y2 1
N0
The X0 is the condition contact
Become a master control block which is controlled by the
X0.
If X0=ON then
If X0=OFF then
Status of Y20 = Status of X1
Status of Y21 = Status of M10
Y20=OFF
Y21=OFF
When the condition contact X0 is “ON”, all instructions between the MC and MCR instructions will be executed normally.
When the condition contact X0 is “OFF”, all instructions between the paired MC and MCR instructions will NOT be
executed, also all ordinary Timers and the coils which is driven by the OUT instruction will be reset; but the Retentive
Timers, Counters and the status of coils which is driven by the SET / RST instruction will be kept.
Use the MC instruction to shift the bus line (the Initial logical operation) to a point behind the conditional contact and then
use the paired MCR instruction to return to the original bus line.
A master control block allows to contain another master control block inside, which is to form a nest level. This structure
at the most can have 8 levels N0~N7. The top nest level shall be the N0, and followed by N1, N2..., so the most inner level
shall be the N7.
A program example with a multiple nest levels structure is shown below:
Ladder Diagram
X0
X20
X1
X21
X2
X22
X3
X23
X24
X25
X26
MC N0
Y20
MC N1
Y21
MC N2
Y22
MC N3
Y23
MCR N3
Y24
MCR N2
Y25
MCR N1
Y26
th
4 levelrd3 levelnd2 level
st
1 level
MCR N0
85
Page 92
3-7 The SET and RS T Instructio n s
Mn emon i c De v ice s Fu ncti o n Fo rmat
SET
(SET)
RST
(RESET)
SET
RST
Y0
Y0
Y, M, S, D.b, R.b
Y, M, S, D.b, R.b, T, C, D, R, V, Z
Set component permanently ON
Reset component permanently OFF
Ladder Diagram
X0
X0
X1
Y20
SE T
RS T
Y2 1
Y2 1
Instruction List
LD
OU T
LD
SE T
LD
RS T
X0
Y2 0
X0
Y2 1
X1
Y2 1
Active I/O duration time sheet
X 0
X 1
Y 20
Y 21
The SET instruction sets the output coil permanently “ON” when it has been operated.
The RESET instruction resets the output coil permanently “OFF” or resets the current value of a Timer, Counter or Register
to zero.
The SET instruction and the RESET instruction can use the same output coil, and the number of times is unlimited.
The RST instruction for the device C will have an explicit explanation in the Section 3-9.
3-8 The PLS and PL F Instructio n s
Mn emon i c De v ice s Fu ncti o n Fo rmat
PLS
(PULSE)
PLF
(PULSE FALLING)
PLS
PLF
Y0
Y0
Y, M (Except the Spe cia l M)
Y, M (Except the Spe cia l M)
Rising edge pulse
Falling edge pulse
Ladder Diagram
X0
X0
PL S
PL F
M0
M1
Instruction List
LD
PL S
LD
PL F
X0
M0
X0
M1
When X0=OFF → ON, the M0 will output a pulse for one Scan Time.
When X0=ON → OFF, the M1 will output a pulse for one Scan Time.
Active I/O duration time sheet
X 0
M 0
M 1
One Scan TimeOne Scan Time
86
Page 93
3-9 T he OUT a nd RS T Ins tru c tio ns fo r the Ti mer or C oun ter
If the OUT instruction is used for the coil of the component T or C, input a Set Value is required.
Timer
Ladder Diagram
X0
T0
K20
T0
Y20
Instruction List
LD
OU T
LD
OU T
X0
T0
K2 0
T0
Y2 0
Active I/O duration time sheet
X0
T0 coil
T0 contact
Y20
2 sec
The Set Value of a Timer can be set by either using a K (Constant) or a Data Register D, R (Parameter).
The available range of the Set Value:
Timer ID N o.
T0~T199
T200~T245
T256~T511
T246~T249
T250~T255
Timing U nit
100ms
10ms
1ms
1ms
100ms
Type of Timer
General Timer
(non-retentive)
Retentive Timer
Ava ilabl e Ran ge
1~32,767
(The Set Value beyond this
range will be defaulted to 0)
※
Real S ett in g Time
0.1~3276.7 sec.
0.01~327.67 sec.
0.001~32.767 sec.
0.001~32.767 sec.
0.1~3276.7 sec.
To reset the contact or Present Value of a Retentive Timer T246~T255, must use the RST instruction.
※ If the timer's Set Value is 0, its contact will become activated at the next scan time after its coil is triggered.
Counter
Ladder Diagram
X0
C0
X1
K5
C0
Y20
C0RS T
Instruction List
LD
OU T
LD
OU T
LD
RS T
X0
C0
K5
C0
Y2 0
X1
C0
Action Description
When the X0 is turned from “OFF” to “ON”,
the C0 executes up count once, until the
Present Value of the C0 is equal to 5 that will
turn its output contact to “ON”, where the
Present Value will not increase anymore and
its contact will stay permanently “ON”.
When X1= “ON”, the Present Value of C0 will
be reset to “0” and the contact of C0 will
become “OFF”.
The Set Value of a Counter can be set by either using a K (Constant) or a Data Register D, R (Parameter).
The available range of the Set Value:
Counter ID No.
C0 ~C99
C1 00~C1 99
C2 00~C2 19
C2 20~C2 34
C2 35~C2 55
Type of the Counter
General
Latched
General
Latched
Software High Speed Counter
(Latched)
16-bit
Up count
32-bit
Up/Down count
(The Set Value beyond this range will be defaulted to 1)
Available Range
1~32,767
–2,147,483,648~2,147,483,647
When using High Speed Counters, please refer to the section 2-7 High Speed Counter.
87
Page 94
3-10 Signif i cant Notes for P r ogramming
3-10-1 Convert the Ladder Diagram to the Instruction List
The rule to convert a program from the Ladder Diagram to the Instruction List format should follow the sequence that
from left to right and from top to bottom.
X0X1X5X6X21
X2X3X7X20
X4
X22
Y20
Y21
L D
A N I
L D
A N D
O R B
O R
L D I
A N D
L D
A N D
O R B
A N B
A N I
O U T
A N D
O U T
X0
X1
X2
X3
X4
X5
X6
X7
X2 0
X2 1
Y2 0
X2 2
Y2 1
Serial connection Block
Serial connection Block
Parallel connection circuit blocks
Parallel connection of NO contact
Serial connection Block
Serial connection Block
Parallel connection circuit blocks
Serial connection of multiple parallel blocks
Serial connection of NC contact
Output
Serial connection of NO contact
Output
88
Page 95
3-10-2 Programming Techniques
1. Put a section which with longer serial connections of contacts at the upper place of a Parallel Connection Circuit
Blocks. This way will make the programming simpler and easier.
Ladder Diagram
X0
Y0
X1X0
X2
Instruction List
LD
LD
AN D
OR B
OU T
X0
X1
X2
Y0
Ladder Diagram
X2X1
Y0
Instruction List
LD
AN D
OR
OU T
X1
X2
X0
Y0
2. It is recommended to place a circuit with more parallel connection of contacts on the left side.
Ladder Diagram
X0
X1
X2
Y0
Instruction List
LD
LD
OR
AN B
OU T
X0
X1
X2
Y0
Ladder Diagram
X1
X0
X2
Y0
Instruction List
LD
OR
AN D
OU T
X1
X2
X0
Y0
3. Although it is not an incorrect syntax to repetitively use an output coil ID number or Double Coil, the last output
operation is the real effective coil. Therefore, the structure of conditional signal contacts should be modified or the
output coils of the same ID number should be avoided.
Ladder Diagram
Instruction List
Ladder Diagram
Instruction List
X0
X20
X22
X1
˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙
X21
Y0
Y0
LD
AN D
OU T
LD
OR
AN I
OU T
X0
X1
Y0
˙˙˙˙˙˙˙˙˙˙˙
X2 0
X2 2
X2 1
Y0
X0
X20
X22
or
X0
˙˙˙˙˙˙˙˙˙˙
X20
X22
˙˙˙˙˙˙˙˙˙˙
M0
M1
X1
X21
X1
X21
Y0
M0
M1
Y0
LD
AN D
LD
OR
AN I
OR B
OU T
LD
AN D
OU T
LD
OR
AN I
OU T
LD
OR
OU T
X0
X1
X2 0
X2 2
X2 1
Y0
X0
X1
M0
˙˙˙˙˙˙˙
X2 0
X2 2
X2 1
M1
˙˙˙˙˙˙˙
M0
M1
Y0
89
Page 96
90
Page 97
4. Sequ en tial Functio n Ch ar t (SFC) and S te p La dder (STL )
In the universe of Automatic Control, the Electro-Control system should work closely with machine movements to get
the result of the Automatic Control, i.e. the synergistic integration technology of Mechatronics, which has become
popular in recent years. However, that is quite a difficult job to learn such a complicated sequential control design for
machinery engineers, therefor the SFC (Sequential Function Chart) is developed accordingly.
4-1 What is the Se quential Fun c tion Chart (SF C )
The SFC is designed to create an easy way to understand the machine's movements, which has the following features:
(1) It is not necessary to design the special sequence for stepladders of which state constantly changes, the PLC will
automatically execute interlocks and double coils under different states. Only need to simply design the sequence
function of every state.
(2) Even a person who is not a machine designer can easily learn all actions and conduct jobs such as trials,
adjustment, debug and maintenance.
4-1-1 The Framework of SFC
SFC Schema tic D iagram
Initial state
The transfer condition, to control the movement from
the Initial State to State 1
State 1
The transfer condition, to control the movement from the
State 1 to State 2
State 2
The transfer condition, to control the movement from the
2 to State 3
The transfer condition, to control the movement from the
State (N-1) to State N
State n
The transfer condition, to control the movement
from the State N to Initial State
The Ladder Diagram of Sequential Control
for State 1
The Ladder Diagram of Sequential Control
for State 2
The Ladder Diagram of Sequential Control
for State N
The Actual SFC
S0
X20
S20
X21
S21
X22
X20, X21, X22,… X26, X27
Which are the transfer conditions for each
State.
X26
S30
X27
The left is a Schematic Diagram of SFC and the right diagram is the corresponding actual SFC. The PLC will execute to
start from the Initial State, then complete State 1 → State 2 → … → State N in the sequence based on states' transfer
conditions and achieve a cycle of control.
4-1-2 Basic Components of SFC
1. States
(1) Initial State
The rst state to execute after PLC runs. Ordinarily the Initial State is achieved by using the startup initial pulse.
The Initial State is represented by a frame with double sidelines.
(2) Effective State
The Effective State refers to a state which is executive or active during the PLC processing. Under an Effective
State PLC will execute the following actions in sequence:
Driving the coil of the output point, timer or counter relative to the state.
Resetting the last pasted action, i.e. turning the actions which are relative to the last state into “OFF”.
Transferring the machine action to the next state when the transfer condition is authorized. In generally there is
a connecting line to connect the states, and it indicates the direction of the signal.
2. Transfer Condition
There is a line segment to connect between states, and on the line segment put a perpendicular short line which is
used to express the related condition driving the states transfer.
91
Page 98
4-1-3 State and Action of SFC
The VS series PLC uses step relay to indicate the state in the SFC. The diagrams below show the action of step relays
under various of situations.
S20=OFF, the step is not active, Y7=OFF.
S20
X1
Y7
SET
SET
Y0
S21=ON, the step is active, Y0=ON, Y1=ON.
Y1
S22=OFF, the step is not active, Y2=OFF.
Y2
S20=OFF, the step is not active, Y7=OFF.
Y7
Y0
S21=ON, the step is still active, Y0=ON, Y1=ON.
Y1
S22=ON, the step is active, Y2=ON.
Y2
1
S21
X0
S22
At the moment X0=OFF → ON, the active step will be transferred from the S21 to S22. The relay S22 truns
from OFF to ON, but S21 remains ON temporary.
S20
X1
2
S21
X0
S22
At the next scan time, the step S21 turns from ON to OFF (inactive), but S21 is still executed.
S20=OFF, the step is not active, Y7=OFF.
SET
SET
Y7
Y0
Y1
S22=ON, the step is active, Y2=ON.
Y2
Y7
S20=OFF, the step is not active, Y7=OFF.
Y0
Y1
S22=ON, the step is active, Y2=ON.
Y2
S21=OFF, the step is executed but inactive, Y0 turns OFF;
Y1=ON because it was driven by the SET instruction.
S21=OFF, the step is not executed, Y0=OFF;
Y1=ON because it was driven by the SET instruction.
S20
X1
3
S21
X0
S22
Then the next scan time, the step S21 will not be executed.
S20
X1
S21
4
X0
S22
92
Page 99
In the process of SFC step transferring, there are some phenomena which need to pay special attention to, as the
following diagrams show.
The step S21 will be executed
at the region
will not be executed
S21
S22
A
:It is a Scan Time, the activated step is transferred at the scan time. Both S21 and S22 are ON at this scan time.
:Another Scan Time, it is coming after the state transfer. Although the S21 has turned OFF, it will still execute the
B
will not be executed
will not be executed
will be executed
program within the step; meanwhile, it turns Y0 from ON to OFF.
The devices driven by the OUT instruction in the step will turn OFF (OUT Y0 in the program) for the next scan time after
the state transfer; but the devices driven by the SET instruction will remain ON (SET Y1 in the program).
4-1-4 Types of SFC
Based on the flow control methods of SFC, SFC has five basic types:
S0
S20
S5
S10
S3
S10
S8
S100
S9
S200
S21
S22
S23
S24
S21
S22
S11
Simple Flow Selective
Branch / Merge
S30S20
S31
S32
S20S30
S31S21
S32S22
S11
Simultaneously Parallel
Branch / Merge
S101
S102
S103
S104
S201
S202
S203
S204
Jump Repeat
93
Page 100
4-2 Compi l ing the S e quential F unction Ch a rt (SFC)
The SFC has its special operating method. Through the step-by-step description of compiling the SFC program in this
chapter, designers can understand the methods of the SFC programming. Here, we use the application example of a
fountain in park to explain the design procedure of the SFC in sequence.
The description of the park fountain function:
There is a control panel next to the park fountain and a START button on the panel for people to start up the fountain
show, also a READY indicator to display whether it is under the standby state or not. When people press the start
button during the standby status, a cycle of the fountain lighting and spray show will start. After a while, it is back to the
standby status.
When the fountain show is activated, a series procedures will start to perform. First, the system turns to the busy status
(the READY indicator OFF) and illuminates the fountain's lights. 5 seconds later, the surrounding water nozzles begin to
spray. After 10 seconds, the central nozzle joins up. All the lights and water spraying will run for 20 seconds then stop,
the fountain returns to the standby status and the READY indicator turns ON again.
RE ADY
STAR T
The operating procedures for the fountain control are as follows:
(1) When the power is ON, the PLC is in the standby status and the READY indicator is ON.
(2) If someone presses the START button, the fountain's lights are illuminated and a 5 second timer is activated.
(3) When the 5 second timer is reached, the surrounding water nozzles begin to spray and a 10 second timer is activated.
(4) When the 10 second timer is reached, the central nozzle begins to spray too, and a 20 second timer is activated.
(5) After the 20 second timer is reached, all the lights and nozzles are turned OFF and the PLC comes back to the
standby status.
4-2-1 Create the Flowchart of the Sequential Procedures
According to the description of the fountain control actions, we can draw the flowchart as below.
First of all, we divide those continuous actions to be completed into few individual steps. Then, insert a control condition
between every two steps that could transfer activating state of a step into next step. By this method, the following
procedure flowchart is produced.
The initial
step
The START button
The step #1
5 sec. timer is reached
The step #2
10 sec. timer is reached
The step #3
20 sec. timer is reached
The step #4
All actions are nished
Turn the READY indicator ON at
this standby step.
Illuminate the lighting and activate
the coil of 5 second timer.
Drive the valve of surrounding
nozzles and activate the coil of 10
second timer.
Drive the valve of central nozzle
and activate the coil of 20 second
timer.
Shut the lighting down and turn the
valves of nozzles OFF.
94
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.