Config.Execute := TRUE;
Config.MpLink := ADR(gAxA);
Config.Parameters := (ConfigPar);
Config();
I have made the assignments as follows; my AS version is v6.7.1.5
Config.Execute := TRUE;
Config.MpLink := ADR(gAxA);
Config.Parameters := (ConfigPar);
Config();
I have made the assignments as follows; my AS version is v6.7.1.5
Config.Command := mcAXIS_BASIC_CFG_READ
Hello @rhys ,
while your post is missing a LOT of details, leaving users to guess what your Config FB is and what you have already done to try and figure it out yourself, Iâll take an educated guess:
FB is MpAxisBasicConfig. Thus, looking for the error in the help: B&R Online Help
Ok, that says something about configuration and a pointer being NULL
Looking at the FB itself
B&R Online Help,
expand the MpAxisBasicConfigParType and see something that asks about an address:
â Set this to something valid and try again
Hope that helps
Thank you; yes, I provided some incomplete information, so I will make sure to be more detailed next time.
Even after performing checks and making changes, I continue to encounter the same error. Here are the latest changes:
MpAxisBasicConfig.Execute := TRUE;
MpAxisBasicConfig.MpLink := ADR(gAxA);
MpAxisBasicConfig.Parameters := (MpAxisBasicConfigParType);
MpAxisBasicConfigParType.Data := ADR(MpAxisBasicConfigType);
MpAxisBasicConfig();
I hope this will help:
TYPE
STEPS_enum :
(
W_INIT,
W_CONFIG_READ,
READY,
ERROR_AXIS,
ERROR_CONFIG
);
END_TYPE
VAR
axis_configuration : MpAxisBasicConfigType;
MpAxisBasicConfig_01 : MpAxisBasicConfig;
axis_parameters : MpAxisBasicParType;
MpAxisBasic_01 : MpAxisBasic;
step : STEPS_enum;
END_VAR
PROGRAM_INIT
MpAxisBasic_01.MpLink := ADR(gAxis_1);
MpAxisBasic_01.Parameters := ADR(axis_parameters);
MpAxisBasic_01.Enable := TRUE;
MpAxisBasicConfig_01.MpLink := ADR(gAxis_1);
MpAxisBasicConfig_01.Parameters.Data := ADR(axis_configuration);
MpAxisBasicConfig_01.Command := mcAXIS_BASIC_CFG_READ;
step := W_INIT;
END_PROGRAM
PROGRAM _CYCLIC
CASE step OF
W_INIT:
IF MpAxisBasic_01.Active THEN
MpAxisBasicConfig_01.Execute := TRUE;
step := W_CONFIG_READ;
ELSIF MpAxisBasic_01.Error THEN
step := ERROR_AXIS;
END_IF
W_CONFIG_READ:
IF MpAxisBasicConfig_01.Done THEN
step := READY;
ELSIF MpAxisBasicConfig_01.Error THEN
step := ERROR_CONFIG;
END_IF
ERROR_AXIS:
ERROR_CONFIG:
END_CASE
MpAxisBasic_01();
MpAxisBasicConfig_01();
END_PROGRAM
axis.zip (1.6 KB)
Thanks for everything; your explanation was quite good, but there are a few points I havenât fully grasped. First of all:
Shouldnât MpAxisBasicConfig_01.Parameters be mapped to MpAxisBasicConfigParType?
Also, I donât quite understand why a construct like MpAxisBasicConfigParType.Data := ADR(axis_configuration); isnât used. Furthermore, are we currently performing save and load operations via MpAxisBasicConfig_01.Command?
Should there be a statement similar to the following within the case structure:
MpAxisBasicConfig_01.Command := mcAXIS_BASIC_CFG_WRITE;
MpAxisBasicConfig_01.Command := mcAXIS_BASIC_CFG_LOAD;
âŚor is it sufficient to simply set MpAxisBasicConfig_01.Execute := TRUE;?
Additionally, whenever I attempt to modify components such as the axis drive settingsâspecifically axis_configuration.Drive.Homing.StartVelocityâthe system switches to âserviceâ mode. I am aware of this situation (error code 25314); however, I had linked the configuration via a variable using the expression axis_configuration ACCESS ADR(MpAxBasic_ConfigType[1]);.
the input âMpAxisBasicConfig_01.Parametersâ is already of this data type. And since it is not pointer input it can be directly set.
But it is ok to assign a second variable of type âMpAxisBasicConfigParTypeâ to it.
Also, I donât quite understand why a construct like
MpAxisBasicConfigParType.Data := ADR(axis_configuration);isnât used
same answer as last. You can define a separate variable of type âMpAxisBasicConfigParTypeâ and name it âMpAxisBasicConfigParTypeâ, too.
But it is not necessary.
input â.Commandâ is just a parameter for the next operation which is then started by a rising edge on â.Executeâ.
I am aware of this situation (error code 25314); however, I had linked the configuration via a variable using the expression
axis_configuration ACCESS ADR(MpAxBasic_ConfigType[1]);.
Unfortunately we have to use pointers and pointer operations are potentially dangerous.
I understand; you explained it very well.
Hi @rhys ,
since we have MpAxisBasicConfig FUB available in mapp Motion I use that in all my prjs and to be honest I have positive feedback from my customers.
The interface of that FUB has the same style implemented from other mapp function blocks.
Christoph has developed a task that explained in details how to use MpAxisBasicConfig FUB, so Iâm a little lost why you still have an issue.
Portion of system logger doesnât help our investigation and I see can only increase your frustration.
Could you upload your task and systemDump? I can test that with arsim or with real hw, I have few APC2200s on my desk.
Thanks
Ciao
Valerio
I couldnât send the project file due to its size; I saved it as a .zip file, but the file size is still too large.
I found the source of the problem. I had defined my function blocks using ACCESS and then used them within PROGRAM_CYCLIC.
I should have used PROGRAM_INIT instead; I overlooked that.
Regarding how to write the parametersâis there a specific order to follow when using .Command for operations like:
mcAXIS_BASIC_CFG_READ
mcAXIS_BASIC_CFG_WRITE
mcAXIS_BASIC_CFG_LOAD�
Sorry guys,⌠at the moment it looks like more that official support should take a look at it. It can be handled as support or consultancy directly in the project if needed. The community is not intended for sharing projects where customer know-how may be involved.
I had mentioned that my issue was resolved and asked a question regarding a different matter; I am concluding the discussion here and moving on to another topic.
Thanks @rhys !
Ciao
Valerio