Learn how to use the PLC to control the GS4 Variable Frequency Drive Run, Stop and Frequency 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
To program the drive’s built-in PLC, you will need the drive’s programming software GSLOGIC. Which you can download for FREE from the AutomationDirect website. Search for GSLogic, click the download link and there it is. Go ahead and install it, but before you run it, make sure the Drive configuration software - GSoft2 - isn’t running. They both talk to the drive as masters so they can’t co-exist on the same RS485 network. I’m using this USB to RS-485 adapter for that RS485 connection. Plug one end into the PC and the other end into the modular jack on the drive. There are two 485 ports – either one works– they’re wired in parallel so you can daisy chain the drives on the RS485 network. Go ahed and apply power to the drive if you haven’t done so already. Let’s reset both the PLC and the Drive to factory default to make sure we are starting at the exact same place. You do that with parameter 9.08, but I can never remember that, so here’s the trick I use. Go to the quick start menu, basic configuration, and scroll back one. Look! There’s the reset parameter – 9.08! Let’s reset the PLC. Uh-oh. Got an error. What happened? Well, look here – the PLC was still in stop mode – which means the PLC is active. You can’t reset the PLC while it’s running, so go ahead and clear the fault. Go to the main menu, scroll down to PLC and make sure it is disabled. Great. This time I’ll go directly to parameter 9.08 scroll to number 6 and reset the PLC. Did you see the END flash up on the screen? That tells us the reset was successful, so be sure to watch for that. If you don’t see the END, then the reset didn’t take. Ok, Scroll up to 10 to reset the Drive. I saw the END so I know the drive got reset. Perfect. Great – our systems should be the same now, so let’s do an example. Launch the GSLogic software and setup the communications parameters. The drive defaults to 8 bits, no parity, 1 stop bit and 9600 baud. And the PLC’s default address is always a 2. How do you know which com port that USB to 485 converter is using? Easy, just click on this button and select the silicon labs UART bridge. Mine is using this com port, yours will probably be different. Finally, we want to talk via Modbus RTU so select that and hit OK. Start a new program and enter a Program Name and a File Name. The File name is the one you will see on disk. Let’s add a contact and use an M bit to control it. M bits are just general-purpose bits in the PLC. Let’s have that drive and output coil for output Y3. Finally, we need an END instruction, so select the instruction icon. You can locate it in the tree over here or drop down her or just type it in. This help button tells you all about the instruction. Great, this program does nothing but it is enough for us to test things. You can hit the compile button to check for errors, but when you hit the Write to PLC button and hit OK, it prompts you anyway. Yes, we do want to compile the program. Oh-oh – what’s going on here? The program can’t find the PLC. And if you wait long enough you’ll get a Comm error. Well, remember, the PLC has to be enabled for us to talk to it and we disabled it back when we reset the PLC, didn’t we? So, let’s bring up the menu, scroll down to PLC and enable it by putting it in stop mode. You can always tell if the PLC is enabled by looking up here. If you don’t see anything, the PLC is not enabled and you’re not going to be able to talk to it. Ok, the PLC IS enabled, so let’s try that Write to PLC again. No errors. No complaints. Perfect.. Let’s go online with the PLC so we can see what’s going on. Down here we can see our scan time and we’re only using 3 of 10,000 steps available in our code. This blinking LED is indicating communications with the PLC, we see the PLC is in STOP mode, the com settings we are using, and the address of the PLC we are talking to. Let’s hit the RUN button. This dialog is telling us this is just temporary. If we want the PLC to start running on power up we need to do that from the keypad. This is fine for our little test so hit ok and we see the PLC is now running. Click on this guy to monitor and change registers. We want to monitor Register M0. This is the number of sequential registers we want. If we put a 10 here then the display will be populated with registers M0 through 9. We just want this one register for now so this is fine. This tells me M0 is currently off. To change it, just right click and set it to on. And sure enough, we see Y3 turn on. We can also see the output is active in Parameter 3.47 - the digital output status word. If we right click and toggle the M bit off, sure enough the status word reflects that. Perfect. And don’t forget – because we used Y3 in the ladder code the corresponding Drive output is no longer active as long as the PLC is enabled. An active PLC always wins control over any I/O’s it is using. Notice that while you are on-line you can’t do any of this stuff. You’ll need to close the monitor window and go off-line to get access. That ought to be enough to get you going. There tons of examples the installer puts in Documents, AutomationDirect, Examples. When you open them, make sure the view comments button is on so you can see what each line is doing. These are register comments that describe each parameter. Click here to edit just the comment. The row comment describes the intent of the entire row and you can edit row comments in bulk – I love that. And look at this. If you insert a blank row, you can add a segment comment so you can describe chunks of ladder code. That’s a great way to help organize your code. Go to Atuomationdiret.com/videos and search on GS4 to see all the latest GS4 video tutorials. We will be adding GS4 PLC videos that walk through the examples, so search on GS$ PLC Videos to see those once we post them. 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 AutomationDirect’s YouTube Channel so you will be notified when we post new videos.
Voted #1 mid-sized employer in Atlanta
Check out our job openings