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
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:
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:
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.
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
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.
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