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-08-25 12:37 PM . Last Modified: 2023-05-03 12:11 AM
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
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-08-27 06:56 AM
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
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-08-27 01:10 PM . Last Modified: 2020-08-27 01:11 PM
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.
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-08-27 06:56 AM
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
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-08-27 12:35 PM
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
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-08-27 01:10 PM . Last Modified: 2020-08-27 01:11 PM
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.
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.