To learn more: https://www.automationdirect.com/ls-electric-plc?utm_source=GaC1pulM4-k&utm_medium=VideoTeamDescription
(VID-XG-0091)
LS XGB Help File Video: LP201-1
XG5000 V4.77 2024-06-28
To view the LS XGB Help File please visit: https://cdn.automationdirect.com/static/helpfiles/ls_plc/Content/Home.htm
**Please check our website for our most up-to-date product pricing and availability.
Related AutomationDirect.com Part Numbers: N/A
The XGB PLC offers many ways to communicate over EtherNet. The on-board EtherNet port is referred to as the “Internal FENet,” and allows Modbus/TCP and XGT protocols. For Modbus/TCP, the PLC allows configuration as both a Modbus Slave and Master. In LS documentation Modbus Slave is also called Modbus Server, and Modbus Master is also called Modbus Client. The Modbus Server and Client functions for the XGB PLC can share up to 16 concurrent connections. Let’s set up the XGB PLC as a Modbus server. The first step is to set the TCP/IP settings. To do this we will go to the “Project Window” on the left side of the screen and double-click on “Internal FEnet.” This will open the “Standard Settings – FEnet” pop-up window. Here we can set our IP address, Subnet Mask, Gateway, and DNS Server if needed. We can also use DHCP to allow a local DHCP server to automatically configure the IP settings for the PLC. Using DHCP can lead to potential network routing or unintentional IP address issues so be careful when enabling this setting. Once we configure these settings, we are ready for the Modbus/TCP configuration. If we are using the PLC as a Modbus Server, we can go to the “Server Mode” drop down and set it to “Modbus Server.” We also use the “Number of Dedicated Connection” field to set the number of connections that will be reserved for external Modbus clients with our PLC acting as the server. We will leave this at the default of 3. We can then click the “Modbus Settings” button and the “Modbus Settings” window will open. In this window we can configure the starting addresses that can be accessed for bit and word read and write information from an external Modbus client. The “Bit Read Area Address” will be the internal memory location starting address that will be accessible from a Modbus function code 2, “Read Input Status.” The “Bit Write Area Address” will be the internal memory location starting address that will be accessible from a Modbus function code 1, “Read Coil Status”, code 5, “Force Single Coil,” or code 15, “Force Multiple Coils.” The “Word Read Area” will be the internal memory location starting address that will be accessible from a Modbus function code 4, “Read Input Registers.” The “Word Write Area” will be the internal memory location starting address that will be accessible from a Modbus function code 3, “Read Holding Registers,” code 6, “Preset Single Register,” and code 16 “Preset Multiple Registers.” Let’s set our “Bit Read Area Address” to %MX0, and our “Bit Write Area Address” to %MX100. We will then set our “Word Read Area” to %MW100, and our “Word Write Area” to %MW200. The direct variables listed here will be accessible at the first Modbus offset address and will increment with each offset. For example, if we wanted to read %MX2, or %MW102, they would both be available to the Modbus client at the 3rd offset address using the corresponding function code. We select OK, and then OK again to confirm the configuration change. We can then write this change to the PLC and go into monitor mode. We have a Do-More BRX PLC configured as a Modbus client connected to our XGB PLC. Let’s add %MX100 and %MW200 to our Monitor 2 window and display the data as an unsigned decimal. If we write the first Modbus coil in the BRX to true, we see %MX100 go true. If we write 1000 into the first Modbus register in the BRX, we see %MW200 show 1000. Changing the function code would allow us to read data from the XGB in those ranges or the %MX0 and %MW100 ranges.
Voted #1 mid-sized employer in Atlanta
Check out our
job openings