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
84611members
353910posts

Native Control Dialogue

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.

tfranklin
Lt. Commander
Lt. Commander
0 Likes
6
1387

Native Control Dialogue

I don't believe I've missed anything, but I figure I'll ask anyway.  Is there currently a way to call the native control method from a script that launches the built-in control dialogue box?  In the past/present we use a scripted solution to work around it but was hoping there may be a more simple workaround to just use what's there.  An example workflow is we have an embedded mimic that has a script on it, the user clicks the embedded mimic and the script has a menu pop up with something like:

 

neat thing 1

neat thing 2

neat thing 3

-----------

control

------------

super neat thing

 

user clicks control and rather than calling our scripted sub, we'd just call something like obj.interface.control with no parameters and it would open the ViewX control dialogue. 

Tags (1)
6 Replies 6
BevanWeiss
Spock
Spock
0 Likes
5
1382

Re: Native Control Dialogue

Gee that's a good one.

I've obviously forgotten all the traps of that, I was thinking it would be as easy as just calling the method without providing arguments.  But that complains about not having the right number of arguments.

 

I'm therefore as stumped as you in regards to this.

 

If no solution comes up (from perhaps @AdamWoodland@sbeadle or @JChamberlain ), and you raise it as a feature request, please let me know the number and I'll submit a vote for it also 🙂


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..
Tags (1)
geoffpatton
Commander
Commander
4
1360

Re: Native Control Dialogue

Ok that made me curious if I could get it to work.

This is what I just came up with.

On the control button I set the PickType to 5

 

Then did this vb script.

Function Mimic_Load
Mimic.Layers(0).Item("Btn_2").PickParam = "SCX:////CPointDigitalManual/.Daily Test?CurrentState"
End Function

 

So you just have to construct the string for the Pick Parameter.

I got the SCX... string by setting up a button's Pick Action to do a Method control and then going back and changing from Method to System Command. after selecting system command I press the next button and then copied the string that was shown for Command.

 

Also of note, I am sure you'll be tsting this outside of your templates first, so you'' be able to switch the mimic into edit mode after the function is run. then you can check and see if it set the pick action correctly, but it does not show up in the PickParam animation, you have to look in the standard Pick action configuration.

Tags (1)
BevanWeiss
Spock
Spock
1
1356

Re: Native Control Dialogue

@geoffpatton 

Good workaround 🙂

But it wouldn't work if it was used on a shared embedded mimic right? since Mimic_Load would only get called on first entry into the cache, and hence the PickParam would be identical for every instance..

 

There must be a way to do it with pure script though, perhaps if there was a User Method configured on the point which just called the Control / CurrentValue method (as appropriate) and then you could call that User Method via the object interface model...

That might get around the VBA complaint I got on the incorrect arguments


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..
Tags (1)
tfranklin
Lt. Commander
Lt. Commander
0 Likes
1
1353

Re: Native Control Dialogue

Looks like you went down a similar path that I did!  Ultimately this still won't do what we're trying to do though.  The goal is to have a pick action load menu list, then from the list call the native dialogue.  if from the list we change the pick of the object altogether (which often times is an embedded mimic) we'd have to have a way of changing it back to the normal list behavior after the user enters a value, which just over complicates things a bit. 

 

Your solution works in the event that the pick param is configured to call the method, but I'm still not sure a way to call this from a script out of a menu list. 

 

Workflow in my head would go...

 

1) click the object to reveal a menu list that is built dynamically though script

2) click "control" from the scripted pick menu.  this would call a internal method that launches the dialogue

 

There has got to be a way! lol

 

Tags (1)
geoffpatton
Commander
Commander
0 Likes
0
1352

YRe: Native Control Dialogue

Yeah I did not think about it being on embedded mimics.

Tags (1)
BevanWeiss
Spock
Spock
0 Likes
0
1336

Re: Native Control Dialogue

I just tried the way I thought of with the User Method, and the User Method itself doesn't allow to call the Control.Control (or HandControl on an Internal Point) without providing an argument.

Which makes me think that it's just not possible 😞 (without doing some really wacky stuff)

 

Perhaps if you created a ViewX Interface (the unsupported COM way) then you could use that to call the Control, but then I don't think it would be nice at all.... typically it doesn't have a visible instance, so I'm not sure how you'd go about getting a visible instance, and then it would be separate from the existing ViewX instance.. and there might be some weird stuff in that...

 

I'm not even sure there is a clean way for Schneider / AVEVA to implement what we'd like in the framework.  It couldn't be a new method call on the object itself, since what would that mean if there wasn't a ViewX client to display the dialog... so it would need to be like a script method, but then it only applies on certain objects, so that seems like it wouldn't fit the script model either.

 

I suddenly thought that maybe passing 'nothing' or 'null' into the action might have done the job... but it appears to consider that equivalent to 0 and sets this value (rather than prompting), at least when I tested it on the Override of an internal analog point.

 

I think it needs another scripting function, perhaps like App.InvokeMethod( string PickParam from Method animation )

 

I've tried taking the 'link' from the PickParam of the method and passing it into all the various Navigate / Open options.. none seemed to do the job. For my internal point, the method PickParam looked like this.

SCX:////CPointAlgManual/!test.New Analog Point?CurrentValue

 

My thought was that in the App.InvokeMethod syntax I propose it would then be:

App.InvokeMethod( "SCX"////CPointAlgManual/!test.New AnalogPoint?CurrentValue")

 

It does seem like it might be quite a bit of development effort for this, or similar, from Schneider/AVEVA... so I'm not sure it would get on a roadmap.  But worth feature requesting something all the same 🙂

 

EDIT: My API was bad.. keeping in line with the animation property would be better.


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..
Tags (1)