Jump to content

calculate encoder pulse to activate output?


Recommended Posts

Posted
Hi there, I've one project is using omron 500pp encoder, now I'll like to use this encoder with my FX-1s-20MR. The operation should be like this: there is 7 output, and each output will activate and deactivate by calculating the angle of the encoder, example: Output 1 : On at 150degree, and Off at 180degree Output 2 : On at 20degree, and Off at 260degree and so on.......... now I write a ladder like this: M8000----------------------------[C235 K500] |-----------------------[DHSCS K208 C235 Y0] |-----------------------[DHSCR K250 C235 Y0] and so on..........is it workable?
Posted (edited)
The command I think you need is the ABSD function which works in the MItsubishi FX range. This one amazing command enables you to set up a "virtual multiple lobe camshaft complete with micro switches" all running off one encoder input. For example, the command ABSD D300 C0 M550 K25 Would set up 25 cam lobes (K25) using C0 as the counter for the encoder pulses (reset to zero at the end of each rotation). Cam lobe 1 would turn on bit M550 when C0 equals or exceeds the value in D300, and turn off M550 when the value of C0 equals or exceeds the value in D301, and so on for the other 24 cam lobes. Stunningly good and accurate command for doing away with very complicated cam shafts. Edited by Colin Carpenter
Posted
Just bear in mind with Colin's example that this is NOT a high speed 32-bit counter. And with the load compare you mentioned, this is not for hish speed devices, that is not independent of the PLC scan like the DHSCS and DHSCR and DHSZ commands. And you would have to use D in front of the load compares to compare a double (32-bit) word since all high speed counters are 32 bits.
Posted
You can certainly use ABSD linked to a high speed counter operating off of the encoder pulse, as shown below: (Taken from DOS Medoc code for a rotary filling machine controlled by an FX, encoder with 360 pulses per revolution and seperate signal to indicate "TDC".) Whether or not this makes it a "high speed function", I'm not entirely sure, but it's pretty quick in operation. EI LD M8000 OUT M8025 OUT C252 K360 LD M8000 DMOV C252 C0 ABSD D300 C0 M550 K25 FEND END

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...