Jump to content

Recommended Posts

Posted
Hay gays. I`m here again asking for help. I have FX3G-40M and GX IEC Developer 7.04 installed. On input X000 i have connected the phase of rotary encoder. The thing I want to do is fairly simple, I just want to count the pulses from the rotary encoder and write the result to a memory cell. Just counting pulses...for now. Thank you.

Posted
You say you have connected the "phase of the rotary encoder". Do you have an A/B pahse encoder, or a simple pulse-encoder? In any way, what frequencies are we talking about? Do you just want to count the number of pulses? Like measuring a length that something is travelling? Or do you need to count pulses pr. second or something??
Posted
Download the basic programming manual and look at the High-Speed Counter section. You'll pick a counter based on which type of counter you want and which inputs you are using. Then put the counter in the code to execute whenever you want the encoder to count. The accumulated value of the Counter will be the number of count. You can use it directly or move it into another register, but note that the high-speed counters are all double-integers (32-bit). Use a reset instruction or a reset input to reset the counter.

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
×
×
  • Create New...