Reading CRC of safety program in AS project

Hi All,

Goal
My goal is to read the CRC of the mapp safety program in the AS project.

Context
I managed to read the CRC of the mapp safety program on the SafeKEY of the SafeLOGIC controller (X20SL8101). I want to display both the CRC on the SafeKEY and the CRC in the AS project on the HMI. Users with the correct credentials will have the choice to keep the current safety program on the controller, or to update the safety program on the controller to the one in the project. I managed to do the communication with the controller/SafeKEY using various function blocks from the SfDomain library.

I could not find the possibility to read the CRC of the safety program in the AS project. Are there any possibilities to do so?

Requirements

  • Both the PLC logic and the safety program can be updated using one USB stick and without the need of a laptop
  • Compatible with MappSAfETY/SafeDESIGNER 5.18
  • Compatible with AS 4.12

Thanks in advance,
Juul

Hi @Juul_Ermens ,
you are using mapp Sefety, so we have a function block SfDomainInfo for those data:

Ciao
Valerio

1 Like

Thanks for the response. Can you confirm whether:

  • The .SafeApplication.CRC status is the CRC of the SafeAPPLICATION in the project (not on the controller)
  • The .SafeCommisioning[0].CRC status is the CRC of the SafeAPPLICATION on the controller/key

I am a bit confused. When reading the help pages I interpret that the .SafeCommisioning[0].CRC is about SafeCOMMISSIONING files. I don’t think that that is what I am looking for. Here are screenshots of the help pages that I found:

Kind regards,
Juul

Hi @Juul_Ermens ,
I’m positive you don’t have configured SafeCOMMISSIONING file in your prj.

For example in my case, on the HMI the operator can change some Axis parameters (not so common application):

Do you have SafeMotion in your prj? if yes Have you enabled “Safe machine options“? I don’t think so

The information you are looking for is Fub_Name.Info.Status.SafeApplication.CRC.

The .SafeApplication.CRC status is the CRC of the SafeAPPLICATION in the project (not on the controller)
I have a Dejavu’, Austin helped me to clarify this point few weeks ago:

Ciao
Valerio

1 Like

Hi @valerio.manenti,

Thank you for the explanation. I can confirm that I don’t use SafeCOMMISSIONING or SafeMOTION.

My goal is to retrieve the CRC of the safe application within the project that is installed on the PLC using an USB stick. This can be different from the safe application that is on the safety controller. I want to read this from the project before the user transfers the safe application to the safety controller.

Please note it is blocked by B&R to show the Safety HMI in our own HMI. I thought about manually putting that CRC in a constant variable, but the risk is that me or my colleagues forget to update the value after making changes to the safety program. Therefore I would like to read it automatically.

Kind regards,
Juul

Hi there,

the FUB SfDomainInfo reads the Info of the application currently installed on the SafePLC - see SfDomainInfoFileType → CRC: CRCs of the file on the SafeLOGIC controller

You can, however, use FUB SfDomainGetFileIdent to get the CRC of the app on the non-safety PLC and thus figure out if it needs to be transferred.

What you can not do, is transfer the application from an USB stick - see the SfDomainTransfer documentation for SafeAppFilePath: Note: The specification of a storage location is not currently supported.

So right now I do not know how you are going to achieve what you want, but at least you know how to get the checksums :slight_smile:

2 Likes

This is exactly what I was looking for!

I see that this function block is added in mappSafety version 5.20, while I am on 5.18.

Thanks to both of you for the help!


PS maybe I was not so clear on the USB part. Let me try to clarify it for the context of this topic. I meant that the USB stick is used to perform an initial installation on the PLC. After doing that, the user can then use the HMI to transfer the safe application to the safety controller. The transfer is done using the sfDomainTransfer function block.

1 Like

Thanks for clarification @Juul_Ermens , I thought you were studying the case where you have modified the original safety application on SafeLogic due to new feature or bugfix
and then you wanted transfer the new safety application from USB to the SafeLogic; more or less what we can do with ArProjectInstallPackage.
Ciao
Valerio

1 Like