Maplink Errors After Changing Link Name

Hi Community,

I recently changed the name of my Mplink on mpalarmxlist and mpalarmxcore configuration files in the configuration view. I’ve updated the mpalarmxcore file to reference the new mplink on the mpalarmxlist file. I also updated the mplinks in the code at the corresponding MpAlarmXHistory and MpAlarmXCore functions. The code builds successfully, but gives the following errors during runtime:

  • -1064239101 mpALARMX_ERR_MPLINK_INVALID (MpAlarmXCore)
  • -1064239099 mpALARMX_ERR_MPLINK_CORRUPT (MpAlarmXHistory)

I have tried the following to fix the errors:

  • Checked spelling of MpLinks in function calls
  • Cleaning the project and rebuilding to help remove any old references
  • Manually removing the project temp folder in the file explorer and rebuilding
  • Un-Enabling the functions MpAlarmXCore and MpAlarmXHistory, then re-enabling

I still think the functions might be somehow referencing the old links, but I’m not sure what else to try to get rid of the references if so. Has anyone here overcome this issue before?

@Jessy_Filgueira
any chance you may have used the same MpLink twice on different function blocks or the wrong MpLink with the wrong function block?

Could you maybe share a screen shot from your code that shows the MpLink’s in question?

Hi @marcel.voigt ,

I forgot to mention that I also tried creating new function instances of MpAlarmXCore and MpAlarmXHistory during the end of the troubleshooting process. I was hoping these new instances would resolve the correct MpLinks, but the errors remained the same. Could this potentially cause problems?

This is the alarmxcore file with the new mplink in question.

This is the declaration.

This is where the two functions are used in my code.

Jessy,
I should have asked this first, but what AS and mapp versions are you using?

I went thru the steps, starting with a Basic alarm system, wrote the code like yours (I was a bit concerned how you coded everything, like why are you calling the function blocks twice in INIT and CYCLIC) but it was fine.
In step 2 I renamed my MpLinks to the same names and got the “MpLink corrupt” error after transfer because of the transfer mode I was using, a warm start fixed that and both alarm FBs are fine.

I don’t think it’s an issue but you can check the Components on your target. Go to Online > Compare > Automation Components. Maybe the old MpLinks are still there, again I don’t believe that’s possible.

Hi Marcel,

My running versions of software are AS 6.7.0.187, Mapp Services 6.5.1, and Mapp View 6.5.0

I called the functions twice as part of the troubleshooting process. I initialized the function in an enable = false state and then enabled them later during the cyclic. This was an attempt to ‘reset’ the functions, in hopes that they would process the MpLinks correctly after.

I did double check the MpLinks in automation components and all seemed updated as you suggested. I’ve also tried performing warm restarts, but this did not seem to resolve the issue. In addition, I’ve also closed the project/application a few times as an additional troubleshooting attempt during the process in case they might be in a buggy state.

Jessy, not sure what to say just that this highly unusual after all the checks you and I have done.

Any chance you could share the project with me in a DM or repository?

I’m not quite sure I can say what the cause of the issue was, but the error resolved for my MpAlarmXCore function on its own. I still had the MpAlarmXHistory error though.

I decided to just create a new history configuration and mplink, as it’s not too tedious, and then linked this new one to the function instead with no problems.

That’s really good to hear, glad you have it working again! Thanks for the update
:+1:

Thanks for all the help as well! @marcel.voigt