https://www.automationdirect.com/retired-products (VID-POV-0019)
Learn how to connect Point of View to a CLICK PLC using Point of View's Driver Sheets.
Connecting Point of View to a CLICK PLC is easy, but there are a number of little details you need to get all lined up correctly for it to work so in this video we’ll walk through it from top to bottom and even show you how to troubleshoot things folks typically stumble over. Before we can do that we need to setup a CLICK PLC we can talk to. Here’s a blank CLICK project. Under setup we can see that port one is preconfigured to work with the programming cable which we will use to both program the CLICK and monitor the ladder logic status. I’m using this one from the AutomationDirect website. Note that this port is Node 1. Port 2 is setup with the exact same parameters. THE only difference is we’re making this one port 2. Hit OK, make sure we have an END in the ladder logic and transfer this configuration to the CLICK PLC. So our setup looks like this. We have one USB to Serial cable connecting the CLICK software to the CLICK PLC on port 1 from com port 4 on the PC, and another USB to serial cable which Point of view will use to talk to the PLC on port 2 from com 5 on the PC. That allows us to run both apps at the same time, since two apps can’t use the same serial port. So all that’s left is to setup Point of View. We have to do three things: 1. Setup the driver sheet; 2. configure the serial port for that driver sheet, and 3. create an app to do something down on the click – we’ll toggle output Y1 for our simple demo. Here we go … To tell Point of view where to find things on the CLICK, we create something called a driver sheet which is just a table. That’s under the communications tab of the project explorer, right click the drivers folder, and add a driver. We’ll be talking to the CLICK via ModBus RTU so we select that driver and hit OK. Open that folder and double click on the driver sheet. This is the table we need to fill in to tell Point of View where to find everything on the CLICK. We can give it a name – how about CLICK Demo. We can control when Point of View updates the tags in this list by putting a tag or an expression here – we’re gonna leave that blank for this demo which says access the tags at all times. We do want to keep an eye on read and write errors so we’ll add a ClickReadStatus tag here, yes we do want to create this new tag and a ClickWriteStatus tag here, and yes we want to create that tag. This min max check box changes these two columns to min and max which are used to automatic scaling via properties dialog for that tag. Or if you leave it unchecked you can do the math right here. We’ll cover both of those methods in a separate video on scaling. Now we just tell point of view what we want it to have access to. In this demo we just want to toggle output Y1 directly. So let’s be real creative and call it Y1. That’s the name point of view will use locally. Then we tell it which node address to go look at, in this case we setup port 2 on the CLICK to be node 2 so we put that here. And finally, we tell point of view exactly which memory location we want to access. If we go to help, communications, Modbus – We see this I/O address needs to be in this format: Type, colon, Signed or Unsigned – these curly braces mean that’s optional, the actual address and optionally specify which bit you want to read if you are reading a register. If you are reading strings, then use this format. This is a list of all the “Types” this driver supports. In Modbus you usually deal with 4 types of registers, 0 thousand addresses are for discrete outputs coils, 10 thousand addresses are discrete inputs, 30 thousand addresses are analog inputs or word inputs and 40 thousand addresses are analog outputs or word outputs. We want to drive Y1 which is a discrete output, so that’s in the zero thousand address range, so we want a 0X colon from this chart. We want the address of the Y1 output on the CLICK CPU so we just go to the address picker, tell it we only want to see the Y outputs starting at Y1. Here’s the trick. Click on this check box and the CLICK software tells you exactly what the Modbus address of that memory location is and which function codes can be used with that address. Looks like Y1’s modbus address is 8193 so back in the driver sheet we put that here. We want to have read and write access to this output and we specify if we want the memory location to scanned at all times, only when the screen it is used on is active or let Point o View figure out when it thinks it is important to scan this tag. We’ll leave it at always for this demo. You would do the exact same thing for any other memory addresses you want to access on the CLICK, just keep adding them to the table. This is all we need for now, so we can check off step 1. To configure the serial port so we can talk to the CLICK, just right click on the Modbus driver folder, settings. The cable we are using is plugged into com port 5 on the PC. We want the rest of this to match the numbers we put in port 2 of the CLICK, here’s a copy of that dialog from the CLICK software so we just make sure the baud rate, the data bits, stop bit and parity are all the same as what’s on the CLICK PLC. Were using a discrete I/O bit in this example, so signed un-signed doesn’t matter and we are using ModBus RTU. If you need to swap bytes or change the block size, do that here. Great, that takes care of step 2. New we just create a screen and use it! Graphics tab, right click on screens, Insert. Let’s drop a push button on the screen and tell it to use our new Y1 tag for both the command and to control the action of the graphic. Let’s also add a text box for the read status tag we created and anpother one for the write status tag we created. Save all, run it. And sure enough if we push the button here in point of view, the CLICK PLC’s output Y1 responds. Perfect. By the way, best practices dictate that you never do this in a real project – you would never want to control a PLC output directly from Point of View – you would normally control a TAG on the PLC that controls the output – that keeps the local PLC ladder code in charge and is a much safer way to run your system. We just did it here because it demonstrates that Point of View has access to ANY Modbus addressable register on the PLC. To control any other memory location we would just go back to the CLICKs address picker, enable the Modbus view and pick the Modbus address of the memory location we want access to. Easy. Let’s intentionally add an issue just so we can see how to debug it. Let’s go back to the driver sheet and pretend we forgot to tell point of view to go to node 2 on the Click. Save all, run it. Ahh, look – we get a -15 error. To decode that we go to Help, Communication Drivers, Modbus driver. Go to the trouble shooting section and scroll to error -15. We’re getting a timeout and the chart gives us several things to go look at. One of which is Wrong Station Number – exactly what we did. So you can see how incredibly important it is to keep an eye on those status messages – they do a great job of identifying the issue and help you get up and running quickly. We’ve been using the main driver sheet in this video, which most of the time is all you will ever need because it can talk to any click on the system and any memory type on that click plc. But, if you need more control over when the tags are triggered or updated, then there is also the Standard driver sheet. Once you have your Modbus driver in place, just right click the folder to insert a standard driver sheet. It’s the exact same thing where you fill in the local tag name and the address to go fetch it from on the CLICK, but this kind of driver sheet can only talk to one CLICK and one memory type on that CLICK so you set that CLICK’s node address here and the memory type here since they are the same for every entry in the table. In the main driver sheet you set those for each entry in the table because each entry could be to a different CLICK and memory type. The good news is because the standard driver sheet can only talk to one click and one memory type, you can get VERY specific on how the tag updates are triggered using these fields up here. Just put a tag or expression here to control the behavior of the driver sheet. You can have up to 999 of these Standard driver sheets so you could create on for each CLICK and memory type in your system. Well, that ought to be enough to get Point of View communicating with your CLICK PLC. If you have any question, please contact AutomationDirect’s FREE, award winning tech support during regular business hours – they will be happy to help you. And don’t forget the forums – there are lots of folks there that love to share their years of experience. Just don’t post and questions directed at Automationdirect’s support staff there, they don’t monitor the forums on a regular basis.
Voted #1 mid-sized employer in Atlanta
Check out our
job openings