Learn how to use the Productivity Controllers Status words to quickly debug issues with Motion. This live demo uses a Productivity 2000, but it applies to all members of the Productivity family of controllers.
Our FREE Practical Guide to Programmable Logic Controllers eBook: https://go.pardot.com/l/548202/2018-08-06/7n3v42
When setting up a motion project there are a lot of things to keep track of so it’s real easy to forget or overlook something. And when you kick off motion and nothing happens, well it can cause a lot of frustration. The cool thing about the Productivity Series of controllers is there are status words witch tells you pretty much everything you need to know about the HSO module and channel status. For example, I’ll hit this button to move this carriage forward. Oops! Nothing happened why? Well, look at the status word for the forward move. I’m going to change it to binary so it is easier to read. Bit 17 is set. Ok, if we bring up the help file for the Simple Move command there is a table that tells what every bit in that status word represents. In this case it is telling us the Target is out of range. Well, my target is set to 20 inches on my 24 inch slide, so that seems ok. Oh, look, the position limit hasn’t been set yet – it’s still at zero. The module saw that the carriage was being told to move beyond the position limit so it aborted the command. Makes sense. Let’s try another one. I changed something when we weren’t looking – let’s see if we can figure out what it is. Hit the button to start the motion in the reverse direction. That looks good. Now try the forward direction. Uh-oh. Nothing happened. What’s wrong? Look at the status word. Bit 15 is set. The table tells me we tried to go beyond the max velocity. Sure enough – I have the velocity set to 30 inches per second, but in the hardware configuration we specified a max velocity of 15 inches per second. So the module aborted the command. If we fix the requested velocity and make it 15 inches per second, now the slide works as expected and gives us a new status bit – Bit 7. That tells us the instruction completed successfully and the target position was achieved. I love that these error codes are in plane English and they tell me exactly what the problem is. In the hardware configuration there is also a module error code here and a channel status word here. It’s a good idea to keep an eye on those too. They check for higher level stuff like limit switches tripped, things like that. And watch this, if I drop a contact onto a rung and bring up a status word, I can simply append the bit I want to use like this. How cool is that, you don’t have to do any math or shifting or masking or testing of words. You just use the bit directly. So it’s super easy to check these status bits for issues in your code and then use that to turn on a light or send a message to an HMI or shut something down. The bottom line is, when your motion code doesn’t work as expected, check out these status codes first. They will usually take you right to source of the problem. And don’t forget about the High Speed Module test tool . It gives you total control over the high speed module outputs. The cool thing about that is you just tell it what to send out and it does it independent of the rest of the system. It’s a great way to verify that your hardware is functioning as expected because it bypasses all of the configuration items and ladder code. It’s also a great way to experiment with pulse counts and acceleration things like that before you start coding. There is a whole video that shows you how to use that tool so check it out! And if you need any help with your Productivity Series Controller, contact AutomationDirect’s free, award winning support team during regular business hours – they will be happy to help. And don’t forget the forums. There are lots of folks there that love to share their years of experience. Just don’t post any questions directed at AutomationDirect’s support staff there, they don’t monitor the forums on a regular basis.