Easy way of logging user interactions on SG4 Visu

Hi, is there an easy way of logging every single user interaction on the SG4 visualization? I am using 4PPC70 PLC+HMI combo panel.

Several other HMI manufacturers that I use have a detailed logger, such as “yyyy-mm-dd hh:mm:ss User X changed Numeric pressurePV 42.3 → 48.0”. This is usually implemented as a simple page where you drag a Logger element and that’s it.

This is absolutely invaluable when operators swear up and down that they have not changed a single thing at 3am and machine crashed mysteriously by itself.

Thank you!

Mapp Audit- remember it requieres a Software license

B&R Online Help (br-automation.com)

All events on the machine such as changing recipes or logging in/out users should be collected and stored in a file. This can be implemented using mapp Audit. This type of event list clearly shows who made which changes to the machine and when. An audit trail like this is used in many machines for quality assurance, especially for monitoring changes. This is particularly required in the food industry.

mapp Audit communicates with other mapp components such as mapp Recipe, AlarmX or mapp UserX, which makes collecting events much easier. The event list can be displayed via the HMI application and exported to a storage medium.

mapp Audit 1 - How to audit machine events [sub: EN, DE, PL, PT-BR, RU] (youtube.com)

1 Like

I see, thank you Marcos. So nothing pre-packaged integrated. I can perhaps use the Runtime / Completion datapoint to set a unique number to a specific variable and then in program check, whether this variable is <> 0 and if so, add contents of userInteractionDescriptionArray[datapoint] to logger. Relatively straightforward for buttons, not so straightforward for input fields, but doable.

Right. So there is an integrated option for this, and it requires no licenses, just some very, very tedious setup.
Example/Sample LibVcLib1_ST contains program logEvents.ST, which does exactly this. Took me some time to find out where to set up the necessary UserID for each variable, since the Help file structure for this isn’t great.
Help for VcLib is rather sparse.
Examples for VcLib are almost fully ready to use, but:
In Examples/Visualization/Display and touch/Logging user input it is explained that shared resources in Visu need to have an UserID attached for this to work and EnableEvents selector must be True.

After this I still had issues with putting old->new value information in the log, since it seems an event was triggered multiple times for each entering of a value and I never registered an event with ID of “value was just changed”, but “4102”, which is just "edit mode for numeric control activated, so my outputs were unreliable.

Of course, assigning UserID (and they have to be unique, naturally) to your input fields in the Visu is kind of useless, since then you need a string array explaining what is what. Fortunately, VCDP_UserID2Index functions allows finding out the variable index number from UserID and by using VCDP_GetPVName you can get an actual variable name, which is connected to the UserID.

The rest was just appending a Logger example to the program, so all this is pushed into the UserLog. And hoping, that the string you are pushing to the logger isn’t too long, because it will not show more than ~35-40 characters in the SDM logger and it does not seem to be expandable. Probably can’t fix this one easily, since it is a part of how data is sent to the webserver (Third entry from the top)


AS Logger does display everything correctly of course, so I might need to make a simple string readout page from logger, similar to how Alarm screen looks.
image

It would be excellent if the string could be displayed here, but nothing I was able to find in Logger documentation explains how to access that part.

I would not make such a deep dive for this, but after having some experience with Weinview screens, which have exactly this kind of a logger already integrated, it was absolutely critical to implement this function on the B&R panels for the future. It is invaluable for checking operator actions especially after the third “we changed nothing and the machine started producing bad product at 3am”.

Hi @c433303,

you can’t access the description section of the logger by code using ArEventLog.
But as I know it’s possible to define user specific texts in AR text module file (TMX), that is processed by the logger.
You have to

  • configure the right namespace for the text module
  • add a text for each unique user event you use

Please see here for details (I haven’t used by my own until now, but there’s also an example with screenshots linked in that help section):
https://help.br-automation.com/#/en/4/textsystem%2Flocalizabletexts%2Ftextsystem_edit_customer_event_texts.html

Best regards!