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