anishb92

High speed counter FX5U sample program

12 posts in this topic

Hello Everyone,

I am struggling with interfacing Incremental encoder with FX5U PLC,

Does anyone have parameter setting and sample program for same. i am unable to fetch counts...

 

Encoder:

500ppr, 24V line drive, A-B phase,  PFA datasheet

Share this post


Link to post
Share on other sites
18 hours ago, Gambit said:

i executed the FBD in my FX5U and atached encoder

Phase A - X0

Phase B - X1

after resetting the CPU, when i rotate encoder in CW direction the Pulses counts but when CCW direction the pulses again increase instead of decreasing.

no negative effect on count in SD register

Share this post


Link to post
Share on other sites

The example is for a 1 phase puls.

Just go to => parameter => FX5U => Module parameter => High Speed IO

press the detailed setting of the High speed counter and change the Pulse input mode to 2 phase 

Edited by Gambit

Share this post


Link to post
Share on other sites

Hello,

Thank u foe the setting, i wired up the hardware and downloaded ladder into plc. But the encoder misses the pulses

 

The encoder is line driver type and has output as A B Z A' B' Z'

My local suppier says line driver encoder can work as open collector output and should be compatible, but mitsubishi channel partner recommended open collector output or use a module to make it compatible...

 

Which kind of output is okay with FX5U cpu ???

Share this post


Link to post
Share on other sites

But is is detecting Forward and reverse rotation?

Share this post


Link to post
Share on other sites

Yes the FX5U detects the Rotation in clockwise and anti-clockwise direction but counts are not Proportional to rotations.

A 500ppr encoders doesn't measure 500 counts upon one clockwise rotation. similarly for anti-clockwise mode.

Share this post


Link to post
Share on other sites

Have you set the right counter type?

Capture.JPG

Share this post


Link to post
Share on other sites

And how many pulses do you get per rotation now?

Share this post


Link to post
Share on other sites

Posted (edited)

If it,s a line driver then the output signal is 5V inverting between A and A' and to GND it's 2,5V

Fx5 inputs requer 24V +-10%. It's normal to miss pulses and wierd it reads it at all.

To read differential encoder you need high speed counter special adapter like FX3U-2HC and CNV adapter to mount it to FX5u but check hardware manual for details...

It's cheaper to change encoder with 24V open collector outputs, but careful with PNP or NPN choice...

Edited by glavanov

Share this post


Link to post
Share on other sites

Hello, 

I am not fully understanding, I have set up the Hi speed io in compatibility mode with FX3, as I have been told it works better that way.

I want to use counter C246 as I am using 1 phase 2 input method,  D200 where I can put a value to compare with the current value of the counter, which  once the counted value in C246 equals D200, then M0 is set on.

I am using it right?

Please see attached for your reference.

Many thanks.

programbody.png

responsesetting.png

iosetting.png

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