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
84549members
353805posts

Is Server.SetOPCValue with DPN3 pulse point through Script supported?

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.

Solved
Tanquen
Lt. Commander
Lt. Commander
0 Likes
3
860

Is Server.SetOPCValue with DPN3 pulse point through Script supported?

I need to have a button write or set off two different DNP3 Pulse tags.

 

This gives the error, "The Value is read only and may not be written to."

 

Server.SetOPCValue "...Tags DNP.Control.Download Setpoints CMD", ''Download''

 

 

This PickParam has no errors when selected:

 

PickType 5

PickParam ""...Tags DNP.Control.Download Setpoints CMD.ObjectLink"+'?Control&Action=''Download'''"

 

This works with an internal tag:

 

Server.SetOPCValue "...Tags DNP.Control.Test1", 1

Tags (1)

Accepted Solutions
geoffpatton
Commander
Commander
0 Likes
2
837

Re: Is Server.SetOPCValue with DPN3 pulse point through Script supported?

No you have to set and variable equal to your point's full name and then do an interface control on it.

With a Pulse Null you write a 0

With a Pulse Trip you write a 0 for the first action and a 1 for the second one.

 

Option Explicit
Sub OpenBreaker()
dim objOpenCmd
'Create a reference to the Open Object.
Set objOpenCmd = Server.FindObject(Server.GetOPCValue("...IO.Control.Open CMD.Fullname"))

objOpenCmd.Interface.Control 0

End Sub

See Answer In Context

Tags (1)
geoffpatton
Commander
Commander
0 Likes
0
824

Re: Is Server.SetOPCValue with DPN3 pulse point through Script supported?

Option Explicit is not required it is extremely useful when writing or editing the code. It generates an error if you forgot to declared variables that you use in your routine, or you misspelled a variable.

 

If you are using a code fragment in a pick action you don't need Sub lines, but you do in the mimic scripting.

 

Your question about weather the sub line were necessary made me think a moment. I don't use the code fragment option much and I tend to forget about it. My scripts are almost always more complicated than I want to try to put in a code fragment. Most of mine check if the user has control privileges and if they do not it prompts them that they don't have the right to operate the button and need to use a different login. Most of mine also ask to confirm they meant to press the button to prevent accidental operations.

 

Also you can run debugging on the code in the Mimic script section.

 

 

See Answer In Context

Tags (1)
3 Replies 3
geoffpatton
Commander
Commander
0 Likes
2
838

Re: Is Server.SetOPCValue with DPN3 pulse point through Script supported?

No you have to set and variable equal to your point's full name and then do an interface control on it.

With a Pulse Null you write a 0

With a Pulse Trip you write a 0 for the first action and a 1 for the second one.

 

Option Explicit
Sub OpenBreaker()
dim objOpenCmd
'Create a reference to the Open Object.
Set objOpenCmd = Server.FindObject(Server.GetOPCValue("...IO.Control.Open CMD.Fullname"))

objOpenCmd.Interface.Control 0

End Sub

Tags (1)
Tanquen
Lt. Commander
Lt. Commander
0 Likes
1
827

Re: Is Server.SetOPCValue with DPN3 pulse point through Script supported?

I had to fix my PickParam and add the “.ObjectLink” on the end. When they use the built in method or the PickParam Animation Expression they always pass the DNP3 pulse description. I'm not sure why they do but it works. The "objRefreshCmd.Interface.Control" will not take a string but it seems to work the same.

 

I’m using it in a Pick Action Execute Code Fragment so I can removed the Sub or call it at the end to get it to run. Any reason to keep the Option Explicit and Sub lines?

 

 

Option Explicit
Sub Refresh()


dim objRefreshCmd
dim objDownloadCmd
'Create a reference to the Refresh and Download objects.
Set objRefreshCmd= Server.FindObject(Server.GetOPCValue("...Tags DNP.Control.Refresh Setpoints CMD.Fullname"))
Set objDownloadCmd = Server.FindObject(Server.GetOPCValue("...Tags DNP.Control.Download Setpoints CMD.Fullname"))

 

objRefreshCmd.Interface.Control 0
objDownloadCmd.Interface.Control 0

 

End Sub

 

Refresh

Tags (1)
geoffpatton
Commander
Commander
0 Likes
0
825

Re: Is Server.SetOPCValue with DPN3 pulse point through Script supported?

Option Explicit is not required it is extremely useful when writing or editing the code. It generates an error if you forgot to declared variables that you use in your routine, or you misspelled a variable.

 

If you are using a code fragment in a pick action you don't need Sub lines, but you do in the mimic scripting.

 

Your question about weather the sub line were necessary made me think a moment. I don't use the code fragment option much and I tend to forget about it. My scripts are almost always more complicated than I want to try to put in a code fragment. Most of mine check if the user has control privileges and if they do not it prompts them that they don't have the right to operate the button and need to use a different login. Most of mine also ask to confirm they meant to press the button to prevent accidental operations.

 

Also you can run debugging on the code in the Mimic script section.

 

 

Tags (1)