Welcome to the new Schneider Electric Community

It's your place to connect with experts and peers, get continuous support, and share knowledge.

  • Explore the new navigation for even easier access to your community.
  • Bookmark and use our new, easy-to-remember address (community.se.com).
  • Get ready for more content and an improved experience.

Contact SchneiderCommunity.Support@se.com if you have any questions.

Close
Invite a Co-worker
Send a co-worker an invite to the Exchange portal.Just enter their email address and we’ll connect them to register. After joining, they will belong to the same company.
Send Invite Cancel
84247members
353347posts

Loging button action

EcoStruxure Geo SCADA Expert Forum

Find out how SCADA systems and networks, like EcoStruxure Geo SCADA Expert, help industrial organizations maintaining efficiency, processing data for smarter decision making with IoT, RTU and PLC devices.

Oz_Ba
Lieutenant JG
Lieutenant JG
0 Likes
5
1304

Loging button action

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.

 

 

5 Replies 5
recho
Cadet
0 Likes
0
1301

Re: Loging button action

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.

BevanWeiss
Spock
Spock
0 Likes
3
1281

Re: Loging button action

What does the Button actually do when it's pressed that you would want to log?


Lead Control Systems Engineer for Alliance Automation (VIC).
All opinions are my own and do not represent the opinions or policies of my employer, or of my cat..
Oz_Ba
Lieutenant JG
Lieutenant JG
0 Likes
2
1278

Re: Loging button action

Hi,

 

@BevanWeiss 

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.

sbeadle
Janeway Janeway
Janeway
0 Likes
0
1272

Re: Loging button action

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

 

 

BevanWeiss
Spock
Spock

Re: Loging button action

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

 

2020-05-25 10_13_55-Local_New Analog Point_ - ViewX.png

 

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:

2020-05-25 10_17_57-Events on _New Analog Point_ on Local - ViewX.png

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

 

 


Lead Control Systems Engineer for Alliance Automation (VIC).
All opinions are my own and do not represent the opinions or policies of my employer, or of my cat..