Posted 21 Jan 2018 Hi All, I'm new to PLC programming and need some help with a project! I have built a indexer for a grinding machine with the following specification....... Stepper servo motor that needs 10000 pules per revaluation. Gearbox with 3.6:1 ratio. 3600 PPR quad encoder fitted to the indexer main shaft 1:1 ratio . Omron CP1H PLC I need to control the servo closed loop using the 3600 line encoder for feedback. Does any one have any suggestions????? Thanks Tim Share this post Link to post Share on other sites
Posted 22 Jan 2018 (edited) There are a few steps to accomplish this. Have you wired it up? What are you having trouble with? Edited 22 Jan 2018 by IO_Rack Share this post Link to post Share on other sites
Posted 22 Jan 2018 Hi, Thanks for your reply. Yes its wired up but I have no experience of CX programmer or ladder programming for that matter! Ideally I would like an example ladder showing how its done????? Regards Tim Share this post Link to post Share on other sites
Posted 22 Jan 2018 https://www.myomron.com/index.php?article=1474&action=kb The above article may help you out and show you the steps involved in getting your application going. Here is some general information on programming the CP1H.http://accautomation.ca/omron-cp1h-system-hardware/https://www.youtube.com/playlist?list=PL3y71jAPOdZD6WfrdjilDKMWXTStphw2Y Hope this helps you out. Regards, Garry Share this post Link to post Share on other sites
Posted 24 Jan 2018 (edited) Hi Gary, Thanks for the links! I've found the youtube videos very helpful on getting started. Regarding my indexer, would it be possible to use SPED(885) to output a constant pules train to my servo drive then use CTBL(882) to stop the servo when the shaft encoder reached the desired angle (pules count)????? Regards Tim Edited 24 Jan 2018 by Tim Woodward wrong picture Share this post Link to post Share on other sites
Posted 24 Jan 2018 Hi Tim, I would try that suggestion to see if the unit runs. Usually I use the PLS2(887) instruction. It will output the number of pulses that are required with the acceleration and deceleration rates. Regards, Garry Share this post Link to post Share on other sites
Posted 24 Jan 2018 Hi Gary, At the moment I've got my 3600 PPR encoder connected to the high speed input and displaying in degrees 360.00000 If I want my indexer to turn 180 degrees the servo drive needs 18000 pules If I output the 18000 pules the servo turns and stops but the shaft encoder is displaying 190.12001 due to the gear train inaccuracy (gears are not ground) What do you think is the best way to correct this error? I see that PLS2(887) has the ability to change the target position? Regards Tim Share this post Link to post Share on other sites
Posted 24 Jan 2018 Hi Tim, Is the position where you want it? If so then I would zero the current counter postilion. (MODE CONTROL: INI(880)) If the error will be accumulative then I would use the PLS2(887) instruction with a specified target with the error built in. Another way to look at it would be to zero the origin on a signal into the PLC. Regards, Garry Share this post Link to post Share on other sites
Posted 24 Jan 2018 Hi Gary, No, the position isn't where i want it! in this instance the position is 190.12001 degrees but I need it to be exactly 190.0000 degrees. Some how I need to output steps to correct the error????? Regards Tim Share this post Link to post Share on other sites
Posted 25 Jan 2018 (edited) What is the specification on your stepper drive? Edited 25 Jan 2018 by IO_Rack Share this post Link to post Share on other sites
Posted 25 Jan 2018 If you already know how many pulses you require for one (precise) revolution, then you'll have to calculate the gear ratio and factor that into your number of output pulses. Share this post Link to post Share on other sites
Posted 25 Jan 2018 Hi, Thanks for the reply! My servo need 10000 pulses per revolution and the gear ration is 3.6:1 so 36000 pulses to turn the indexer shaft 1 revolution BUT because the gears are not 100% accurate there is a cyclic error. If we exaggerate the gear as a slight egg shape its possible for there to be an error depending on what part of the gear (egg) its on. Also add into this expansion and the viscosity of the oil between the teeth and its possible to get a small error. Ideally I need to drive the servo using feedback from the encoder fitted to the shaft. The same way as the system works on a lathe that has a timing belt driven ballscrew with an encoder on the ballscrew. Regards Tim Share this post Link to post Share on other sites