https://www.automationdirect.com/VFD
(VID-DR-0045)
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 RTU. To do that, just wire the Productivity Controller’s RS485 plus Terminal to the Drives SG+ Terminal, and the minus terminal goes to SG minus on the drive. The ground terminal goes to the SGND on the drive. I’ve already configured the drive for Modbus RTU using this video, so all we have to do is configure the Productivity Series Controller. I’ve already connected to the Productivity PLC so I’ll open the hardware configuration, click on my PLC and double click on the CPU. On the serial port tab, we need to make sure the RS485 port protocol matches our RS485 network. The GS4 Drive’s defaults are this, so I’ll set this CPU to match that for this demo. The rest of this is fine for this demo, so I’ll hit 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 RS485 Serial port. We want to talk to the GS4 drive at this node. And let’s add a structure for error reporting. We see in the User manual that the Modbus RTU Frequency command is at address 2331 so we put that here. The Productivity Software automatically pre-pends the required data 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 which we will set in a Dataview later. Hit OK and these tag definitions look fine. Let’s copy that rung and paste it and change it so that a new tag called Forward Command … enables a Modbus write to tell the drive to run in the forward direction. We see Drive Parameter 9.28 controls that and it’s Modbus Address is 2333 so we put that here. We’ll send a tag called Forward Data. Looks like Forward is a zero, so we’ll set that in the Dataview too. Let’s copy and paste that rung and create a contact to tell the drive to reverse direction. It’s the exact same instruction at the exact same Modbus address, we just need a tag to send the appropriate data – which again we will set to a 1 in the Dataview. Let’s copy and paste that and create a RUN command. The RS485 Run Command is at address 2332. And let’s create a Tag to hold the run data which again we’ll set to a one in the data view. And we’ll copy and paste that to create a STOP Command. That’s at the same Modbus address as the RUN command, but we’ll use a different tag for the STOP data. We’ll set that to a Zero in the data view. Let’s write that to the PLC. I’ve already created a Dataview and filled it in with the data needed to execute each command. Again, that came from the parameter description in the GS4 User Manual. I’m going to right click and bring up the data view options and I’m going to enable this auto edit 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 turn in the forward direction and to start running – sure enough, it does. Let’s reverse the direction of the drive … Looks good. And let’s 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.
Voted #1 mid-sized employer in Atlanta
Check out our
job openings