I want to create interactive button on my Process Book to activate bit in the PLC. How to do it?
Assuming you can write via an OPC Server, then in a nutshell...
Add a button.
Use the click event to execute some VBA + SDK code to write to a PI Point.
That PI Point is the source tag for another PI Point which is an "write down" PI Point for the PI Interface for OPC DA.
The PI Interface for OPC DA writes the value to the corresponding OPC Item.
Thank You for Your reply.
I have no experience with VBA so here comes my question.
Do You have similar code I can rewrite so it will fit my application.
I will appreciate Your help.
To write to a PIPoint:
Dim point As PIPoint
Dim vals As New PIValues, val As PIValue
Set srv = Servers.DefaultServer
vals.ReadOnly = False
Set val = vals.Add("*", 100, New NamedValues)
Set point = srv.PIPoints.Item("cdt158")
Set pierr = point.Data.UpdateValues(vals)
Retrieving data ...