Gs2 PDF
Gs2 PDF
Gs2 PDF
COMMUNICATIONS
5
In This Chapter...
Communication Parameters Summary . . . . . . . . .5–2
GS2 Status Addresses . . . . . . . . . . . . . . . . . . . . .5–4
Communicating with DirectLogic PLCs . . . . . . . .5–5
Communicating with Third-party Devices . . . . .5–16
Chapter 5: GS2 MODBUS Communications
Communications
GS2
Description Range Default
Parameter
P 9.00 Communication Address 01 to 254 01
00: 4800 baud
01: 9600 baud
P 9.01 Transmission Speed
02: 19200 baud
01
03: 38400 baud
RS-485
An RS-485 network cable can span up to 1000 meters (4000 feet). However, most
DirectLOGIC PLCs require an FA-ISONET (RS 232C to RS422/485 network adapter)
in order to make this type of connection. For an RS-485 connection, set the GS2 DIP
switches SW2 and SW3 to RS485.
RJ-11 Serial Comm Port RS485
RS-485 Interface Switches SW2 and SW3
2: GND must be set to RS485 for
3: SG-
6 1 an RS-485 connection.
4: SG+ SW3 SW2
5: +5V RS232
Use the following wiring diagrams to connect your DirectLOGIC PLC to a GS2
Series AC drive with an RS-485 interface.
Note: If an FA-ISONET module is used in your connection, make sure the jumpers are
set for RS485 communications.
FA-ISONET
FA-ISONET
25 FA-ISONET
Note: The previous list of parameter settings are the minimum required to communicate
with a DirectLOGIC PLC. There may be other parameters that need to be set to meet
the needs of your application.
Note: For instructions on MODBUS Configuration for your specific CPU, refer to the
appropriate CPU User Manual.
Note: The DL250 network instructions used in Master mode will access only slaves
1 to 90. Each slave must have a unique number.
Note:This program is for illustration purposes only and not intended for a true application.
DirectSOFT
SP116 CNT
1 Comm transaction count
CT0
_FirstScan
SP0 K9999
Note: SP116 and SP117 are special relays in the DirectLOGIC CPUs that monitor the
PLC’s commnunications. SP116 is on when Port 2 is communicating with another
device. SP117 is on when Port 2 has encountered a communication error.
SP117 CNT
2 Comm error count
CT1
_FirstScan
SP0 K20
_1Minute
SP3
Block Transfer
There is a group of block transfer parameters available in the GS2 AC drive (P 9.11 to
P 9.25). This contiguous block of parameters can be used to "group" miscellaneous
parameters throughout the drive. This will allow you to update these miscellaneous
parameters in one block instead of having to use multiple WX or RX commands.
For example: If you need to change the PID setpoint (P 7.11), accel time (P 1.01),
decel time (P 1.02), and multi-speed 1 (P 5.01), this would typically take three
different WX commands because the parameters are non-contiguous. If you set
P 9.11 to P 7.11, P 9.12 to P 1.01, P 9.13 to P 1.02, and P 9.14 to P 5.01, then all of
these parameters could be controlled using one WX command.
Rung 5 writes the values from V2000 to V2023 to the drive parameters P 9.11 to
P 9.25. In the WX box, the value is V4413. 4413 is an octal number like all addresses
in the DirectLOGIC PLCs. If you convert 4413 octal to hex, you get 90B. 90B is the
address for parameter P 9.11.
Note: Refer to your PLC User Manual for more specifics on MODBUS addressing and
address conversions.
SP116 C100 LD
5 Kf101
LD
K40
LDA
O2000
WX
V4413
C100
( SET )
Rung 6 is used to read the status of the GS2 AC drive. These instructions read the
values from the GS2 status addresses, 2100 to 2105, and places the values into
the PLC memory addresses, V3000 to V3005.
Notice the number in the RX box - V20400. 20400 is an octal number as are all
address references in the DirectLOGIC PLCs. 20400 octal converted to hex gives
you 2100 - the first status address for the GS2 AC drive.
Note: Refer to your PLC User Manual for more specifics on MODBUS addressing and
address conversions.
SP116 C100 LD
6 Kf101
LD
K12
LDA
O3000
RX
V20400
C100
( RST )
Note: Refer to your PLC User Manual for more specifics on MODBUS addressing and
address conversions.
If you only want to control the start/stop and speed reference of the drive, simply change
the number of elements to K2 and the slave memory address to 42331. Then V2000
would be your speed reference location and V2001 would be your start/stop location.
SP116 C100
5 MWX
Port Number: K2
Slave Address: K1
Function Code: 16 - Preset Multiple Registers
Start Slave Memory Address: 42316
Start Master Memory Address: V2000
Number of Elements: K20
Modbus Data type: 584/984 Mode
Exception Response Buffer: V5000
C100
( SET )
Rung 6 is used to read the status of the GS2 AC drive. These instructions read the
values from the GS2 status addresses, 2100 to 2105, and places the values into
the PLC memory addresses, V3000 to V3005.
The Start Slave Memory Address in the MRX box is 48449. 48449 is a MODBUS
decimal number. To convert 48449 decimal to hex, you first subtract 40001, and then
convert the remainder to hex (2100). 2100 is the address for the GS2 Status Monitor.
SP116 C100
6 MRX
Port Number: K2
Slave Address: K1
Function Code: 03 - Read Holding Registers
Start Slave Memory Address: 48449
Start Master Memory Address: V3000
Number of Elements: K6
Modbus Data type: 584/984 Mode
Exception Response Buffer: V5005
C100
(Cont. next page) ( RST )
Rung 11 loads a value of 1 into drive parameter P 9.27. This is the signal to run.
V2020 is the 17th V-memory register in the block of 20 that is being written to in
the WX instruction in Rung 5.
X0 LD
11 K1
OUT
V2020
Rung 12 loads a value of 0 into drive parameter P 9.27. This is the signal to stop.
V2020 is the 17th V-memory register in the block of 20 that is being written to in
the WX instruction in Rung 5.
X0 LD
12 K0
OUT
V2020
X1 LD
13 K150
BIN
OUT
V2017
Rung 14 loads a decimal value of 300 into drive parameter P 9.26. The BIN
instruction converts BCD/HEX to decimal. This tells the drive to run at 30.0Hz.
X2 LD
14 K300
BIN
OUT
V2017
Rung 15 loads a decimal value of 450 into drive parameter P 9.26. The BIN
instruction converts BCD/HEX to decimal. This tells the drive to run at 45.0Hz.
X3 LD
15 K450
BIN
OUT
V2017
X4 LD
16 K600
BIN
OUT
V2017
Rung 17 sets the motion of the drive to forward by loading a value of 0 into
parameter P 9.28. V2021 is the 18th V-memory register in the block of 20 that is
being written to in the WX instruction in Rung 5.
X6 LD
17 K0
OUT
V2021
Rung 18 sets the motion of the drive to reverse by loading a value of 1 into parameter
P 9.28. V2021 is the 18th V-memory register in the block of 20 that is being
written to in the WX instruction in Rung 5.
X7 LD
18 K1
OUT
V2021
19 ( END )
20 ( NOP )
RS-485
An RS-485 network cable can span up to 1000 meters (4000 feet). For an RS-485
connection, set the GS2 DIP switches SW2 and SW3 to RS485.
The GS2 Series AC drive communication address is specified by P 9.00. The third
party device then controls each AC drive according to its communication address.
The GS2 Series AC drive can be setup to communicate on standard MODBUS
networks using the following transmission modes: ASCII or RTU. Using the
Communication Protocol parameter (P 9.02), you can select the desired mode,
data bits, parity, and stop bits. The mode and serial parameters must be the same
for all devices on a MODBUS network.
Data Format
ASCII Mode: 10-bit character frame (For 7-bit character):
P 9.02 = 00 (7 data bits, no parity, 2 stop bits)
Communication Protocol
ASCII Mode:
STX Start Character: (3AH)
ADR 1
ADR 0
Communication Address: 8-bit address consists of 2 ASCII codes
CMD 1
CMD 0
DATA (n-1)
Contents of data: n x 8-bit data consists of 2n ASCII codes. n[]25
.......
maximum of 50 ASCII codes
DATA 0
LRC CHK 1
LRC check sum: 8-bit check sum consists of 2 ASCII codes
LRC CHK 0
END 1
END characters: END 1=CR (0DH), END 0 =LF (0AH)
END-0
RTU Mode:
START A silent interval of more than 10 ms
ADR
Communication Address: 8-bit address
CMD
DATA (n-1)
....... Contents of data: n x 8-bit data,n<=25
DATA 0
CRC CHK Low
CRC check sum: 16-bit check sum consists of 2 8-bit characters
CRC CHK High
END A silent interval of more than 10 ms
RTU mode:
Command Message Response Message
ADR 01H ADR 01H
CMD 03H CMD 03H
Starting data 21H Number of data 04H
address 02H (Count by byte)
END 1 CR END 1 CR
END 0 LF END 0 LF
RTU mode:
This is an example of using function code 16 for writing to multiple registers.
RTU Mode:
Response Message
ADR 01H
CMD 03H
Starting data 21H
address 02H
Number of data 00H
(Count by word) 02H
CRC CHK Low 6FH
CRC CHK High F7H
Note: When transmitting the CRC value in the message, the upper and lower bytes of
the CRC value must be swapped, i.e. the lower order byte will be transmitted first.