Learn how to connect a Productivity Series PLC to a GS4 Variable Frequency Drive (VFD) via Modbus TCP in this live tutorial Video/Demo from AutomationDirect.com.
Our FREE Practical Guide to Programmable Logic Controllers eBook: https://www.automationdirect.com/ebooks/plc-handbook
We want a Productivity Series controller to control a GS4 Variable Frequency Drive over Modbus TCP. I’m using a little test network in my office with these IP Addresses. Your IP Addresses will probably be different. You will also need to install the optional GS4 Modbus TCP com card in the drive to connect the drive to the Ethernet Network via Modbus TCP. I’ve already configured the drive for Modbus TCP using this video, so all we have to do is configure the Productivity Series Controller. I’ve already connected to the PLC so I’ll open the hardware configuration, click on my PLC and double click on the CPU. On the Ethernet Ports Tab, I just need to set the IP Address of this CPU to be compatible with my network, which as we saw on the opening slide was at this IP Address. The rest of this is fine, so I’ll it OK. Great – now we just start writing instructions. Let’s create a contact to tell the drive to change speed. And that will issue a Modbus Write instruction. We’re using the Ethernet port. We want to talk to the GS4 drive at the IP Address we had in that diagram a second ago. Let’s add a structure for error reporting. We see in Appendix B of the GS4 User manual that the Modbus TCP Frequency command is at address 8194 so we put that here. The Productivity Software automatically pre-pends the required 40 that Modbus needs when we tell it what kind of write we are doing. We are writing to a single register – you can see the 40 appeared up here - and we’ll send the value in a Tag called Frequency_data. Hit OK and these tag definitions look fine. Let’s copy and paste that rung and change it so that a new tag called Run Forward Command will enable a Modbus write to tell the drive to run in the forward direction. In that table in Appendix B of the GS4 user manual we see that address is 8193 so we put that here. We’ll send it a tag called Run Forward Data. The table tells us we’ll need to set that to a 12 hex in the Dataview in a minute. Let’s copy and paste that rung and create a contact the runs in reverse. It’s the exact same instruction at the exact same Modbus address, we just need a tag with the appropriate bits set to tell the drive to run in reverse. Again, we’ll set that up in the Dataview in just a minute. And we’ll copy and paste that one more time to create a STOP Command. That’s at the same Modbus address, but we’ll use a different tag for the bit pattern to tell the drive to stop. Let’s write that to the PLC. I’ve already created a Dataview and filled it in with the bit patterns needed to execute each command. Again, those came from that Modbus TCP table in Appendix B of the GS4 user manual. I’m going to enable auto edits for the data view so I don’t have to write each edit individually. Let’s set the frequency to 33 Hz and send it via ModBus. Sure enough, the drive got it. Let’s change the frequency to 55 Hz and send that. Yep the drive got that too. Let’s tell the drive to run forward. Let’s tell the drive to run in reverse. Looks good. Tell the drive to stop. Perfect. That ought to be enough to get you going. Click here to learn more about the GS4 Drive. Click here to learn about AutomationDirect’s free support options. Click here to subscribe to AutomationDirect’s YouTube channel so you will be notified when we publish new videos.