krumpli01 Other SW Jan 17, 2025, 10:22 AM Jan 17, 2025, 10:05 AM

How is it possible to log whom logged into the web interface of the PLC? Both directly and via Tecoroute/iFoxtrot.

 I want to log usernames and times. 

Answers 3

Luboš Urban Jan 15, 2025, 7:33 PM

You can use GetWebServerAccess function from SysLib library to find out information about users who are currently connected to the web server in the PLC using an internet browser. I will try to add an example of project in Mosaic later yet.

Luboš Urban Jan 16, 2025, 3:48 PM

Here I am sending a demo project that shows how to log accesses to the Foxtrot web server from individual users to a file on a memory card in the PLC. Accesses to specific web pages are returned by the GetWebServerAccess function, saving records to a file with a time stamp is provided by the fbLogWebAccess function block.
The GetWebServerAccess function was created for the Foxtrot CP-10xx, which allowed a maximum of 8 simultaneous accesses, 6 connections locally and another 2 via TecoRoute. Today's CP-20xx systems can have multiple connections simultaneously and the function cannot record them all. In order for the function to be generally usable, we would have to modify it and then include it in a new version of the library. So for now, we are choosing at least this partial solution.

krumpli01 Jan 17, 2025, 10:05 AM

Thank you! This works as I wanted.

This question is solved.