Sign in to follow this  
Followers 0
denise01

Programming Incremental Encoder

4 posts in this topic

Hello,

I have been tasked with improving the speeds of our Seaming machines. These machines seam a tin plate end on to a tin plate sweet tin eg Quality Street. I have fitted a E6C2-CWZ5B Incremental Encoder onto the shaft of the machine and plan to fit a CJ2MMD212 Pulse IO Module to our existing CJ2M PLC.

I have never programmed encoders before but realise that the Z Phase is used for finding the origin as only gets an output once per revolution. I basically need to produce various outputs that will energise pneumatic solenoids in order to feed the ends etc and to eject the sweet tin body once seamed. I understand that this is done by using pulses generated by the encoder and looking at the manual it seems to suggest using PULS(886) for comparing the pulse to produce an output against the pulse being generated by the encoder. The manual also talks about using SPED (885) function to measure the frequency. Has anyone had any experience of this and am I on the right lines here. Any advice welcome.

 

Regards

 

Peter

Share this post


Link to post
Share on other sites

No, PULS and SPED are for outputting pulses from the PLC.

To compare the encoder pulse count, you can use the PRV instruction to find the current pulse count, and use the usual compare instructions to produce the multiple output.
Alternatively (and system wise better) you can use the CTBL instruction which generates the output as an interrupt, although the usage may not seems straight-forward.

 

Share this post


Link to post
Share on other sites

Many thanks Innoaloe,

So in essence use the ladder section as I have tried. I need to generate an output between 5000 and 6000 pulses. Hope this is okay?

 

 

Peter

FAO Innoaloe.cxp

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0