the excution sequence of vba and SCADA Basic

5 Posts
3 Users
0 Likes
23 Views
fl.chen
(@fl-chenarcinfo-com)
Posts: 170
Reputable Member
Topic starter
 

Hello experts,

When you click a button to trigger two type of scripting at the same time:VBA and SCADA Basic. How to let SCADA Basic excutes before VBA. I mean SCADA basic excute first, then VBA excutes.

Thanks

Mark

 
Posted : 08/09/2015 3:21 pm
ACHT
 ACHT
(@a-chaverotarcinfo-com)
Posts: 161
Reputable Member
 

Probably with an animation Execute/Procedure ! Not with a VBA event on the graphic object.

 
Posted : 08/09/2015 8:59 pm
n.kunzer
(@n-kunzerarcinfo-com)
Posts: 1236
Member Moderator
 

Hi Mark,

It depends exactly what you want.

1. You want starting the SB execution then start VBA execution but you dont want waiting the end of SB function before starting VBA.
In this case you must apply first the Send/Program anmation and then the VBA Execute/Procedure

2. You want starting the SB execution then start VBA execution but you want waiting the end of SB function before starting VBA.
In this case you must must apply the Send/Program anmation, set a PcVue variable at the end of SB function and declare this variable "WithEvents" in VBA. When this variables will be set by SB function then the VBA will be executed.

Nico

 
Posted : 09/09/2015 7:18 am
fl.chen
(@fl-chenarcinfo-com)
Posts: 170
Reputable Member
Topic starter
 

Thanks Nicolas.

For SB Send/Program anmation and the VBA Execute/Procedure animation,it had tried to open two mimics or set same variable with SB and VBA on one button, VBA procedure always is excuted first.

BR,
Mark

 
Posted : 09/09/2015 9:17 am
n.kunzer
(@n-kunzerarcinfo-com)
Posts: 1236
Member Moderator
 

I checked and, yes, you are right!

I think you can make a SPR.

But, in the 2 points I explained, which one do you want?

I dont know what your customer wants to do exactly but making an algorithm depending on that kind of timing looks quite bad...

If you want you can skype me to explain.

Nico

 
Posted : 09/09/2015 10:18 am