Error number: 5157 Error loading program or library

Hello, I have two motion control applications, one using ACP10 and the other using Mappmotion. The ACP10 works flawlessly with the PLC, but the Mappmotion is giving an error. I don’t understand why. I have the libraries. The error code is 5157.

I ran into this error recently. The NcGlobal library is an ACP10 library that is not used with mappMotion. It should be completely removed from your project after the conversion or else you’ll get this error. Check that it’s not in your Libraries folder or the Cpu Software Configuation.

In my case, the library itself wasn’t in the project, but one of my libraries had NcGlobal listed as a dependency. I had to remove that dependency because AS was automatically including the binary with each build.

Any news @eem.ferhat ?
Ciao

Valerio

Hello, my problem has been solved. Thank you, but this time I’m getting this error code -1064239101 mcCOMM_STATE_NOT_ACTIVE

That sounds like an invalid MpLink input. Check the function block that’s giving you that error. Are you passing the correct MpLink to that function block? Are you passing the correct format (usually a pointer to the MpLink rather than the MpLink itself)?