This is part of 2.1.0latest release.

Reading CRC information

2 minutes  
crc 

All safety related files in the robot controller have a CRC code and a time stamp. This information can be used for detecting changes and manipulation.

The CRC code is a figure (up to 10 digits) which is generated by the robot controller, based on the file content – If the file content has changed, the CRC code will be different.

By comparing CRC codes one can quickly determine if a file has changed.

Besides reading the CRC information we can also read certain configuration log information. An example of this is the time stamp of loading the CMOS.bin (image/backup of the robot controller). This information can be useful to detect important events (in this case restoring a backup).

Library components

Items
data typeMLxCalendarDataData type for a time stamp.
data typeMLxConfigLogDataData type for storing configuration event log information.
data typeMLxCrcCodeDataData type for storing CRC information.
enumMLxConfigLogTypesEnum for configuration log types.
enumMLxCrcTypesEnum for CRC file types.
function blockMLxGetConfigLogRead log (timestamp) of a safety related configuration event.
function blockMLxGetSafetyCRCRead CRC information of a safety related file.

Availability

Please refer to the function block documentation to see which robot controllers support this function.

Parameters

N/A

Example

A typical use case is to stop the machine if any manipulation of the original safety configuration is detected. This can be done by regularly (e.g. once per minute) comparing the actual CRC values against the values stored at shipment of the machine.

A difference means that someone (e.g. the customer) has made changes to the safety configuration.

By additionally monitoring the log events one can also detect if someone has restored an old backup (e.g. to cover up some actions).

Below pseudo code gives you an idea of the program structure for this use case.

10  <timer>                             // regular interval e.g. 60 seconds

// read CRC's
20  <init FileType>                     // set first FileType

30  GetSafetyCRC                        // execure MLxGetSafetyCRC and store
                                        // CrcData in an array

40  <next FileType>                     // select next FileType and go to 30
                                        // or 50 when all done

// read config logs
50  <init ConfigLogType>                // set first ConfigLogType

60  GetConfigLog                        // execure MLxGetConfigLog and store
                                        // ConfigLogData in an array

70  <next ConfigLogType>                // select next ConfigLogType and go to
                                        // 60 or 80 when all done

// analyze
80  <compare results>                   // compare the CRC and log date against
                                        // the stored values at shipment

Pages built with Hugo - 23 Apr 2024 11:54 CEST