|AutomationDirect Live Chat|
Learn how to quickly control a GS4 Variable Frequency Drive via Modbus RTU in this live tutorial Video/Demo from AutomationDirect.com.
In part 1 we saw how to setup the GS4 Drive to read and write parameters via Modbus RTU. In this video, we’ll learn how to command the drive to run, stop and change frequency, using the same Modbus Poll application we used in part 1. Before we do that though, it’s really important to understand that the GS4 drive has two control paths, LOCAL and REMOTE. You can see which mode you are in here, and switch between them by pressing these buttons. LOCAL, REMOTE. You would typically set the LOCAL control mode to be the keypad or maybe switches and potentiometers that are local to the drive and you typically set the REMOTE control mode to be Modbus RTU, Modbus TCP, EtherNet/IP, etc. so you can control the drive remotely from another controller. Well, now that we know there are two control paths, all we have to do is tell each one what we want it to do. Run/Stop is a binary on off digital thing, so that is under the digital parameters menu where we can set the remote or local mode. In the REMOTE mode, we can set the remote mode to be controlled: locally by the keypad, locally by the drives terminal strip for push button control with the keypad stop enabled or disabled, RS485 with the keypad stop enabled or disabled, or the optional com card if we want to use Modbus TCP or EtherNet IP. Again, you can select if you want the keypad stop enabled or disabled. We are doing Modbus RTU so we want to control the drive via RS485 and let’s keep the keypad stop enabled so we can force the drive to stop via the keypad even if it is being controlled remotely. Parameter 3.1 is the same thing and has the exact same options but it’s for LOCAL control. Let’s have the Keypad be our local control. So, we just setup Remote and local control for Run Stop. Now let’s do the same thing for controlling the frequency. Frequency is an analog thing, so we go to the analog menu and sure enough we see there is a Remote and Local setting for the frequency control. We can set the frequency control to be from Keypad, RS485, Analog input, the drive’s terminal strip, or the com card for Modbus TCP or EtherNet/IP. Let’s set the REMOTE frequency control to the same RS485 that we used for on/off control. Exit out of that and then set the LOCAL Frequency control to be from the keypad. Normally, if you press LOCAL the drive will do whatever the local input tells it to do and if you press REMOTE the drive will do whatever the REMOTE command is telling it to do. But, you CAN modify the behavior transition between the two with parameter 3.58. We won’t go into that here, but just wanted to make you were aware that you can specify how that transition between local and remote is made. Well, that’s it. You just tell the drive that you want to accept remote commands over the RS485 channel. So if we bring up the Modbus Poll app that we used in the previous video we should be able to control the drive. These are the parameters you need to change the frequency, run/stop and direction when using Modbus RTU. We see that P9.26 is this decimal address. It’s important to remember this table is showing the base address plus 1 convention for Modbus Addresses. So, in Modbus poll, we’ll tell it to use the plus one convention and then enter the 2331 address here. Modbus Poll adds the correct transaction type for us. And it looks like it’s defaulting to a polling rate of 1 per second – that’s fine for us. Let’s label the fields to remind us what each one is. I’m still connected to the drive from the previous video, but if you aren’t then go ahead and do that now by going here. We see the packet count increasing at the 1 second rate we specified and the frequency value here matches the frequency value on the display, so we know we are connected to the drive. Perfect. If you are not seeing that, then make sure the drive is set to accept REMOTE commands by pressing the remote button. Double click on the frequency and change it. We only want to write to this single Frequency register so hit Send. Sure enough, the frequency is updated on the main display. We can also see that parameter 9.26 also got updated. Let’s set the direction to reverse … and tell the drive to run … and sure enough the drive ramps up to speed. Let’s issue a Stop Command and sure enough the drive ramps down to a stop. Just for fun, let’s put the drive in local mode and try to change the frequency. Look we got an illegal data value and we also saw the red error light blink. I’ll do that again so you can see the light blink. Those are both indicators that we did something wrong. Of course, in this case we didn’t have the drive in Remote mode. So, flip it back and now the command is accepted. Perfect. So, In addition to the stuff we did in the first video, all we did was set the digital and analog controls to RS485 and wrote to these registers to control the rive remotely. Click here to learn more about the GS4 Drive. Click here to learn about AutomationDirect’s free support options and click here to subscribe to our YouTube channel so you will be notified when we publish new videos.