7
How to configure a Micrologix PLC for MODBUS RTU Slave 1. Start the RSLogix500 program (Programming software for MicroLogix PLCs) 2. Start a new project and select your MicroLogix processor. (MicroLogix 1100, 1200, 1400 or 1500). In this example we have used the MicroLogix 1400 PLC. We named this project as NEW PROJECT. 3. Right click on Data File and select New. A new “Create Data File” menu will open. Modify it as following picture:

˘ˇˆ˙˘ˇ ˝ - Squarespace · PDF fileMicrosoft Word - How to configure a Micrologix PLC for MODBUS RTU.docx Author: Davood Created Date: 10/15/2013 5:35:18 PM

Embed Size (px)

Citation preview

Page 1: ˘ˇˆ˙˘ˇ ˝ - Squarespace · PDF fileMicrosoft Word - How to configure a Micrologix PLC for MODBUS RTU.docx Author: Davood Created Date: 10/15/2013 5:35:18 PM

HowtoconfigureaMicrologixPLCfor

MODBUSRTUSlave

1. Start the RSLogix500 program (Programming software for MicroLogix PLCs)

2. Start a new project and select your MicroLogix processor. (MicroLogix 1100, 1200, 1400 or

1500). In this example we have used the MicroLogix 1400 PLC. We named this project as NEW

PROJECT.

3. Right click on Data File and select New. A new “Create Data File” menu will open. Modify it as

following picture:

Page 2: ˘ˇˆ˙˘ˇ ˝ - Squarespace · PDF fileMicrosoft Word - How to configure a Micrologix PLC for MODBUS RTU.docx Author: Davood Created Date: 10/15/2013 5:35:18 PM

• File: the file number can be any number from 9 to 255 (numbers 0 to 8 has already been

used by the system) in this example we have used file number 9.

• Type: the type must be integer

• Name this file as WIRELESS, it will add more clarification to the program

• Element: this number must be 2

• Leave the rest of this file setting as default and close this window.

• Now you must see the “N9 – WIRELESS” data file on the Data Files menu.

4. Double click on the “Channel Configuration” on Controller Menu

Page 3: ˘ˇˆ˙˘ˇ ˝ - Squarespace · PDF fileMicrosoft Word - How to configure a Micrologix PLC for MODBUS RTU.docx Author: Davood Created Date: 10/15/2013 5:35:18 PM

5. When the “Channel Configuration” opens, select Chanel 2 and set the parameters as shown in

following picture:

• From the “Driver” pull down menu select “Modbus RTU Slave”

• Leave the Baud as 19200

• Leave the Parity as NONE

• Leave the Stop Bits as 1

• Leave the Data Bits as 8

• Change the Node Address to 2

• On the “Modbus Data Table File Numbers” modify the “Holding Registers (4XXXX)” to 9.

This number is the file number that we have created earlier and named it as WIRELESS.

• Press Apply and then press OK to close this window.

Page 4: ˘ˇˆ˙˘ˇ ˝ - Squarespace · PDF fileMicrosoft Word - How to configure a Micrologix PLC for MODBUS RTU.docx Author: Davood Created Date: 10/15/2013 5:35:18 PM

6. On the “Data Files” menu double click on the “N9 – WIRELESS”, it will open a new window:

• Click and select the N9:0

• Give it a name as WIRELESS HEARTBEAT

• When the system is running and wireless receiver is connected to the PLC, this number

will increase by one every 15-20 msec. This number will roll over after 32767 to -32768.

Programmer can use this Heartbeat to monitor the status of the wireless receiver.

Using of this Heartbeat is optional, but is recommended.

Page 5: ˘ˇˆ˙˘ˇ ˝ - Squarespace · PDF fileMicrosoft Word - How to configure a Micrologix PLC for MODBUS RTU.docx Author: Davood Created Date: 10/15/2013 5:35:18 PM

7. Click and select the N9:1 and set it as following picture:

• Change the Symbol name to “PUSH BUTTON DATA”

• Change the Radix from Decimal to Binary

Page 6: ˘ˇˆ˙˘ˇ ˝ - Squarespace · PDF fileMicrosoft Word - How to configure a Micrologix PLC for MODBUS RTU.docx Author: Davood Created Date: 10/15/2013 5:35:18 PM

8. The N9:1 integer number will contain push buttons data. By pressing any push button on the

wireless transmitter, the corresponding bit on the N9:1 will turn on.

• N9:1/0 will represent the Push Button #1 on the Wireless Transmitter

• N9:1/1 will represent the Push Button #2 on the Wireless Transmitter

• N9:1/2 will represent the Push Button #3 on the Wireless Transmitter

• N9:1/3 will represent the Push Button #4 on the Wireless Transmitter

• N9:1/4 will represent the Push Button #5 on the Wireless Transmitter

• N9:1/5 will represent the Push Button #6 on the Wireless Transmitter

• N9:1/6 will represent the Push Button #7 on the Wireless Transmitter

• N9:1/7 will represent the Push Button #8 on the Wireless Transmitter

• N9:1/8 will represent the Push Button #9 on the Wireless Transmitter

Page 7: ˘ˇˆ˙˘ˇ ˝ - Squarespace · PDF fileMicrosoft Word - How to configure a Micrologix PLC for MODBUS RTU.docx Author: Davood Created Date: 10/15/2013 5:35:18 PM

• N9:1/9 will represent the Push Button #10 on the Wireless Transmitter

• N9:1/10 will represent the Push Button #11 on the Wireless Transmitter

• N9:1/11 will represent the Push Button #12 on the Wireless Transmitter

• N9:1/12 will represent the Push Button #13 on the Wireless Transmitter

• N9:1/13 will represent the Push Button #14 on the Wireless Transmitter

9. Programmer can use these bits as the operator commands in the PLC program.