Sign in to follow this  
Followers 0
ecca

Encoders into FX......

8 posts in this topic

How can I emulate an Omron positioner , the H8CS with an FX PLC so as to be able to have adjustable (and overlappable) outputs relevant to position of encoder? Cheers Eric Thacker

Share this post


Link to post
Share on other sites
You need to use an absolute encoder, the accuracy of which will depend on your application. Then just use comparisons of the position input to turn on/off the output. eg [>= D100 K250]-[<= D100 K300]----(M100)-¦ M100 -¦ ¦---------------------------------------------(Y0)-¦ will turn on Y0 whenever the encoder position is between 250 and 300. Hope this helps Best regards Paul Ked

Share this post


Link to post
Share on other sites
Thank you Paul. Can I do this as many times as I want to with overlapping positions? Great Eric Thacker

Share this post


Link to post
Share on other sites
Which input do I use ? Where will the value of the encoder be found ?

Share this post


Link to post
Share on other sites
We sell Stegmann encoders, which come in two basic flavors: SSI and Gray Code. SSI is a serial based interface that gives positioning information. Some PLC's have add-on modules that talk SSI, but Mitsubishi is not one of them. Gray Code is a binary code that requires multiple digital inputs to report the exact position at any given time. Unfortunately, if you need a lot of resolution, you start eating up inputs very quickly. For example, 512ppr requires 9 inputs. Also, they are only available as single-turn absolute encoders. The advantage is they can be connected to any PLC, so they're good for a low-res, single-turn application, like position of a rotary table. If you choose to go that route, you connect the parallel inputs to any inputs on the FX PLC, doesn't matter which, though a series makes it easier... Next, you have to convert Gray Code into Binary Code, which is your positioning information. The FX2N and FX3U have a function just for that, but if you use an FX1S or FX1N you'll have to write your own code. I have an sample that I could dig up if you want. In either case, the position information ends up wherever you put it. Be aware that you may not end up with a high-speed counter, as you will be limited to the speed of the scan. If you do not need an absolute system, here is a much better (and less expensive) approach. Use an FX1S (or higher if you have other things you want to do) and an incremental differential encoder of appropriate resolution. Tie the A and B phase outputs from the encoder to the first two inputs on the PLC (X0 and X1). Then use a high-speed counter (C251 or C252). On power-up, you will have to home the system and reset the counter, but then you will have a high-speed counter. Access the position information by using the counter address in a data register instruction. (i.e., replace D100 with C251 in Paul's example) I'm being very sketchy here about using the high-speed counters. Use the programming manual to get the details. This counter won't be completely high-speed either, because you are still relying on standard ladder code to trigger outputs. However, by using a high-speed counter, you now have access to the high-speed instructions HSCS and HSCR.

Share this post


Link to post
Share on other sites
An caution to note in the code which Paul Ked posted: All high speed pulse inputs use 32-bit bidirectional counters, C230 and above, and so the commands must be set for 32-bit number (D>=, not >=). And the first several inputs on the PLC are configured so they can be used as high speed pulse inputs. Which ones and what speed will vary based on which PLC you are using.

Share this post


Link to post
Share on other sites
Quite correct. I normally convert the counter into degrees (to however many decimal places needed for accuracy) and then work with the 'real' values. - BEWARE - As JRoss says, you can use an inexpensive push-pull encoder but this will not act like the cam unit unless it is 'sent home' on initialisation. This can have fatal results on some machines! The amount of outputs from the PLC cam system is only limited by the number of physical outputs the PLC has. You can overlap as and when your system needs Best regards Paul Ked

Share this post


Link to post
Share on other sites
Depending on the model of FX, you can use the pulses input, set bits using HSCS and reset bits with HSCR as it passes certain points in the rotation or use HSZ for high speed zone compare. I've even seen someone use the Z pulse of the encoder to issue a reset to the counter in a simple attempt to make a ring counter.

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