background image

6-12       The Message Format

Typical CRC-16 Calculation Program in Quick Basic:

crcsum# = &HFFFF&
crcshift# = &H0&
crcconst# = &HA001&

CLS
PRINT "***************************************************"
PRINT
PRINT "                 CRC-16 calculator"
PRINT
PRINT "***************************************************"
PRINT "If entering data in hex, preceed the data with '&H'"
PRINT "        Example:  32decimal = 20hex = &H20"
PRINT "***************************************************"
PRINT

INPUT "Enter the number of bytes in the message: ", maxbyte

FOR bytenum = 1 TO maxbyte STEP 1
        PRINT "Enter byte "; bytenum; ":":
        INPUT byte&
        byte& = byte& AND &HFF&
        crcsum# = (crcsum# XOR byte&) AND &HFFFF&
        FOR shift = 1 TO 8 STEP 1
                crcshift# = (INT(crcsum# / 2)) AND &H7FFF&
                IF crcsum# AND &H1& THEN
                        crcsum# = crcshift# XOR crcconst#
                ELSE
                        crcsum# = crcshift#
                END IF
        NEXT shift
NEXT bytenum

lower& = crcsum# AND &HFF&
upper& = (INT(crcsum# / 256)) AND &HFF&

PRINT "Lower byte (1st) = ", HEX$(lower&)
PRINT "Upper byte (2nd) = ", HEX$(upper&)

Summary of Contents for GPD 506/P5

Page 1: ...GPD 506 Modbus RTU Technical Manual...

Page 2: ...allation Sheet Publication 02Y00025 0409 Refer to the following Modicon publication for technical information on Modbus RTU protocol Modicon Modbus Protocol Reference Guide Publication PI MBUS 300 Rev...

Page 3: ...tion of Multiple Drives 4 2 Figure 4 1 CM086 Connection Diagram 4 2 Wiring Instructions 4 3 Figure 4 2 Shield Termination 4 3 Table 4 1 Functions of Terminal Block TC1 4 3 Table 4 2 Applicable Wire Si...

Page 4: ...onse Message 8 2 Chapter 9 Command Priority 9 1 Command Priority 9 2 Table 9 1 Set up for Serial Communication Control 9 3 Table 9 2 Set up for External Terminals Control 9 4 Table 9 3 Set up for Digi...

Page 5: ...ommunication 1 1 Chapter 1 GPD 506 P5 and Serial Communication Introduction to GPD 506 P5 Modbus RTU Communication Standard RS 232 C D Serial Communication The RS 232 C D to RS 485 Converter Board Fig...

Page 6: ...ifications The data that may be sent or received from the drive consists of Run Command Frequency Reference Fault Contents Drive Status Drive Parameter Settings The following table illustrates whether...

Page 7: ...onverter Board is represented by MagneTek part number CM086 Read this manual thoroughly before installation operation maintenance and inspection of the CM086 Option Board CAUTION The CM086 option boar...

Page 8: ...RS 232 C D Serial Communication 2 1 Chapter 2 RS 232 C D Serial Communication RS 232 C D Serial Communication Figure 2 1 RS 232 C D Pin out at the 2CN Connector...

Page 9: ...on of data Pin 2 is for the receipt of data and pins 6 and 7 are for the ground connection The RS 232 C D pin out is shown in the diagram below Figure 2 1 RS 232 C D Pin out at 2CN Connector Cable Spe...

Page 10: ...RS 232 C D Serial Communication 2 3 pin out for devices other than a computer PC such as a PLC may vary...

Page 11: ...Installation of the CM086 Board 3 1 Chapter 3 Installation of the CM086 Board Installation Procedure Figure 3 1 Position of the CM086 Board on the GPD 506 control board...

Page 12: ...four 4 spacer holes on the board with the four 4 plastic stand offs on the drive Snap the CM086 board onto the stand offs tightly 3 Plug the connector from the CM086 board into location 2CN on the co...

Page 13: ...onnection of Multiple Drives Figure 4 1 CM086 Connection Diagram Wiring Instructions Figure 4 2 Shielded Wire Termination Table 4 1 Functions on Terminal Block TC1 Table 4 2 Applicable Wire Size for T...

Page 14: ...ltiple drive communication system The following diagram illustrates the connection between multiple CM086 boards Figure 4 1 CM086 Connection Diagram TC1 CM085 BOARD CM085 BOARD TC2 TC2 Shielded Sheath...

Page 15: ...1 S R RS 485 input output Use as input at TC1 2 S R RS 485 input output parallel connection 3 S R RS 485 input output Use as output at 4 S R RS 485 input output parallel connection TC2 Shield connecti...

Page 16: ...d S R Figure 4 3 SW1 Location on the CM086 Board For one to one connections of the CM086 card and a master device set SW1 to ON as shown below If multiple CM086 cards are connected to a master device...

Page 17: ...Setting Parameters for Communication 5 1 Chapter 5 Setting GPD 506 Parameters for Communication Run Stop and Frequency Selection Communication Set up Parameters ENTER Command...

Page 18: ...ter n002 is Modbus register number 102h The chart shown below illustrates the possible run stop and frequency reference selections Setting Value of n002 in hex Run Stop Command Frequency Reference Com...

Page 19: ...er n101 Modbus Time out Detection Selection A time out is a loss of communications for 2 seconds Parameter n101 or Modbus Register 165h is used to enable or disable the Time out Detection 0 Time out D...

Page 20: ...n Parameter n105 or Modbus Register 169h is used to select the baud rate The table below indicates the baud rates that may be selected Setting Value in hex Baud Rate Selection 0 2400 bps 1 4800 bps 2...

Page 21: ...Parameter Data The parameter registers 101h to 174h are stored in Non Volatile memory When writing new data to parameter registers the new data is written immediately however the new data is stored in...

Page 22: ...The Message Format 6 1 Chapter 6 The Message Format Message Functions Read Multiple Registers Loop Back Test Write Multiple Registers No Response Message CRC 16...

Page 23: ...the message according to the function Function Code hex Function Command Message Response Message Normal min bytes max bytes min bytes max bytes 03h Read Multiple Registers 8 8 7 21 08h Loop back tes...

Page 24: ...antity is greater than 8 an error code of 3 is returned in the fault response message In this command message there are four consecutive registers to be read 20h Staus Signal 21h Drive Fault Contents...

Page 25: ...ata sections of the message The procedure for calculating a CRC 16 value is presented at the end of this chapter When the master receives the response message it calculates a CRC 16 value and compares...

Page 26: ...e message indicates that the command message requested data be read from an invalid register A complete listing of the error codes is shown in Chapter 8 Troubleshooting and Error Codes A CRC 16 value...

Page 27: ...These data values are used to verify that the slave receives the correct data A CRC 16 value is generated from a calculation using the values of the address function code test code and data sections...

Page 28: ...e command message A complete listing of the error codes is shown in Chapter 8 Troubleshooting and Error Codes A CRC 16 value is generated from a calculation using the values of the address function co...

Page 29: ...signals register 001h and frequency reference register 002h to all slaves on the network The master can send a single transmission to all the slaves simultaneously This is called simultaneous broadca...

Page 30: ...ions of the message The procedure for calculating a CRC 16 is described at the end of this chapter When the slave receives the command message it calculates a CRC 16 value and compares it to the one i...

Page 31: ...e original function code of 10h This indicates to the master that the message is a fault response message instead of a normal response message The error code indicates where the error occurred in the...

Page 32: ...es a CRC during receipt of the message and compares the calculated value to the actual value it received in the CRC field If the two values are not equal an error results The CRC is started by first p...

Page 33: ...RINT PRINT INPUT Enter the number of bytes in the message maxbyte FOR bytenum 1 TO maxbyte STEP 1 PRINT Enter byte bytenum INPUT byte byte byte AND HFF crcsum crcsum XOR byte AND HFFFF FOR shift 1 TO...

Page 34: ...sult of EX OR 0100 0100 0111 1111 0 Shift 7 0010 0001 0011 1111 1 Shift 8 1010 0000 0000 0001 CRC 16 Lower 16 1000 0001 0011 1110 Result of EX OR 0000 0111 Function Code 1000 0001 0011 1001 Result of...

Page 35: ...Registers 7 1 Chapter 7 Registers Simultaneous Broadcast Registers Command Registers Monitor Registers Drive Parameter Registers Special Registers...

Page 36: ...ION in hex NO SET 001 Operational Signals 0 0 Stop 1 Run 1 0 Forward Run 1 Reverse Run 2 not used 3 not used 4 1 External Fault 5 1 Fault Reset 6 not used 7 not used 002 Frequency Reference Reference...

Page 37: ...sed terminal S6 002 Frequency Reference Reference unit determined by n103 1 003 Not Supported 0 will return zeros 004 Not Supported 0 will return zeros 005 Not Supported 0 will return zeros 006 Not Su...

Page 38: ...2 M1 M2 7 not used 8 15 will return zeros 021h Drive Fault Contents 0 1 Overcurrent oC Ground Fault GF Load Short Circuit SC 1 1 Overvoltage uV 2 1 Drive Overload oL2 3 1 Drive Overheat oH1 oH2 4 not...

Page 39: ...s depend on constant n105 1 025h Not Used will return zeros 026h Not Used will return zeros 027h Output Current 0 15 1 Amp 10 2 028h Output Motor Voltage 0 15 1 Volt 1 029h Reserved 0 15 02Ah Reserved...

Page 40: ...n Command Mode Communication selected 1 Run Command Mode External Terminals Digital Operator selected 11 1 Overtorque Detection 12 1 Frequency Reference Missing 13 not used 14 1 Major Fault 15 1 Commu...

Page 41: ...C 1 033h KWh Meter Lower 4 Digits n115 30 0 1 kWh 1 034h KWh Meter Upper 4 Digits n115 30 1 0 kWh 1 035h Elapsed Timer Lower 4 Digits 1 Hr 1 036h Elapsed Timer Upper 4 Digits 1 Hr 1 037h Output Power...

Page 42: ...e control 102h n002 Operation Mode Selection Run Command Frequency Ref 0 Operator Operator 1 External Terminals Operator 2 Operator External Terminals 3 External Terminals External Terminals 4 Operato...

Page 43: ...1 ENTER key does have to be pressed to write in new data values 10Ah n010 V f Pattern Selection 0 Fixed pattern 0 1 Custom V f pattern 10Bh n011 Frequency Max 50 0 400 0 Hz 60 0 10Ch n012 Voltage Max...

Page 44: ...erence 1 0 0 to 400 0 Hz 1 0 0 119h n025 Frequency Reference 2 0 0 to 400 0 Hz 1 0 0 11Ah n026 Frequency Reference 3 0 0 to 400 0 Hz 1 0 0 11Bh n027 Frequency Reference 4 0 0 to 400 0 Hz 1 0 0 11Ch n0...

Page 45: ...G VALUE 122h n034 Electronic Thermal Overload 0 No Protection Protection 1 Standard Motor 8 min for OL1 fault 2 Standard Motor 5 min 1 3 Blower cooled Motor 8 min 4 Blower cooled Motor 5 min 123h n035...

Page 46: ...Stop Command Decel 2 N C 9 Auto Frequency Ref Selection 10 Multi step Speed Ref Command A 11 Multi step Speed Ref Command B 12 Multi step Speed Ref Command C 13 Jog Command 14 Accel Decel Time Change...

Page 47: ...7 13 Registers 29 Up Down Command 1...

Page 48: ...nput Selection 2 24 9 Terminal S5 same asn036 4 if 3 wire 128h n040 Multi function Input Selection 2 26 When n040 is set to 29 n039 Terminal S6 same as n036 setting is prohibited 10 9 if 3 wire 129h n...

Page 49: ...7 15 Registers 15 Closed by Serial Communications 16 PID Feedback Loss...

Page 50: ...1 1 4 20mA input 12Dh n045 Frequency Reference Retention 0 Not Retained 0 for Up Down Sample Hold 1 Retained in Freq Reference 1 n024 12Eh n046 Frequency Reference 0 No Detection 0 Loss Detection 1 Co...

Page 51: ...7 17 Registers 7 to 9 asynchronous...

Page 52: ...1 Continuous Operation power recovery within 2 seconds 0 2 Continuous Operation after power recovery within control logic time 138h n056 Speed Search Operation Level 0 to 200 150 139h n057 Minimum Bas...

Page 53: ...100 100 drive rated current 50 145h n069 DC Injection Time at Stop 0 0 to 10 0 seconds 0 0 146h n070 DC Injection Time at Start 0 0 to 10 0 seconds 0 0 147h n071 Torque Compensation Gain 0 0 to 3 0 1...

Page 54: ...ted current 160 14Fh n079 Overtorque Undertorque Det delay time 0 0 to 10 0 seconds 0 1 150h n080 On delay Timer 0 0 to 25 5 seconds 0 0 151h n081 Off delay Timer 0 0 to 25 5 seconds 0 0 152h n082 DB...

Page 55: ...function start level 0 00 to 400 0 Hz 0 00 15Fh n095 Sleep function delay time 0 0 to 25 5 0 0 160h n096 Energy Saving Selection 0 Energy Saving disabled 0 1 Energy Saving enabled 161h n097 Energy Sav...

Page 56: ...Ch n108 No load motor current 0 to 99 30 16Dh n109 Slip Comp Primary Delay Time Constant 0 0 to 25 5 seconds 2 0 16Eh n110 Operator Connection Fault Detection Selection 0 Cycle Stop 0 1 Immediate 16Fh...

Page 57: ...7 23 Registers Special Registers Read Write REGISTER FUNCTION DATA DESCRIPTION SET 900h Enter Command 0 Writes data into non volatile memory...

Page 58: ...Error Codes and Troubleshooting 8 1 Chapter 8 Error Codes and Troubleshooting Communication Error CE Modbus Error Codes Figure 8 1 Fault Response Message...

Page 59: ...ashes CE 2 Deceleration n021 to stop after CE occurs and the Digital Operator flashes CE 3 Operation continues after CE occurs and the Digital Operator flashes CE The default setting of n102 is 1 Modb...

Page 60: ...Error Codes and Troubleshooting 8 3...

Page 61: ...and Priority 9 1 Chapter 9 Command Priority Command Priority Table 9 1 Set up for Serial Communication Control Table 9 2 Set up for External Terminal Control Table 9 3 Set up for Digital Operator Cont...

Page 62: ...the following pages based upon what type of operation your drive is set up for n002 Setting Operation Command Reference Frequency Reference Use Table 0 Digital Operator Digital Operator 9 3 1 External...

Page 63: ...5 O COMM 7 Multi function Input terminal S6 O 8 15 unused 003h unused 008h 009h 0 Multi function Output 1 MA MC O 2 1 Multi function Output 2 M1 M2 O 3 2 unused 3 7 unused Forward Run 2 wire Run Comma...

Page 64: ...M1 M2 O 7 2 unused 3 7 unused Forward Run 2 wire Run Command 3 wire O Reverse Run 2 wire Stop Command 3 wire O EXTERNAL Multi function input terminal S2 5 TERMINALS Multi function input terminal S3 5...

Page 65: ...function Input terminal S5 O COMM 7 Multi function Input terminal S6 O 8 15 unused 003h unused 008h 009h 0 Multi function Output 1 MA MC O 3 1 Multi function Output 2 M1 M2 O 4 2 unused 3 7 unused Fo...

Page 66: ...mergency breakdown support is available on a 24 hour 7 day basis Help us help you When you call please have the following information available Have this manual at hand The support associate will refe...

Reviews: