EcoStruxure Geo SCADA Expert Forum
Schneider Electric support forum about installation, configuration, integration and troubleshooting of EcoStruxure Geo SCADA Expert (ClearSCADA, ViewX, WebX).
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-05-20 07:08 AM . Last Modified: 2023-05-03 12:14 AM
Hi,
I would like to have pushbutton actions logged in a database.
I created a button which changes state of analog point.
I know I can log change of state for the analog point, but I would like to have something like "Button 1 pressed" in Event log.
Any suggestion is appreciated.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-05-20 07:51 AM
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-05-20 07:51 AM
See help guide reference to "Insert a Comment for an Event"
use the script interface to insert a comment in the events journal using the AddComments method on the EventJournal aggregate of the root group object.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-05-21 09:57 PM
What does the Button actually do when it's pressed that you would want to log?
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-05-21 11:27 PM
Hi,
Button action has to be logged since it writes value to INT point within OPC Server. This action triggers action such as starting a pump or a fan, for example.
What I try to achieve is to have operator's action clearly stated in the event list.
Meanwhile, I found a workaround playing with FBD...
But, if there is simpler solution...
Thanks.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-05-22 12:49 AM
Your button action will need to call a script function to both cause the action and then raise an additional event log message.
The following function will log a message:
'Helper function to write a log message
Public Sub LogInterfaceEvent(DBObject, Time, Severity, EventText)
If Not DBObject Is Nothing Then
DBObject.Interface.LogInterfaceEvent LocalTimeToUTC( Time),Severity, EventText
End If
End Sub
You could add this to a script library.
Your code which executes the control/override/setpoint will use something like:
Set controlObj = Server.FindObject( Server.GetOPCValue( "..relative path to point.FullName" ) )
This will be the first argument to the function above, and also a means to execute the action, using controlObj.Interface. etc
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-05-24 05:19 PM
Ohh... so you're ok with it not being logged if I just navigate through the Database Browser, right click on the OPC point and select "Control..."?
I think what you don't want is to log the button action.
What you DO want is to log the control action that the button causes. And this is normally the default action (here's the default configuration for an OPC Advanced Analog.. after I tick the 'Control Enabled' tickbox).
As long as there is a Severity configured here (i.e. it's not set to None), then it will put an Event into the Event Journal which will tell you who issued the control action, and what they issued it to.
This is normally sufficient for most purposes.
If you want to start applying a little more 'robustness' to the value changes themselves, then you should be looking at either the Security permissions (i.e. so that only certain users can change the value) and possibly the Confirm options here, so that a user has to re-enter their password when changing it, or entering a note or such..
An 'example' of how it kind of looks in the Event Journal is:
This is for an internal Analog, so it says 'Hand controlled', but a non Internal will just say 'Controlled to'.
The Category that you will want for any filter is 'Action'.
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.