cancel
Showing results for 
Search instead for 
Did you mean: 

waituntil with global variables

Valued Contributor
Valued Contributor

Hi everybody,

 

how do I check in the attached situation my global variable "Umlagern_Puffer6 to -11" in my waituntil-statement?

 

The method you see in the picture is the exit method of the buffers behind the SingProc's.

 

Thanks in advance and best regards,

Henner

4 REPLIES

Re: waituntil with global variables

Valued Contributor
Valued Contributor

Here is the ScreenShot i wanted to attache. Sorry Smiley Very Happy

Re: waituntil with global variables

Siemens Phenom Siemens Phenom
Siemens Phenom

Hello Henner,

Try the following code:

var VarName := str_to_obj("Umlagern_"+?.name)
waituntil VarName.value

 

str_to_obj returns the variable object. To get its value you can use its attribute 'value'.

Regards,

Ralf

Re: waituntil with global variables

Valued Contributor
Valued Contributor

Works perfectly.

 

I have tried

 

waituntil str_to_obj("Umlagern_"+?.name).value

- before but that doesn't work. Could you explane me the difference between those?

 

 

Best Regards,

Henner

Re: waituntil with global variables

Siemens Phenom Siemens Phenom
Siemens Phenom
waituntil needs an expression that can be 'watched'. Most of the object attributes can be watched. You can see this in the 'Show Attributes and Methods' (F8) dialog. Function calls on the other hand cannot be watched. So only a simple path is allowed.
Regards,

Ralf