https://www.automationdirect.com/productivity (VID-P2-0021)
Learn how to use the Productivity Controllers SPOS Instruction to set the current position to any value you want. 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://www.automationdirect.com/ebooks/plc-handbook
The High Speed Output module keeps track of every pulse sent out independent of the main processor. That includes any pulses sent out via your project OR the High Speed Module test tool. You can see that here. If I enable the motor, pulse count changes accordingly. And the only way to change that and that is with the Home instruction or the Set Position instruction. Let’s add a Set Position instruction for that channel we were just playing with. The instruction reminds you that this channel uses this HSO module and is this channel number. We’ll create a structure so we can easily modify the position in the dataview or ladder code. You can also use this instruction to set the backlash direction. You would typically use this to set the initial backlash direction when initializing the system. We don’t need it for this demo so we’ll leave it at no change. And you can add an instruction comment if you want to. That’s it. We want to be able to specify a fractional position so let’s change this to a floating point. Let’s add a contact so we can control that … and send it down to the processor. Put the processor in RUN mode, and bring up a dataview. Let’s add the enable bit and the shaft position. I should mention that we’re using the same hardware configuration as we used in the video on the Velocity Move instruction, so check that out if you want to see how we have this setup. The main thig to notice is the shaft position is in revolutions per second not pulses and since I have been playing with it, it’s already at this many revolutions. If we drop into the High speed test tool – we have to stop the processor to use it - we can see that position corresponds to this many pulses. If we enable the motor the pulse count increases. And if we exit this and re-enable the processor the dataview is updated accordingly. The key point here is every pulse that exits the HSO Module – regardless of who generated it - is accounted for in this position tag. So let’s add the set position structure we created to the data view, and change the position to 2. Two what? Two revolutions – remember, once you setup the units in the hardware configuration EVERYTHING in the entire project works in those units. The only exception to that being the High Speed Test tool which is completely independent of your project and is always in pulses. If we enable the Set Position command, sure enough the current shaft position changes to two revolutions. AND if we look at the high speed test tool, it shows us that the unconverted pulse count – not revolutions - has also been modified accordingly. We’ll, that’s really all there is to it. If you need any help with the productivity series controllers, contact AutomationDirect’s Free, award winning, support team. 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 team there. They don’t monitor the forums on a regular basis.
Voted #1 mid-sized employer in Atlanta
Check out our
job openings