Temporary Variables

6 Posts
3 Users
0 Likes
43 Views
RM
 RM
(@r-martinarcinfo-com)
Posts: 56
Estimable Member
Topic starter
 

Is there a way to set temporary variables, declared within a mimic, (Like BIT%) from within SCADA Basic?
As temporary variables exist in the HMI environment and SCADA Basic effectively runs in the HMI environment I thought it might work - but my attempts so far have failed....

Not urgent - just to satisfy my curiosity.

Cheers, Robin

 
Posted : 26/03/2015 3:06 pm
n.kunzer
(@n-kunzerarcinfo-com)
Posts: 1236
Member Moderator
 

Arrgghh Robin you are so curious! :ohmy:

Yes it is possible.

dim sTmp as str;

sTmp = "BIT1%";
?sTmp = 1;

 
Posted : 27/03/2015 10:40 am
(@j.becker@pcvue.de)
Posts: 0
New Member Guest
 

Hello Nico,

what kind of write-behavior can we expected manipulating the temporary variables of a mimic?

- like the variable database - variables
- like the TemporaryDB - variables

my experience shown me, that the biggest difference between the above one is that with temporaryDB - variables you don´t have problems when manipulating them more than one times in a SCADA Basic function (e.g. using as counter, which should be shown in a mimic). You should not use Variable-Database - variables more than one time in one SCADA - Basic function. If I remember well, the async-execution of the SCADA - Basic is the problem.

 
Posted : 30/03/2015 2:37 pm
n.kunzer
(@n-kunzerarcinfo-com)
Posts: 1236
Member Moderator
 

There are 2 points.
- Temporary Variable created using TemporaryDB instruction is written synchronously (not sure but almost!)
- Temporary Variable coming from a mimic (i.e. REG01%) are like standard variable and are written asynchronously.

But I wouldn't bet on it. Who want testing?
Maybe the one who asked the question ... :whistle: 👿

 
Posted : 30/03/2015 3:14 pm
(@j.becker@pcvue.de)
Posts: 0
New Member Guest
 

Do you mean the person who stared the post or asked the question? 😉 :whistle:

I had often problems with this behavior, I think we should request an answer from a developer and make a Doc-SPR to have a defined state.

 
Posted : 01/04/2015 4:50 pm
(@j.becker@pcvue.de)
Posts: 0
New Member Guest
 

Hello,

I have now an answer from Dominique,

there are two categories of variables:

- permanent Variables (created in the e.g. AE)
- temporary Variables (created in Animations and SCADA Basic -Temporary_DB-)

The first category is written asynchronously.
The second is bound to the UI and is written synchronously.

-> closed 😉

 
Posted : 23/07/2015 12:32 pm