TECO 7300CV User Manual

7300CV MODBUS COMMUNICATION PROTOCOL
File No. :PC-CV-08 Version : 1.A
Page :
1/34
7300CV MODBUS
USER’S MANUAL
COMMUNICATION INTERFACE
7300CV MODBUS COMMUNICATION PROTOCOL
File No. :PC-CV-08 Version : 1.A
Page :
2/34
1. Communication Data Frame
7300CV series inverter can be communication controlled by the PC or other controller with the
communication protocol, Modbus ASCII Mode & Mode RTU, RS485 or RS232.
Frame length maximum 80 bytes
1.1 Hardware installation
Slave 7300CV
Station 01
Slave 7300CV
Station 02
Slave 7300CV
Station 03
Slave 7300CV
Station FE
Controller
(PLC / HMI or
PC )
Option Card Option Card Option Card Option Card
RS-485
Interface
RSA RSB RSA RSB RSA RSB
RSA RSB
Response
Request
** The network is terminated at each end with an external terminating resistor (120 ohm, 1/4 watt).
1.2 Data format frame FOR ASCII MODE
STX(3AH) Start Bit = 3AH
Address Hi
Address Lo
Communication Address(Station):
2-digit ASCII Code
Function Hi
Function Lo
Function Code (command):
2-digit ASCII Code
Command Start Address
Command Start Address
Command Start Address
Command Start Address
Command Start byte:
4-digit ASCII Code
Data length
Data length
Data length
Data length
The length of the command:
4-digit ASCII Code
LRC Check Hi
LRC Check Lo
LRC Check Code:
2-digit ASCII Code
END Hi
END Lo
End Byte:
END Hi=CR(0DH),END Li = LF(0AH)
Data format frame FOR RTU MODE
MASTER (PLC etc.) send request to SLAVE, whereas SLAVE response to MASTER. The signal receiving is illustrated here.
120 1/4w
120 1/4w
7300CV MODBUS COMMUNICATION PROTOCOL
File No. :PC-CV-08 Version : 1.A
Page :
3/34
The data length is varied with the command (Function).
SLAVE Address
Function Code
DATA
CRC CHECK
Signal Interval
** The interval should be maintained at 10ms between command signal and request
1.3 SLAVE Address
00H : Broadcast to all the drivers
01H : to the No. 01 Driver
0FH : to the No.15 Driver
10H : to the No.16 Driver
and so on...., Max to No. 254(FEH)
1.4 Function Code
03H : Read the register contents
06H : Write a WORD to register
08H : Loop test
10H : Write several data to register (complex number register write)
2.CMS (Checksum and time-out definition)
2.1 LRC
ex. ADDRESS 01H
FUNCTION 03H
COMMAND 01H
00H
DATA LENGTH 0AH
-----------------------
0FH------------ true complement
Checksum = F1H
CS(H) = 46H (ASCII)
CS(L) = 31H (ASCII)
2.2 CRC CHECK :
CRC check code is from Slave Address to end of the data. The calculation method is illustrated as follow:
(1) Load a 16-bit register with FFFF hex (all's 1). Call this the CRC register.
7300CV MODBUS COMMUNICATION PROTOCOL
File No. :PC-CV-08 Version : 1.A
Page :
4/34
(2) Exclusive OR the first 8-bit byte of the message with the low-order byte of the 16-bit CRC
register, putting the result in the CRC register.
(3) Shift the CRC register one bit to the right (toward the LSB), Zero-filling the MSB, Extract and
examines the LSB.
(4) (If the LSB was 0): Repeat Steps (3)(another shift).(If the LSB was 1): Exclusive OR the CRC
register with the polynomial value A001 hex (1010 0000 0000 0001).
(5) Repeat Steps (3) and (4) until 8 shifts been performed. When this is done, a complete 8-bit byte
will be processed.
(6) Repeat Steps (2) through (5) for next 8-bit byte of the message, Continue doing this until all
bytes have been processed. The final content of the CRC register is the CRC value. Placing the
CRC into the message: When the 16-bit CRC (2 8-bit bytes) is transmitted in the message, the
low-order byte will be transmitted first, followed by the high-order byte, For example, if the
CRC value is 1241 hex, the CRC-16 Upper put the 41h, the CRC-16 Lower put the 12h
z CRC calculation application program
UWORD ch_sum ( UBYTE long , UBYTE *rxdbuff ) {
BYTE i = 0;
UWORD wkg = 0xFFFF;
while ( long-- ) {
wkg ^= rxdbuff++;
for ( i = 0 ; i < 8; i++ ) {
if ( wkg & 0x0001 ) {
wkg = ( wkg >> 1 ) ^ 0xa001;
}
else {
wkg = wkg >> 1;
}
}
}
return( wkg );
}
7300CV MODBUS COMMUNICATION PROTOCOL
File No. :PC-CV-08 Version : 1.A
Page :
5/34
2.3 TIME-OUT (400ms) & RETRY (max. : 2 times)
PC-LINK S 400ms
PC-LINK S 400ms
PC-LINK S
(When INV(PLC) time-out or detect checksum error, or INV(PLC) response error code = checksum error,
PC-LINK retry maximum two times, and if two times after still error,
then display “ERR6”)
7300CV MODBUS COMMUNICATION PROTOCOL
File No. :PC-CV-08 Version : 1.A
Page :
6/34
3.Command START ADDRESS
Function Description
Command
Start Address
Data length
(WORD)
Ladder page1 read 200H 0AH
Ladder page2 read 20AH 0AH
Ladder page3 read 214H 0AH
Ladder page4 read 21EH 0AH
Ladder page5 read 228H 0AH
Timer1 Function read 264H 05H
Timer2 Function read 269H 05H
Timer3 Function read 26EH 05H
Timer4 Function read 273H 05H
Timer5 Function read 278H 05H
Timer6 Function read 27DH 05H
Timer7 Function read 282H 05H
Timer8 Function read 287H 05H
Counter1 Function read 28CH 04H
Counter2 Function read 290H 04H
Counter3 Function read 294H 04H
Counter4 Function read 298H 04H
Encoder1 Function read 2ACH 05H
Encoder2 Function read 2B1H 05H
Encoder3 Function read 2B6H 05H
Encoder4 Function read 2BBH 05H
Analog1 Function read 2C0H 03H
Analog2 Function read 2C3H 03H
Analog3 Function read 2C6H 03H
Analog4 Function read 2C9H 03H
Control function read 2CCH 06H
Contro2 function read 2D2H 06H
Contro3 function read 2D8H 06H
Contro4 function read 2DEH 06H
Contro5 function read 2E4H 06H
Contro6 function read 2EAH 06H
Contro7 function read 2F0H 06H
Contro8 function read 2F6H 06H
03
All Coil status read 2FCH~303H 08H
7300CV MODBUS COMMUNICATION PROTOCOL
File No. :PC-CV-08 Version : 1.A
Page :
7/34
Function Description
Command
Start Address
Data length
(WORD)
Ladder page1 write 200H 0AH
Ladder page2 write 20AH 0AH
Ladder page3 write 214H 0AH
Ladder page4 write 21EH 0AH
Ladder page5 write 228H 0AH
Timer1 Function write 264H 04H
Timer2 Function write 269H 04H
Timer3 Function write 26EH 04H
Timer4 Function write 273H 04H
Timer5 Function write 278H 04H
Timer6 Function write 27DH 04H
Timer7 Function write 282H 04H
Timer8 Function write 287H 04H
Counter1 Function write 28CH 03H
Counter2 Function write 290H 03H
Counter3 Function write 294H 03H
Counter4 Function write 298H 03H
Encoder1 Function write 2ACH 04H
Encoder2 Function write 2B1H 04H
Encoder3 Function write 2B6H 04H
Encoder4 Function write 2BBH 04H
Analog1 Function write 2C0H 03H
Analog2 Function write 2C3H 03H
Analog3 Function write 2C6H 03H
Analog4 Function write 2C9H 03H
Control function write 2CCH 06H
Contro2 function write 2D2H 06H
Contro3 function write 2D8H 06H
Contro4 function write 2DEH 06H
Contro5 function write 2E4H 06H
Contro6 function write 2EAH 06H
Contro7 function write 2F0H 06H
10
Contro8 function write 2F6H 06H
06 Coil status write 2FCH 01H
7300CV MODBUS COMMUNICATION PROTOCOL
File No. :PC-CV-08 Version : 1.A
Page :
8/34
Function Description
Command
Start Address
Data length
(WORD)
RUN&Stop(PLC) 330H 1
All memory clear
(Clear Plc Memory)
331H 1
06
PASSWORD 332H 1
Note: ‘Write Ladder page write’ and ‘Clear all memory’ are not available under PLC running
mode.
4.Error code
ASCII Mode RTU Mode
STX ‘:’ SLAVE Address 02H
‘0’ Function 83H
Address
‘1’ Exception code 52H
‘8’ High C0H
Function
‘6’
CRC-16
Low CDH
‘5’ Exception
code
‘1’
‘2’
LRC Check
‘8’
‘CR’
END
‘LF’
Under communication linking, the driver responses the Exception Code and send Function Code AND
80H to main system if there is error happened.
Error
Code
Description
51
Function Code Error
52
Address Error
53
Data Amount Error
54
Data Over Range
55 Writing Mode Error
7300CV MODBUS COMMUNICATION PROTOCOL
File No. :PC-CV-08 Version : 1.A
Page :
9/34
5.Command Start Address description
5.1 Ladder(* )page read ASCII Mode
PC Æ INV(PLC) INV(PLC)ÆPC
3AH STX 3AH STX
30H 30H
31H
Address
31H
Address
30H 30H
33H
Function Code
33H
Function Code
30H 31H
32H 34H
Data length
(Byte)
30H
30H
*Register Number
Send out the data from 200H~209H,
total 40 Byte
30H ?
30H ?
CHECK
SUM,
30H 0DH END
41H
Data Length
0AH END
?
?
CHECK SUM,
0DH END
0AH END
RTU Mode
PC Æ INV(PLC) INV(PLC)ÆPC
01H Address
01H Address
03H Function Code
03H Function Code
02H
14H Data length
00H
*Register Number
00H
Sent out the data from 200H~209H,
total 20 Byte
0AH
Data Length
? CRC High Byte
CRC High Byte
? CRC Low Byte
CRC Low Byte
7300CV MODBUS COMMUNICATION PROTOCOL
File No. :PC-CV-08 Version : 1.A
Page :
10/34
5.2 Function block read
5.2.1 Timer function block read ASCII Mode
PC ÆINV(PLC) INV(PLC)ÆPC
3AH STX 3AH STX
30H 30H
31H
Address
31H
Address
30H 30H
33H
Function Code
33H
Function Code
30H 30H
32H 41H
Data length
(Byte)
36H
34H
*Register Number
*Send out the data from
264H~268H, total 20 Byte
30H ?
30H ?
CHECK
SUM,
30H 0DH END
35H
Data Length
0AH END
?
?
CHECK SUM,
0DH END
0AH END
RTU Mode
PC Æ INV(PLC) INV(PLC)ÆPC
01H Address
01H Address
03H Function Code
03H Function Code
02H
0AH Data length
64H
*Register Number
00H
*Send out the data from 264H~268H,
total 10 Byte
05H
Data Length
? CRC High Byte
CRC High Byte
? CRC Low Byte
CRC Low Byte
7300CV MODBUS COMMUNICATION PROTOCOL
File No. :PC-CV-08 Version : 1.A
Page :
11/34
5.2.2 Counter function block read
ASCII Mode
PC ÆINV(PLC) INV(PLC) ÆPC
3AH STX 3AH STX
30H 30H
31H
Address
31H
Address
30H 30H
33H
Function Code
33H
Function Code
30H 30H
32H 38H
Data Length
(Byte)
38H
43H
*Register Number
*send out the data from
28CH~28FH, total 16 Byte
30H ?
30H ?
CHECK SUM
30H 0DH END
34H
Data Length
0AH END
?
?
CHECK SUM
0DH END
0AH END
RTU Mode
PC Æ INV(PLC) INV(PLC)ÆPC
01H Address
01H Address
03H Function Code
03H Function Code
02H
08H Data length
8CH
*Register Number
00H
*Send out the data from 28CH~28FH,
total 8 Byte
04H
Data Length
? CRC High Byte
CRC High Byte
? CRC Low Byte
CRC Low Byte
Loading...
+ 23 hidden pages