The checkbox is embedded and uses a PickParam with a Flowchart.
"Parameter:Checkbox.AlarmState" = 1
True "Parameter:Checkbox.ObjectLink" + '?DNP3BinaryInState.Enable'
False "Parameter:Checkbox.ObjectLink" + '?DNP3BinaryInState.Disable'
Any way to have VBA find all the tags on the screen and set the .Disable or Enable?
All the tags on the screen... but you don't have any tags in your expression. You only have Parameters... so that will make it difficult.
If you have a mimic which has expressions, and in these expressions you have references to CDBPoint objects, then it's not 'impossible'... but it's a bit painful.
You'd need to use the unsupported ViewX COM Interface, and iterate through all of the expressions, and parse them to identify which refer to Points, and then pass the name of these to the Automation Interface (or the .NET API... but you mentioned VBA, so the Automation Interface is 'easier')... then you can call the CAlarm Method 'Enable' or 'Disable' on the DNP3BinaryInState CAlarm item for the respective DNP3 Binary Point.
That sounds complicated and “unsupported ViewX COM Interface” sounds scary. 😞
No tags directly in the expressions, just embedded objects with Parameters. There are many existing screens. Was just wondering if there was a way to parse all the objects and find the tags used or maybe find all the tags in Parameters on that screen.
Now that I think about it again they have a simple text object next to the checkboxes that just changes color when the tag is in alarm and they have links to tags in their expressions. Takes forever to link them up but I’m sure they did not want to mess with embedded objects and the text string length and such.
Doesn’t have to be VBA, but I most likely can’t install any apps or add-ons. I’m not a programmer but I’ve used VBA to parse objects and make changes to them in other SCADA packages. Some time ago, I think you had to run a command to get all the object names on the screen, even if you already knew the object name and then you could manipulate the objects fields that were exposed to VBA.
Can you just find all the T_## objects and get the tags out of them?
Depending on how you structured your database you may be able to get away with calling the acknowledge method on the group object containing the tags
It is probably not very ASM-like but if you have your screens structured to show the tags on a mimic then it could be an option
@AdamWoodland The problem with that Adam is how the original question is worded it is ONLY the DNP3BinaryInState alarms that want to be enabled/disabled, and not ALL alarms associated with all CAlarmObjects within an area.
Of course then the subject itself talks about InService, which is again a different thing.
But then you're talking about Acknowledging alarms... which is different again.
What are we trying to achieve here?
ClearSCADA / GeoSCADA doesn't just run string substitution like certain other platforms do (e.g. Citect / FactoryTalk View)... so find T_## doesn't mean much.. there is no T_##... there's not even 'Points' when it comes to mimics, only OPC Properties (for references). That it happens to be a property on a point doesn't really change how the mimic sees it.
Some time ago, I think you had to run a command to get all the object names on the screen, even if you already knew the object name and then you could manipulate the objects fields that were exposed to VBA.
This is roughly how the unsupported ViewX interface works.
You open up a mimic, and then you can get the layers / graphical objects etc, and you can enumerate through the animation expressions for each graphical object. But that doesn't tell you what is a point.
It will just give you a string which is the expression. Hence you would need to parse that string to find the references (direct references within double quotes "..", or potentially indirect references within square brackets, which themselves contain a sub-expression which needs to be evaluated in a bottom->top hierarchy [...]).
If you are looking at an embedded mimic, then it doesn't only have references to objects however, they might be references to Parameters... in which case there is likely no real database object that they are representative of, since the animation expression passed into this embedded mimic from the next layer up might be passing in just a literal value, or a concatenation / transformation of multiple properties from many other objects.
I think first you should clarify what it is that you actually want.
1. Do you want to toggle the InService on the Point (or other InService-able object)? OR
2. Do you want to Enable / Disable a particular Alarm associated with a CAlarmObject (of which a Point is a particular type of..)?
3. Do you want to Acknowledge a certain / all Alarm(s) on the CAlarmObject?
As Adam has said, database structure is the best way of doing most of these things consistently across multiple objects. It's relatively easy to perform these actions on all points if those points happen to all be within the same group, or all have the same name, or are all on the same outstation/scanner. Something that you can 'filter' them by which is exposed as a property (i.e. in the OPC Data Explorer) to ClearSCADA/GeoSCADA.
There is an embedded checkbox that uses parameters but as I said there is also a simple text object next to it with the same tag directly in an expression.
So to disable the tag the checkbox uses this:
"Parameter:Checkbox.ObjectLink" + '?DNP3BinaryInState.Disable'
The alarm text uses the tag not a Parameter and this works in a rectangle animation as a type 5 PickParam:
"...Tags DNP.FTS Alarm.ObjectLink" + '?DNP3BinaryInState.Disable'
No acknowledge just disable. This is their Alarm Disable Screen and it uses the ‘?DNP3BinaryInState.Disable’ command so whatever that is would be what is wanted. I thought it was changing the tags In Service setting.
The idea was to have a button that could enable or even toggle all 20, 30, 50 or 100 checkboxes on the one Alarm Disable Screen.
All the tags are in the “Tags DNP” group and all the tags are DNP3Binary using the same Outstation reference but they are in many different groups under “Tags DNP” group. Also, there is more than one or two Alarm Disable Screens in the same Outstation so it’s not like all the tags on one Alarm Disable Screen are in the same sub group and they are not all the alarms in the Outstation.
You should reference the DB Schema, otherwise you will continue to get things wrong.
And obviously if the client wants to disable an alarm, and you instead take the entire point out of service, then you've done the wrong thing.
Thankfully the GeoSCADA programmers 'normally' keep similar names for things, so if you look in the schema for DNP3BinaryIn you would have found this...
You click on that, and it brings you to the details for that object type... if you look again for that DNP3BinaryIn then you find exactly DNP3BinaryInState as a CAlarm 'Alarm Condition'.
And then if you follow the CAlarm link on this condition, you get here
Which shows the Enable / Disable methods, which is what is in that PickParam.
One way to do what you're after is to add some metadata to the points (look in the help) which associates them together.
Then you can have something (a button calling script, or a button executing logic) which then queries for all points having the appropriate metadata value.. you can choose how that looks, whether it's a string with semi-colon separators to allow for a point being in multiple groups or whatever.. and you could call the Enable / Disable method on each one of them. There's pros/cons to doing it via Script / Logic... each has their place.
"You should reference the DB Schema, otherwise you will continue to get things wrong.
And obviously if the client wants to disable an alarm, and you instead take the entire point out of service, then you've done the wrong thing."
Why would I change what they are doing? I already have the command it is using. "Which shows the Enable / Disable methods, which is what is in that PickParam." Yes, that is what I want to use that is why I posted it, I don't want to change what they are doing. Unless it can't work in script or logic or something.I’m sorry I said In Service and never said anything about acknowledging anything. They said they click here to take the tag out of service.
"Thankfully the GeoSCADA programmers 'normally' keep similar names for things,"
What is "GeoSCADA"? "Your search for "GeoSCADA" returned 0 result(s)." Am I posting on the Rockwell site again? So, EcoStruxure™ Geo SCADA Expert programmers name all their pumps and valves and such, device 1 through 10,000? Groups, they put all their tags in one big group based on each screen they want to have just in case they ever need to run a script that needs to only find tags used on that screen?
This application has been worked on by a few different companies and some sites have all the tags under a Tags group with no sub groups and all the group and tag names are all upper case. Yuck. Others have the same main tag group and then sub groups for like odor control and other parts of the site and then a pumps group and then the pump tags.
On the new sites they say they want it like this. What is a better alternative I should recommend? They have each site in a big template and the full name on a closed tag looks something like this:
Templates.4 Pump Dual Wet Well.Tags DNP.Odor Control.Damper 3411.Closed
So, it sounds like this is hard to do because the tags being on particular screens don’t give you a filter to the tags used on that screen to then enable or disable.
If all the tags on a screen and only them where in a group you could just find all the tags in that group and enable or disable them. But there is not a command you can run on the group? You would need to make a PickParam kind of command for each tag in script or logic? I can’t change all the tags to be in one group though.
I can’t change all the tags to be in one group but can use the unsupported ViewX interface to go through a screen and find expressions used on that screen.
“But that doesn't tell you what is a point.”
It would come back with the expression string like this and then you would need to get the relative tag name/path out of it? Look for the ("...Tags DNP) part that they all have and the next quote mark?
IIF( "...Tags DNP. FTS Alarm ", "......Library.Colors.Alarm Bar", "......Library.Colors.Mimic Popup Background" )
Then add the (.ObjectLink" + '?DNP3BinaryInState.Disable')
"...Tags DNP.FTS Alarm.ObjectLink" + '?DNP3BinaryInState.Disable'
I'm guessing there is some other command or syntax to run this command in a script?
But also I could add metadata to the points. Tried looking in the manual and I don’t think I can figure that out. If I could then I’d not need the unsupported ViewX interface?
“queries for all points having the appropriate metadata value”
So you add a field to the database and the correct table and tags will have the field and you can put a value in it to filter them to make a list that matches the tags on the alarm disable screen?
Not sure what is the best way to go.
If anyone has some example script on changing the DNP3BinaryInState, finding a tag by metadata or using the unsupported ViewX interface it would be greatly appreciated. It took me 3 hours just to write this reply. It's ok if not. No need to post and tell me I'm dumb.
Discuss challenges in energy and automation with 30,000+ experts and peers.
Find answers in 10,000+ support articles to help solve your product and business challenges.
Find peer based solutions to your questions. Provide answers for fellow community members!