WS3U-F User Manual
WS3U-F User Manual
————
www.winsunzk.cn
Table of Contents
Chapter 1 Product overview .........................................................................1
1.1 Product overview............................................................................1
1.2 Basic specifications........................................................................1
1.3 Usage environment and installation method..................................1
Chapter 2 Product display............................................................................2
2.1 Main hardware of product..............................................................2
2.2 Product pictures..............................................................................2
Chapter 3 Electrical specifications..........................................................3~11
3.1 Power supply and power consumption...........................................3
3.2 RS232 communication interface....................................................3
3.3 RS485 communication interface...............................................3~5
3.4 Communication with frequency converter / Instrument.................5
3.5 Analog input and output ............................................................6~7
3.6 Clock module ................................................................................7
3.7 PID operation command ................................................................7
3.8 High Speed Input...........................................................................8
3.9 High speed pulse output and pulse width modulation....................8
3.10 Interruption instruction...............................................................10
3.11 Product wiring diagram........................................................10~11
Chapter 4 Programming Instruction.............................................................12
4.1 Application environment..............................................................12
4.2 Soft component Instruction..........................................................12
4.3 Basic directives............................................................................13
4.4 Applied Instruction.................................................................13~15
4.5 Lists of Unsupported instructions................................................16
Chapter 5 Frequent questions and solutions.................................................16
Chapter 6 Warranty clauses..........................................................................16
————Shenzhen Winsunzk Technology Co., LTD.————
www.winsunzk.cn
-1-
————Shenzhen Winsunzk Technology Co., LTD.————
www.winsunzk.cn
Figure 2-1
-2-
————Shenzhen Winsunzk Technology Co., LTD.————
www.winsunzk.cn
Configuration of connection with OP320: baud rate-38400; data bit-7; check bit-Even; stop bit-1)
For rewired HMI, please connect the RXD TXD GND of HIM according to the wire port definition.
DB-9 is RS232 port, which supports Winsun PLC programming protocol,program downloading
(using DB-9 or USB to DB-9 port cable) and communication with HMI or text display.
-3-
————Shenzhen Winsunzk Technology Co., LTD.————
www.winsunzk.cn
RS485 communication interface
D8120 RS485 Communication M8121 Setting when sending data, and automatically
definition resetting from the beginning of data sending
Sending request, when M8122 setting, the data
RS485 Communication will be transmitted once the communication
D8121 M8122
station number setting interface is not occupied. It will be automatically
reset after finishing data sending
Mark it after data receiving done, and
D8122 M8123 automatically resetting when one frame of date
transmitting the left data
received. User should reset it after finishing data
receiving.
M8124 Setting when receiving data, and automatically
resetting after finishing data receiving.
M8129:Mark the overtime communication . the M8029 will set when the master issues a command and
the salve doesn’t respond within D8129 time.
When M8120 is set and RS command is executed, the parameters given are for RS232 interface;
when M8120 is reset and RS command is executed, the parameters given are for RS485 interface.
Figure 3-2
-4-
————Shenzhen Winsunzk Technology Co., LTD.————
www.winsunzk.cn
The transmission format of data can be set by the special register D8120.
Please set the number of data sending points as “KO” on the condition of the system without sending data.
Please set the number of data receiving points as “KO” on the condition of the system without receiving data.
CCD command:
N point data starting with the element specified by S, store the sum of each bit data and CRC check
data in D. And D.+2,D.+3.It is put in D0 and CRC in D2 and D3 as below.
Figure 3-3
Read:
Figure 3-4
D0 is the read station number (high 8 bits) and command code (low 8 bits). If the value of D0 is
H103, The station number is 1 and read command is 3.D1 is the data address to be read, D2 is the
first address of the data for receiving frequency and the instrument returned. If channel 0, M8123
will be set.H1, high 8-bit channel, low 8-bit read.Read 1 data through channel 0 (485 channel,).If
the bit H101, is through the channel (RS232 channel) 1 read 1 data.
Write:
Figure 3-5
D0 is the written station number (high 8 bits) and command code (low 8 bits). If the value of D0 is
H106, it is station number 1. Write single data command 6.D1 is the data address to be written, and D2
is the first address to write the variable frequency or meter data.H1, 8 bits high is the channel, 8 bits low
is the number of writes.Write 1 data through channel 0 (485 channel,).If it is H101, it is to write 1 data
through channel (RS232 channel) 1.M8122 automatically reset after writing
-5-
————Shenzhen Winsunzk Technology Co., LTD.————
www.winsunzk.cn
Figure 3-6
Figure 3-8
-6-
————Shenzhen Winsunzk Technology Co., LTD.————
www.winsunzk.cn
Figure 3-10
This command is used for PID control of the PID running program.S1: target value; S2: current value
(feedback value);S3: PID control parameters, occupying 9 consecutive D registers starting from S3.S3 is
the PID channel number;S3+1 is the proportional coefficient KP; S3+2 is the integration coefficient KI;
S3+3 is the differential coefficient KD; S3+4 is the error coefficient KE. Only when the error value is
greater than this value, PID processing will be carried out. S3+5: output upper limit PMAX;S3+6 output
lower limit PMIN;S3 + 7 standby; S3 + 8 standby; D: control value output.
-7-
————Shenzhen Winsunzk Technology Co., LTD.————
www.winsunzk.cn
3.8 High Speed Input
SPD command (X0-5 is supported). If the encoder has 360 pulses per turn, 720 pulses can
be obtained by doubling frequency and 1440 pulses can be obtained by 4 times frequency,
thus improving the resolution of the encoder.
Up/down Single phase Up/down
Single phase double
counting counting
Count Input counter direction
Count Input
frequency direction
number switches counter switches
X0 C235 M8235 X0 C241 M8241
X1 C236 M8236 X1 C242 M8242
X2 C237 M8237 X2 C243 M8243
X3 C238 M8238 X3 C244 M8244
X4 C239 M8239 X4 C245 M8245
X5 C240 M8240 X5 C246 M8246
-8-
————Shenzhen Winsunzk Technology Co., LTD.————
www.winsunzk.cn
3.10 Interruption
DISI
Rising edge Falling edge
Interrupt prohibition
X0 I0 I1 M8050
2. The timer interrupt pole is I600 and the interrupt prohibition is M8056. Interrupt
time range I601 (1MS)-I699 (99MS)
I10
I20
I30
M8059
I40
I50
I60
-9-
————Shenzhen Winsunzk Technology Co., LTD.————
www.winsunzk.cn
- 10 -
————Shenzhen Winsunzk Technology Co., LTD.————
www.winsunzk.cn
Figure 3-15
Figure 3-16
Figure 3-17
- 11 -
————Shenzhen Winsunzk Technology Co., LTD.————
www.winsunzk.cn
Intermediate relay M M0-M3071, the range of power-down saving : after the No.of M500
Step Point S S0-1023, the range of power-down saving : after the No.of 500
Indirect addressing
V0-7,Z0-7
Pointers V,Z
Subprogram jumping
P0-63
No. P
- 12 -
————Shenzhen Winsunzk Technology Co., LTD.————
www.winsunzk.cn
- 13 -
————Shenzhen Winsunzk Technology Co., LTD.————
www.winsunzk.cn
12 FMOV multicast
13 XCH Exchange
14 BCD BCD conversion
15 BIN BIN conversion
16 ADD BIN Addition
17 SUB BIN Subtraction
18 MUL BIN Multiplication
19 DIV BIN Division
Four logical 20 INC BIN Add 1
operations 21 DEC BIN Minus 1
22 WAND Logical word and
23 WPR Logical word or
24 WXOR Logical Exclusive OR
25 NEG Complement code
26 ROR Ring shift right
27 ROL Ring shift left
28 RCR Right shift
Cyclic shift
29 RCL Left shift
30 SFTL Bit left shift
31 SFTR Bit Shift Right
32 ZRST Batch Reset
33 MEAN Average
Bit data
34 FLT BIN integer→Binary floating-point conversion
processing
35 GRY BIN integer→Gray Code Conversion
36 GBIN Gray code →BIN integer
37 DHSCS High Speed Comparison setting
38 DHSCR High Speed Comparison Resetting
Pulse density and pulse width (pulse interval time) can also be
39 SPD
measured.
40 PLSY Pulse Output
High Speed 41 PLSV Pulse output with direction control
Processing
42 PWM Pulse Width Modulation, 0-32767us
43 PLSR Pulse output with acceleration and deceleration
44 DRVA Absolute position control
45 DRVI Relative position control
46 ABSD Cam Control (Absolute Mode)
47 RS Serial data transfer
48 ASCI HEX - ASCII conversion
Peripheral 49 HEX ASCII - HEX conversion
equipment 50 CCD Check code
51 PID PID operation
52 SEGD BCD to 7-segment code digital tube
53 ECMP The comparison of binary floating point number
- 14 -
————Shenzhen Winsunzk Technology Co., LTD.————
www.winsunzk.cn
59 EDIV Division of binary floating point number
60 INT Conversion between binary floating point number and BIN integer
- 15 -
————Shenzhen Winsunzk Technology Co., LTD.————
www.winsunzk.cn
4.5 Directive lists are not supported in this release
No. Mnemonic Function
Regression Through the Origin, only 16-bit command
1 ZRN
supported
2 DSZR Regression Through the Origin with DOG search
3 DVIT Interrupt positioning
7 Wiring method All input ports are NPN input, negative conduction.
- 16 -