Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Encoder position overflow

  • genn

    genn - 2021-08-05


    We are using LMC078 motion controller in our project to control 12 motors simultaneously.LMC078 uses codesys firmware on their motion controllers. Softmotion encoder will act as master for all the axis.

    We created softMotion encoder under IME_EncIn in device tree and created a logic drive under that. Please see the image. Also find the logical encoder page. Scaling used was 300000 pulses corresponds to 1 unit in software.

    In our motion sequence, we enable camming between logical encoder master axis and a physical axis. In the sequence encoder master will move forward, will reset the master axis position via MC_SetPosition.(We tried using MC_Home function block, but that was not working). We are setting the position to zero. But what we can see that even the position of encoder is resetting to 0, we can see at some point of time, encoder overflows as seen in the video.

    Since the slave axis is engaged to master axis, when suddenly the position of the actual position changes to a negative value all the slave suddenly stops and try to match with the new position change which will create a sudden stop and whole machine jerks.

    What we observe is that even the factPosition changes when we call MC_setPosition to 0, some of the internal variables in softMotionEncoder is not changing(dwActPosition...) because of which factPosition overflows at some point of time.

    We are surprised that this is happening in LMC078 PLC and is not visible in the competitors motion controller PLC's. Is there any work around for this. This looks like a bug in the PLC/codesys firmware!.


    Last edit: genn 2021-08-05
  • bruno-roth

    bruno-roth - 2021-08-13

    Hello, please contact the local motion support of Schneider Electric in your country. Another point you could not use a MC_home for an Encoder. And If you are working with this encoder always perform the MC_setposition to the logical encoder and also use only this "Axis" for your CAM or Gear-Master.



Log in to post a comment.