How to use Axis Interface without template?

Hello,

AxisInterface works fine for me when I add the template to the project. But if try to add AxisInterface to an empty project it is not working. MB_AxisInit appears to complete successfully (Done = TRUE) and MB_AxisInterfaceBase is being called cyclically, but I cannot write to any of the control structure elements. For example the OpMode is always stuck at ModeAb and PosMode.Position always shows 0 when I try to Write Values or do a MOVE move to load a target position. I have tried my own data structures as well as the pre-defined data structures of CXA_MotionInterfaceUser but it makes no difference. The blocks look the same how they looked in MLC but I must be missing something. Since since the template is now part of a compiled libary I can't see what's going inside, otherwise maybe I could figure out what else I need.

Best regards,

Brian

 

Best reply by Goldfinger

Hello,

i still recommend to use the CXA_MotionInterfaceUser.library. Maybe something like a CXA_MotionInterfaceMLC_User.library would be helpfull for customers coming from the MLC?

I think, what you are missing is a part of the method TE_AxisInterface.mInitExtension() from the CXA_MotionInterfaceUser.library. 

Background: the AxisCtrl and AxisStatus are no longer "normal" structures. They are build up by function blocks that are connected to the FB MB_AxisInterfaceBase. This allows the usage of properties and variables in AxisCtrl and AxisStatus.

Why so complex? This is more performant and allows to react direct on user inputs, e.g. CmdDone can be checked direct after an _OpMode assingment.

Hope this helps,

Klaus

View original
1
6 replies