Environment Variables and Global Signals

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Environment Variables and Global Signals >

Environment Variables and Global Signals

IGS. / NGS. - If-Global-Signal (Mutex,Atom)

Previous Top Next


MiniRobotLanguage (MRL)

 

IGS. Conditional Statement

If Global Signal

 

 

Intention

 

Conditional Statement.

 

Test if a specified Global Signal (Atom) or Global Alive-Signal (Mutex) exists.

Most often they will be set from another Robot.

Such a Signal has a name, and it is is set or is not set.

Such a Signal can be set or tested from any windows application to signal something to other programs. Normally the SGS. - command is used to set or delete these signals.

 

A Mutex can be set from another instance of this robot using SGS - Set Global Signal (Mutex) or any other application, using the windows-API CreateMutex.

While a "Alive Signal" (=Mutex) can only be deleted by the application that created the Signal, the second Sort of Signals, the so called "Atoms" can be deleted by anybody who knows their name.

 

The negative Form of this statement is NGS..

 

* Mutex: systemwide, global Signal.

 

 

Syntax

 

IGS.P1[|A] … ELS. … EIF.

 

 

Parameter Explanation

 

P1 - Variable = Variable (must be a Variable or Stackvar, Len=5)

   do NOT use Search Patterns with this command.

 

A - If P2 evaluates to "A" then IGS. does check for so

   called "Atoms". This is the second sort of global Signals

   that can be set using SGS. Command.

 

 

 

 

Example

 

'***********************************

' IGS.-Test

' Let this script run on instance 1

'***********************************

SGS.Peter

DOL.1

IGS.Theo

PRT. -Theo-

'SGS.Theo|R

ELS.

PRT. . . .

EIF.

PAU.0.1

OOP.

END.

 

 

'***********************************

' IGS.-Test

' Let this script run on instance 2

'***********************************

SGS.Theo

PAU.5

SGS.Theo|R

PAU.5

SGS.Theo

 

PAU.3

 

END.

 

 

 

 

Remarks

 

-

 

 

Limitations:

 

-

 

 

See also:

 

    SGS - Set Global Signal (Mutex)