l011663 Hmi PLC Hp043 20dt User Manual
l011663 Hmi PLC Hp043 20dt User Manual
l011663 Hmi PLC Hp043 20dt User Manual
User Manual
CONTENT
CHAPTER 1 GENERAL INTRODUCTION ..................................................................... 3
1
Kinco-K2
User Manual
3.1 HMI PROGRAMMING................................................................................................. 18
3.1.1 Create project..................................................................................................... 18
3.1.2 Edit configuration . ......................................................................................... 21
3.1.3 download link for HMI manual ...................................................................... 21
3.2 PLC .......................................................................................................................... 21
3.2.1 introduction........................................................................................................ 21
3.2.2 Install driver of USB programming port............................................................ 22
3.2 HIGH SPEED COUNTER .............................................................................................. 34
3.2.1 Operation Modes and Inputs of the High-speed Counters .............................. 35
3.2.2 Control Byte and Status Byte ............................................................................ 36
3.2.3 Preset value (PV value) setting .......................................................................... 38
3.2.4 “CV=PV” Envent No......................................................................................... 41
3.2.5 How to use high speed counter .......................................................................... 41
3.3 HOW TO USE HIGH SPEED PULSE OUTPUT .................................................................. 44
3.3.1 High speed pulse output instruction .................................................................. 45
3.3.2 How to use PLS instruction ............................................................................... 45
3.3.3 How to Use Position Control Instructions ...................................................... 53
2
Kinco-K2
User Manual
1.1 Summary
Kinco HMI-PLC combine HMI and PLC. It is Kinco ecomony integrated product.
Based on powerful functions、high performance and high reliability, Kinco improve hardware
designing of HMI-PLC. It cancel the wiring and communication of HMI and PLC, so it will
reduce cost.
Kinco HMI-PLC is integrated product with high price-performance ratio.
Expansion:no
3
Kinco-K2
User Manual
4
Kinco-K2
User Manual
compatibility a.c. main power: 2KV CM, 1KV DM;
(EMC) High energy d.c. main power: 0.5KV CM, 0.5KV DM;
surge I/Os and Communication port: 1KVCM.
Performance criteria B.
main power: 2KV, 5KHz. I/Os and Communication port:
Fast transient
1KV, 5KHz.
bursts
Performance criteria B.
Voltage drops a.c. supply: at 50Hz, 0% voltage for 1 period; 40% voltage
and for 10 periods; 75% voltage for 20 periods.
interruptions Performance criteria A.
Ingress Protection Rating IP65
1.4 specification
memory
Programming 1 USB
5
Kinco-K2
User Manual
download
Parameters HP043-20DT
Power supply
Rated voltage DC24V
I/O
communication
Digital IO 9*DI/9*DO
Expansion No
1*RS485,max. 115.2kbps
Serial port
Programming port, Modbus RTU master and slave, free protocol
High speed counter 4
Single 4, HSC0/HSC1: max.50KHz; HSC2/HSC3: max.20KHz
Double
4, HSC0/HSC1: max.50KHz,HSC2/HSC3: max.10KHz
3: max. 10KHz
6
Kinco-K2
User Manual
Interrupt 4, I0.0-I0.3 can be on/off interrupt
Memory area
Programming Max. 4K instruction
Users data M area 1K bytes; V area 4K bytes
DI 2 bytes
DO 2 bytes
AI 2 bytes
AO 2 bytes
Data backup E2PROM, 448 bytes
Retentive range 4K bytes. Lithium battery, 3 year at normal temperature
Others
256
1ms time base: 4
RTC 10ms time base: 16
7
Kinco-K2
User Manual
1.4.3 Appearance
digital IO Digital IO
PLC RS485
HMI programming port
1.4.4 Dimension
Dimension 132*102*45mm
Cutout size 119*93mm
8
Kinco-K2
User Manual
9
Kinco-K2
User Manual
2.1 Functions
The CPU has two modes: STOP mode and RUN mode.
In RUN mode, the CPU executes the main scan cycle and all interrupt tasks.
In STOP mode, the CPU will set all output channels (including DO and AO) to the known
values which are specified in the [Hardware Configuration] through Kincobuilder, and only
process communication requests which comes from KincoBuilder software and other Modbus
RTU master device.
Change CPU status
HMI-PLC provides one way for manually changing the CPU status: Executing [RUN] or
[STOP] in Kincobuilder.
Usually when the PLC is power on, default status of PLC is RUN status.
Below situation, the PLC status depend on Kincobuilder programming
a— PLC RUN mistake (strong mistake) will stop the PLC
b— The user use Kincobuilder [setup], PLC is RUN/STOP status
c— Users use STOP instruction to stop PLC
d— If downloading project failed, PLC will keep STOP status.
HMI-PLC uses Micro USB (USB2.0 ) port as programming port. The connector port is
same as HMI programming port. Users can use cables with same connector port for PLC
programming.
10
Kinco-K2
User Manual
In PC, the programming port of HMI-PLC will be a virtual COM port, you must install
the driver for it when using in PC first time. After finishing installing software Kincobuilder,
there will be different drivers in the path “\Kincobulider V***\Drivers\” for different versions
of Windows system. Right now it can only support Windows XP, Windows 7 and Windows 8.
When connecting programming cable to HMI-PLC and PC first time, Windows system will
detect new hardware and mention installing driver, users can install the driver according to
the version of Windows.
HMI-PLC provides 3 high speed pulse outputs(Q0.0,Q0.1 and Q0.4).All support PTO
and PWM.Q0.0 and Q0.1 support up to 50KHz (The resistor of load should be less than
3KΩ),Q0.4 supports up to 10KHz.
CPU Q0.0 Q0.1 Q0.4
HP043-20DT 50K 50K 10K
I0.0-I0.3 in CPU support edge interrupt function, it can execute interrupt by rising edge and
falling edge of input signal. By using this function, it can capture the rising edge and falling
edge of input signal quickly. For some input signal whose pulse width is less than the CPU
scan time, it can respond quickly.
Data retentive means the data in RAM can retain after power failure.CPU provides a
lithium battery (Replaceable but un-rechargeable) for data retentive. When CPU loses power,
the data in the RAM will be maintained by the lithium battery, and the retentive ranges will be
left unchanged at next power on.Through [Hardware] configuration in KincoBuilder, user can
select the type of data retentive (Such as V,C area) and the range. The life of battery is 5 years
and the retaining duration is 3 years at normal temperature.
Data backup is that CPU provides an E2PROM to store data permanently. At power on, the
12
Kinco-K2
User Manual
CPU will restore the data from E2PROM into RAM to execute.
Note: Because E2PROM has a writing limit of 1 million times, users should avoid to write data
into data backup area frequently.
There are 448 bytes in V area for data backup (VB3648--VB4095),the data in this area will
save in E2PROM automatically. HMI-PLC sets VB3648--VB3902 as data backup by
default,if user needs to use VB3903--VB4095 for data backup, it needs to configure in 【PLC
hardware configuration】.The configuration interface is as following figure.
The real-time clock built in the all CPU modules can provide real-time clock/calendar
indication. Users need to use KincoBuilder【PLC】->【Time of Day Clock...】to set the clock
when using RTC first time. Then users can use real-time clock instructions(READ_RTC、
SET_RTC、RTC_W、RTC_R).
After CPU power off, the real-time clock can be maintained by lithium battery. The life of
battery is 5 years and the retaining duration is 3 years at normal temperature.
HMI-PLC can use certain specification lithium battery as backup battery. When PLC is
power-off, it will use the backup battery to maintain real-time clock and RAM.
The backup battery is removable, user can replace new battery by
themselves when the battery is empty.
The lithium battery is CR2032(3V) with connector. As shown in
figure, user can order the battery separately.
13
Kinco-K2
User Manual
HP043-20DT
14
Kinco-K2
User Manual
2.3 Dimension
HP043-20DT
DI Specifications
Input type Source/Sink
Rated input voltage DC 24V (Max. 30V)
Rated input current 3.5mA@24VDC
Max input voltage of logic 0 [email protected]
Minimum input voltage of logic 1 Common channel:[email protected]
Common channel: 15μs; HSC channel:
Input filter time delay
10μs(50k); 1.2μs(200k)
· off-to-on
Common channel: 60μs; HSC channel: 60μs
· on-to-off
(50k), 0.50μs (200K)
15
Kinco-K2
User Manual
Isolation between input and internal
circuit Opto-electrical isolation
· Mode 500VAC/1 min
· Voltage
Status indicator “1” when Green LED turns on
DO Specifications(Transistor type)
Output type Source
DC24V,allowance range:
Rated power supply voltage
DC20.4V—DC28.8V.(Same as power supply)
Output current per channel Rated current:200mA @24VDC
Instant impulse current per channel 1A,less than 1s
Output leakage current Max.0.5цA
Output impedance Max. 0.2Ω
16
Kinco-K2
User Manual
AI Speficication
Signal 4-~20mA、1-~5V、0-~20mA、0-10V
Resolution 12 bits
Accuracy 0.3% F.S.
Speed(each channel) 200 times /s
Current mode:<=250Ω
Resistance
Voltage mode:>4MΩ
Common mode voltage (Signal voltage +Common mode voltage)≤15V。
17
Kinco-K2
User Manual
19
Kinco-K2
User Manual
20
Kinco-K2
User Manual
http://download.kinco.cn/D_UserManual/HMI/Kinco%20HMIware_UserManual_CN2016110
7.rar
3.2 PLC
3.2.1 introduction
Kinco HMI-PLC use Kincobuilder programming software and same instructions, same as
K5.
HMI-PLC improve some functions, pls reference the manual.
Pls reference Kincobuilder software 【Help】or download K5/K2 software for most
functions.
http://download.kinco.cn/D_UserManual/PLC/Kinco_K5K2PLC_Software_Manual_2015
1029.pdf
21
Kinco-K2
User Manual
HMI-PLC provides USB programming port. This programming port will be used as virtual
serial port in PC. Its driver files are located in \drivers in Kincobuilder installation folder. Right
now it supports Windows XP、Windows 7 和 Windows 8 systems, as shown in following
figure:
When connecting programming cable to HMI-PLC and PC first time, Windows system
will detect new hardware and mention installing driver, users can install the driver according to
the version of Windows.
Fail in installing driver in Windows 7?
If it is simplified Win7 system, it will be lack of files mdmcpq.inf and usbser.sys, so it can
not install the virtual serial port.
These two files are in the path ..\Win7\windows, users can copy these two files to
following path and install the driver again.
Copy mdmcpq.inf to C:\WINDOWS\INF.
Copy usbser.sys to C:\WINDOWS\SYSTEM32\DRIVERS\
How to install driver in Windows 8?
Windows 8 and above version require the install file certificated by WHQL(Windows
laboratory),otherwise it will forbid installation.
Solution: Execute [Advanced Startup] -> [Restart now], then select [7)Disable driver
signature enforcement] in the “Startup Settings” window and restart PC. After startup, you can
continue to install HMI-PLC’s driver.
22
Kinco-K2
User Manual
23
Kinco-K2
User Manual
24
Kinco-K2
User Manual
25
Kinco-K2
User Manual
2、 If you have not internet, pls reference below information.
Below picture is advanced starting of Win8
Find advanced starting, then choose 7 to forbid driver signature.
(1) Install PLC drive according Window guidance.
Choose driver files in Win8.
26
Kinco-K2
User Manual
27
Kinco-K2
User Manual
(2) It will show “settings” when mouse at the right side of Window, then click “settings”
28
Kinco-K2
User Manual
29
Kinco-K2
User Manual
(4)Click “restart now” at advanced startup
30
Kinco-K2
User Manual
(6)click startup settings
31
Kinco-K2
User Manual
(8) This is the picture after computer restarting.
Choose 7 to forbid driver signature inforcement, then PC restart.
(9)Reinstall PLC driver based on Window guidance. Choose driver files in the Win8
It will show below information, choose “ install this driver software anyway”
32
Kinco-K2
User Manual
33
Kinco-K2
User Manual
HMI-PLC provides 4 high speed counters HSC0-HSC3.HSC0 and HSC1 can support up to
50KHz(Both single phase and AB phase).HSC2 and HSC3 can support up to 20KHz for single
phase and 10 KHz for AB phase.
High speed counter supports multiple modes: single phase, CW/CCW,AB phase (1
multiplication and 4 multiplication).
All high speed counter can support maximum 32 PV and support 32 “CV=PV” interrupts. PV
can be set as relative value or absolute value. If it is relative value,
CPU Single phase ABphase
HSC0 and HSC1 HSC2 and HSC3 HSC0 and HSC1 HSC0 and HSC3
HP043-20DT 50K 20K 50K 10K
34
Kinco-K2
User Manual
Input signals of high-speed counter include: clock (input impulse), direction, start and reset.
In different operation modes input signals is different. Please see below:
HSC 0
Mod Description
I0.1 I0.0 I0.5
e
0 Single-phase up/down counter
1 with internal direction control: Clock Reset
2 SM37.3 Reset Start
3 Single-phase up/down counter Direction
Clock
4 with external direction control Reset Direction
Two-phase counter with up/down Clock
6 Clock Up
clock inputs Down
9 A/B phase quadrature counter Clock A Clock B
HSC1
Mode Description I0.4 I0.6 I0.3 I0.2
0 Single-phase up/down counter
1 with internal direction control: Reset Clock
2 SM47.3 Reset Start
3 Single-phase up/down counter Direction
Clock
4 with external direction control Reset Direction
6 Two-phase counter Clock
Clock Up
7 with up/down clock inputs Reset Down
9
A/B phase quadrature counter Clock A Clock B
10 Reset
HSC 2
Mode Description I0.4 I0.5
Single-phase up/down counter
0 Clock
with internal direction control:SM57.3
35
Kinco-K2
User Manual
9 A/B phase quadrature counter Clock A Clock B
HSC 3
Mode Description I0.6 I0.7
Single-phase up/down counter
0 Clock
with internal direction control:SM137.3
9 A/B phase quadrature counter Clock A Clock B
Control Byte
In SM area,each high-speed counter is assigned control byte to save its configuration data:
one control word (8 bit), current value and pre-set (double-integer with 32 bit). Initial value of
current assigned value. If the current value is written in the high-speed counter, it will start
counting from that value. Please see below:
HSC0 HSC1 HSC2 HSC3 Description
36
Kinco-K2
User Manual
SM47. SM57.
SM37.7 SM127.7 Allow this high-speed counter? 0=NO; 1= YES
7 7
HSC0 HSC1 HSC2 HSC3 Description
SMD4 SMD5
SMD38 SMD128 Current value
8 8
SMD5 SMD6
SMD42 SMD132 Pre-set value
2 2
It needs to pay attention that not all the control bits of the control byte is suitable for all
operation mode. For example, “Counting direction” and “Write counting direction in HSC” can
37
Kinco-K2
User Manual
be only used in mode 0,1 and 2 (Single-phase up/down counter
with internal direction control),if the operation mode is with external direction control, then
these two bits will be ignored.
The control byte, current value and preset value are 0 by default after power on
Status Byte
In SM area, each high-speed counter has a status byte, which indicates the current status
of high speed counter.
HSC0 HSC1 HSC2 HSC3 Description
SM36.0 SM46.0 SM56.0 SM126.0 Reserved
SM36.1 SM46.1 SM56.1 SM126.1 Reserved
SM36.2 SM46.2 SM56.2 SM126.2 Reserved
SM36.3 SM46.3 SM56.3 SM126.3 Fault in multiple PV value table:0=No,1=Yes
SM36.4 SM46.4 SM56.4 SM126.4 Reserved
Current counting direction:
SM36.5 SM46.5 SM56.5 SM126.5
0 = Down; 1= Up
Current value equal to preset value:
SM36.6 SM46.6 SM56.6 SM126.6
0 = No,1 = Yes
Current value greater than preset value:
SM36.7 SM46.7 SM56.7 SM126.7
0 = No,1 = Yes
HSC0 HSC1 HSC2 HSC3 Description
SMB14 Current PV segment No.(Start from 0)
SMB150 SMB160 SMB170
0
HMI-PLC supports up to 32 PV value for each high speed counter, and supports setting PV
value as relative value or absolute value. It supports “CV=PV” interrupt cyclic execution.
Follows take HSC0 as example to describe PV value function and setting.
How to select “multiple PV” mode
In the control byte of each high speed counter, there is one control bit for enable multiple preset
value.
In HSC0, this control bit is SM141.0.
38
Kinco-K2
User Manual
If SM141.0 is 0,it will use single PV value, same as K5 PLC.SMD42 is for new PV
value,SM37.5 is to update this new PV value.
If SM141.0 is 1,it will use multiple PV values. In this situation,SM37.5 and SMD42 is invalid.
All the PV values will be in the PV table(SMW142 is for starting address of the
table),SM141.4 defines whether it use the data in PV table or not.If SM141.4 is 1,it means
when HSC starts, it will get the data from PV table. If SM141.4 is 0,when HSC starts,it will
ignore the data in PV table and get the data from last preset value
Multiple PV table
If using PV table,all the PV value will get from PV table.
Each HSC provides one control word which is used to set the starting address of PV table.If
using multiple PV,then all PV value will get from PV table.The starting address of PV table is
odd address of V area,such as 301(Means VB301).
The format of PV table is as follows.
( 1) Data
OFFSET Description
type
0 BYTE Quantity of PV
1 DINT First PV
5 DINT Second PV
… DINT …
(1) All the offset value are the offset bytes related to the table.
(2) When it is set as relative value,then the absolute value of PV data must be greater than
1,or PLC will consider the segment of multiple PV finish and count the number of PV
according to this(Higher priority than setting quantity of PV).
When it is set as absolute value,the difference between two adjacent PV’s absolute
value must be greater than 1,or PLC will consider the segment of multiple PV finish
and count the number of PV according to this(Higher priority than setting quantity of
PV).
(3) “CV=PV” interrupts must execute in sequence,it means that after the counter reaches
the first PV and executes interrupt,then it will compare with the second PV and so
forth.
39
Kinco-K2
User Manual
(4) PV must be set reasonably.Here takes relative value as example,if it is positive
counting,PV must be greater than 0,otherwise the “CV=PV”interrupt will never
execute.If it is negative counting,PV must be less than 0,otherwise the
“CV=PV”interrupt will also never execute.
40
Kinco-K2
User Manual
100 1st time 110 1110 2110
2110 2nd time 2120 3120 4120
4120 3rd time 4130 5130 6130
… N time … … …
42
Kinco-K2
User Manual
Kinco HMI-PLC provides 3 channels for high speed pulse output, they are Q0.0,Q0.1 and Q0.4.
Q0.0 and Q0.1 support maximum 50KHz, and Q0.4 supports maximum 10KHz.
CPU Q0.0 Q0.1 Q0.4
HP043-20DT 50K 50K 10K
For position control instruction,Kinco-K2 have one position output channel for every high
speed pulse output .Meanwhile one position enable control bit in SM area.
Q0.0 Q0.1 Q0.4
Position output Q0.2 Q0.3 Q0.6
channel
Position enable SM201.3 SM231.3 SM251.3
control bit
Position output channel output motor position signal. Forward is 0, rollback is 1.
Position output enable control bit forbid or allow the involved output channel. The position
enable control bit have highest priority. If it is forbidden, position control instruction won’t
output position control signal. The involved output channel will be used as common DO.
44
Kinco-K2
User Manual
LD PLS K2
K5
IL PLS PLS Q U
45
Kinco-K2
User Manual
nds tput
Q Input INT Constant(0、1 or 2)
The PLS instruction is used to load the corresponding configurations of the PTO/PWM from
the specified SM registers and then start outputting pulse until it finish outputting pulse. The
pulse output channel is specified by parameter Q, 0 means Q0.0,1 means Q0.1,2 means Q0.4.
Note: In user program, it only needs to execute PLS instruction once when it is required. It is
suggested to use edge instruction to execute PLS instruction. If executing PLS executing all the
time, then it can’t output normally.
LD
If EN is 1,then PLS is executed.
IL
If CR is 1,then PLS is executed. It won’t influence the value of CR.
Notice: Make sure not to use the PTO and PWM functions if Q0.0 ,Q0.1 and Q0.4 are
relay-output!
PWM
46
Kinco-K2
User Manual
PWM provides a continuous pulse output with a variable duty cycle, and you can control the
cycle time and the pulse width.
The unit of cycle time and pulse width time is microsecond(us) or millisecond(ms). The
maximum value of cycle time is 65535. If the pulse width time is greater than the cycle time
value, the duty cycle is set to be 100% automatically and the output is on continuously. If the
pulse width time is 0, the duty cycle is set to be 0% and the output is off.
PTO
PTO provides a square wave (50% duty cycle) output, and you can control the cycle time and
the number of the output pulses. The unit of cycle time is microsecond(us) or
millisecond(ms).The maximum value of cycle time is 65535.The range of pulse number is
2~4,294,967,295.If the specified pulse number is less than 2, then KInco-K2 will set related
error bit and prohibit the output.
PTO function provides single segment of pulse and multiple segment of pulse.
Single segment pulse
In single segment pulse mode, it only executes pulse train output once after executing PLS
instruction.
Multiple segment pulse
In multi-segment pulse mode, CPU automatically reads the configurations of each PTO
segment from a profile table located in V area and executes the related PTO segment.
The length of each segment is 8 bytes, including a cycle time value (16-bit, WORD), a
reserved value (It is not used now,16-bit, INT), and a pulse number value (32-bit,
DWORD).Thereof, all the pulse output frequency are the same in same segment. It uses PLS
instruction to start multiple segment pulse.
In this mode, the starting address of the profile table is stored in SMW168 (corresponding to
PTO0) ,SMW178 (corresponding to PTO1) and SMW268(corresponding to PTO2).Time base
is configured by SM67.3 (corresponding to PTO0) ,SM77.3 (corresponding to PTO1) and
SM87.3 (corresponding to PTO2). The time base can be in either microsecond or millisecond.
All cycle values in the profile table must use same time base, and cannot be modified when the
47
Kinco-K2
User Manual
profile is executing.
The following table describes the format of the profile table.
Lengt
Byte offset1 Segment Description
h
0 8-bit The number of segments (1 to 64)
Initial cycle time (2 to 65535 times of the time
1 16-bit
base)
1
3 16-bit Reserved
5 32-bit Pulse number(1 to 4,294,967,295)
Initial cycle time (2 to 65535 times of the time
9 16-bit
base)
2
11 16-bit Reserved
13 32-bit Pulse number(1 to 4,294,967,295)
… … …
1 All the offsets in this column are relative to the starting position of the profile table.
Notice: the starting position of the profile table must be an odd address in V area, e.g.
VB3001.
All the default value for control byte, cycle time and pulse number are 0.The way to modify
configuration of PTO/PWM is that configure related control registers first, if it is PTO multiple
segment pulse, it also needs to configure profile table, and then execute PLS instruction.
Each PTO/PWM generator also provides a status bytes in SM area, user can get the status
information of PTO/PWM generator from the status bytes, as shown in following table.
Q0.0 Q0.1 Q0.4 Description
SM66.0 SM76.0 SM96.0 Reserved
SM66.1 SM76.1 SM96.1 Reserved
SM66.2 SM76.2 SM96.2 Reserved
SM66.3 SM76.3 SM96.3 PWM idle: 0=No, 1=Yes
Whether the cycle time or pulse number of PTO is
wrong: 0=No, 1=Yes
SM66.4 SM76.4 SM96.4
Note: Cycle time and pulse number must be
greater than 1.
PTO profile terminated due to user command:
SM66.5 SM76.5 SM96.5
0=No, 1=Yes
SM66.6 SM76.6 SM96.6 Reserved
SM66.7 SM76.7 SM96.7 PTO idle: 0=No, 1=Yes
The PTO idle bit or PWM idle bit indicate the completion of the PTO or PWM output.
49
Kinco-K2
User Manual
50
Kinco-K2
User Manual
Select PTO operation
3) Execute the PLS instruction to configure PTO0 and start it, then a new PTO with the
updated cycle time shall be generated.
Execute PWM
1) Set control byte SMB67 according to the desired operation.
For example, SMB67 = B#16#D3 indicates:
Allow updating the pulse width value and cycle time value
2) Set SMW68 according to desired cycle time.
3) Set SMW70 according to desired pulse width.
4) Execute the PLS instruction to configure PWM0 and start it.
52
Kinco-K2
User Manual
1) Set control byte SMB67 according to the desired operation.
For example, SMB67 = B#16#D2 indicates:
Allow updating the pulse width value and cycle time value
Instructions
Control Registers and Status Registers
For the Position Control instructions,Kinco-K2 specifies a control byte for each high-speed
output channel to store its configurations. Besides, it assigns a current value register(DINT) to
store the pulse number which has outputted currently (This value will increase when run
forward and decrease when run reverse).The following table describes the control byte and the
current value.
Q0.0 Q0.1 Q0.4 Description
Read only. Current value (Increase when run forward,
SMD21
SMD242 SMD262 decrease when run reverse).It indicates the pulse number
2
which has already outputted.
SMD20 Read/Write. New current value. Use to modify the current
SMD238 SDM258
8 value together with specific control bit.
Q0.0 Q0.1 Q0.4 Description
SM201. SM231. SM251. Read/Write. Emergency-Stop bit.
53
Kinco-K2
User Manual
7 7 7 If this bit is 1, no position control instructions can be
executed.
When executing the PSTOP instruction, this bit is set to 1
automatically, and it must be reset in the program.。
Read/Write. Reset the current value or not
SM201. SM231. SM251.
1 --- Clear the current value.
6 6 6
0 --- Maintain the current value.。
SM201. SM231. SM251.
Reserved
5 5 5
Read/Write. Use to modify current value.
SM201. SM231. SM251.
1 - Modify current value.
4 4 4
0 - Maintain the current value.
Read/Write. Direction control bit.
SM201. SM231. SM251. 1 --- Disable the direction output channel, it will be used
3 3 3 as normal output.
0 --- Enable the direction output channel.
SM201. SM231. SM251.
0~ 0~ 0~
Reserved
SM201. SM231. SM251.
2 2 2
Method 1
User reset bit to clear current value.
The reset bits for 3 output channels are SM201.6、SM231.6 and SM251.6.
When the reset bit is 1, PLC will set the current value as 0.Therefore, t only needs one
scan time for the reset bit to activate. When it needs to use this bit, try to avoid to keep this bit
always 1 and also and also avoid to set this bit while the Position Control instruction (Include
54
Kinco-K2
User Manual
PHOME, PREL, PABS, JOG and PFLO_F) is executing, otherwise the counting value may be
wrong.
Following takes channel 0 as example to describe how to reset current value.
(* Network 0 *)
(*Based on homing signal, when it moves to homing, it requires to clear current value*)
LD %SM0.0
PHOME
0, %M0.0, %M0.1, %M0.2, %VW0, %VW2, %VW4, %VD6, %VW10, %M0.4, %M0.5, %M
B1
(* Network 1 *)
(*After PHOME finishing, it uses finishing bit “DONE” to clear current value*)
LD %M0.4
R_TRIG
ST %SM201.6
Method 2
Modify current value by using following registers.
Q0.0 Q0.1 Q0.4 Description
SMD20 Read/Write. New current value. Use to modify the
SMD238 SDM258
8 current value together with specific control bit.
Read/Write. Use to modify current value.
SM201. SM251.
SM231.4 1 - Modify current value.
4 4
0 - Maintain the current value. 。
Here takes channel 0 as example to describe the method: If SM201.4 is 0,then it will maintain
the current value SMD212. If SM201.4 is 1, then it will move the value of SMD208 to
SMD212.When it needs to use this bit, avoid to keep this bit always 1 and also avoid to set this
bit while the Position Control instruction (Include PHOME, PREL, PABS, JOG and PFLO_F)
is executing, otherwise the counting value may be wrong.
Following takes channel 0 as example to describe how to modify current value:
(* Network 0 *)
(*Based on homing signal, hen it moves to homing, t requires to set current value as 100.*)
LD %SM0.0
55
Kinco-K2
User Manual
PHOME
0, %M0.0, %M0.1, %M0.2, %VW0, %VW2, %VW4, %VD6, %VW10, %M0.4, %M0.5, %M
B1
(* Network 1 *)
(*When PHOME instruction finishing, it uses finishing bit DONE to modify current value.*)
LD %M0.4
R_TRIG
MOVE DI#100, %SMD208
ST %SM201.4
56