Hi, running "CODESYS V3.5 SP16" here, does anyone have the same problem with the method in the title?
PROGRAM PLC_PRGVAR itfAxisRef : SM3_Basic.IAxisRef; pAxisRefSm3 : POINTER TO SM3_Basic.AXIS_REF_SM3;END_VAR
pAxisRefSm3 := itfAxisRef.GetAxisRefPointer;
Trying to compile the above throws the following error
C0032:Cannotconverttype'GETAXISREFPOINTER(sm3_basic, 4.10.0.0 (3s - smart software solutions gmbh))'totype'POINTER TO SM3_Basic.AXIS_REF_SM3'
which has me really confused because I've never seen the type GETAXISREFPOINTER before and the documentation for .GetAxisRefPointer states that it returns POINTER TO AXIS_REF_SM3
As for why I'm trying to use this method, I'm trying to loop through the array of axes in SM3_Robotics.AXIS_GROUP_REF_SM3 and pass them to SM3_Basic.MC_ReadStatus in order to get their individual SM3_Basic.SMC_AXIS_STATE (not only the SM3_Robotics.SMC_AXIS_GROUP_STATE) for debugging
Is there a better way to achieve the above without using the axes array?
Last edit: void 2021-12-28
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, running "CODESYS V3.5 SP16" here, does anyone have the same problem with the method in the title?
pAxisRefSm3 := itfAxisRef.GetAxisRefPointer;
Trying to compile the above throws the following error
which has me really confused because I've never seen the type
GETAXISREFPOINTER
before and the documentation for.GetAxisRefPointer
states that it returnsPOINTER TO AXIS_REF_SM3
https://help.codesys.com/webapp/3dvrBKsuKjYfmeP1KzrJnylfstc%2FGetAxisRefPointer;product=SM3_Basic;version=4.9.0.0
As for why I'm trying to use this method, I'm trying to loop through the array of axes in
SM3_Robotics.AXIS_GROUP_REF_SM3
and pass them toSM3_Basic.MC_ReadStatus
in order to get their individualSM3_Basic.SMC_AXIS_STATE
(not only theSM3_Robotics.SMC_AXIS_GROUP_STATE
) for debuggingIs there a better way to achieve the above without using the axes array?
Last edit: void 2021-12-28
Hi void,
GetAxisRefPointer is a method, try add "()" in the end:
pAxisRefSm3 := itfAxisRef.GetAxisRefPointer();