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

Create Axis_Ref for custom opensource drives ( Odrive Robotics/Simple FOC )

  • matthew

    matthew - 2021-08-06


    I'm looking for a way to use custom opensource drives that control hobby type BLDC motors for some projects. I'm currently using CodeSys on an RPI with RT kernel and softmotion. The boards I'm currently using are https://odriverobotics.com/ and https://simplefoc.com/ . They both have there own custom Canbus protocol which don't support required standards that axis_ref use.

    I will implement my own Canbus using socket can into CodeSys and my own function blocks for the communication. I will be using this Can/RS485 Hat for the Pi https://www.waveshare.com/rs485-can-hat.htm I'm not worried about exact real time performance for these projects. I only have basic control functions and modes on these drives. The closed loop controls are done in the drives or can be external based on the operation mode velocity (rads/s) or position (rads). (I will be using position control set how many radians, so will be scaled to linear movements in mm or rotation in degrees)

    With the drives I can send absolute position commands with velocity limits and have feedback from the drives encoder interface for actual position and velocity. I can enable/disable the motor. There is no dec/acc settings but I can add this in the drive firmware.

    There are some leadshine servo drives with RS485 that I would like to use also. What are the minimum requirements for the Axis_Ref and can this be created using Struct/Enum?

    Is there a way to use the motion control FBs without predefined manufacture Axis_Ref? Or can I use a Virtual Drive and map the required variables to and from my drive.



    Last edit: matthew 2021-08-06
  • macieksz

    macieksz - 2022-10-27

    Did you find the solution to this problem? I have a similar one...


Log in to post a comment.