Re: [foxboro] Object visibility with environment

  • From: "Johnson, Alex P \(IPS\)" <alex.johnson@xxxxxxxxxxxxxxxx>
  • To: <foxboro@xxxxxxxxxxxxx>
  • Date: Tue, 8 Aug 2006 12:55:08 -0400

Try this:
 

1)    In /usr/fox/wp/data/init.user define the variables that you need as 
follows:

a.    If you want a global per DM add lines like this to it:

dmllist=NOTVIS

NOTVIS=0

 

This will create a DM global for each DM on the WP whose name is NOTVIS capable 
of holding 161 characters. 256 is the maximum. The name may be up to 8 
characters long.

 

b.    If you want a global per WP add lines like this to it:

gcllist=NOTVIS

NOTVIS=0

 

This will create a DM global for each DM on the WP whose name is NOTVIS capable 
of holding 161 characters. 256 is the maximum. The name may be up to 8 
characters long.

dm means Display Manager (FV, too)

gc means WP (graphics console)

l means long (f=float, t=text)

list means you can create a number of them at one go by separating the names by 
commas.

 

See /usr/fox/wp/data/wp51_glbls.all for more information.

 

2)    In the environment file, you can set and reset the variable:

a.    NOTVIS=1 or

b.    NOTVIS=0

Be sure that all environments set NOTVIS. Failure to do so will lead to errors.

 

3)    In your displays, attach the visible attribute to $NOTVIS.

4)    Good things should happen.

 

 

FYI, these DM variables are created as OM variables whose names are 
<dmName>NOTVIS or <wpLbug>NOTVIS depending on what you do.

 

 

Does this help?

 

 

Regards,

 

Alex Johnson

Invensys Systems, Inc.

10900 Equity Drive

Houston, TX 77041

713.329.8472 (voice)

713.329.1700 (fax)

713.329.1600 (switchboard)

alex.johnson@xxxxxxxxxxxxxxxx

 

-----Original Message-----
From: foxboro-bounce@xxxxxxxxxxxxx [mailto:foxboro-bounce@xxxxxxxxxxxxx] 
Sent: Tuesday, August 08, 2006 5:54 AM
To: foxboro@xxxxxxxxxxxxx
Subject: [foxboro] Object visibility with environment

 

Hi list,

 

 

I need to drive the visibility property of an object with the environment that 
I am using on a DM. What I did was create shared variables with the "omcrt" 
command to tie the visibility. The names of the variables are coincident with 
the DM names in the station. The following steps are what I did:

 

 

 

1) I checked the space variables with the "show_params" command to know if I 
have limitations to create shared variables.

 

 

 

2) I wrote a script to create the variables. The script looks like:

 

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

 

#!/bin/sh

 

# @(#)go_OMCREATE       0.1 04/07/06

 

#

 

 

 

# Document the script here.

 

 

 

#************************************************************

 

# Setup necessary shell variables

 

OMTOOLS=/opt/fox/bin/tools

 

DMCFG=/usr/fox/customer/hi/dmcfg

 

LOCALHOST=`uname -n`

 

 

 

#************************************************************

 

# Put all operating command here

 

DMNAMES=`cat $DMCFG | grep -w "NAME" | awk '$2 ~ /'"$LOCALHOST"'/ {print $3}'`

 

for DM in $DMNAMES

 

do

 

        $OMTOOLS/omcrt -i $DM >/dev/null 2>&1

 

done

 

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

 

 

 

This script can be run from the user_apps.dat to create the variables at the 
start up. Each box in the system will have one variable for each DM name. The 
type of the variables is integer.

 

 

 

3) I added a line to each file environment to set the value of the variables 
with the "omset" command each time I change the environment. The files are the 
Operator_env and Engineer_env:

 

 

 

:::::::::::::::::::

 

Operator_env

 

:::::::::::::::::::

 

...

 

dmcmd run /opt/tools/scripts/setvis 0 $DMNAME (this is the last line)

 

 

 

:::::::::::::::::::

 

Engineer_env

 

:::::::::::::::::::

 

...

 

dmcmd run /opt/tools/scripts/setvis 1 $DMNAME (this is the last line)

 

 

 

The setvis script looks like:

 

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

 

#!/bin/sh

 

# @(#)setvis    0.1 04/07/06

 

#

 

 

 

# Document the script here.

 

 

 

# Setup necessary shell variables

 

OMTOOLS=/opt/fox/bin/tools

 

 

 

# Put all operating command here

 

$OMTOOLS/omset -i $1 $2

 

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

 

 

 

4) Finally, I configured the display file to drive the object visibility with 
these variables. The configuration involves:

 

 

 

In the line where you put the variables which is the path, I wrote $DMNAME.

 

Lowest State: 0

 

Number of a States: 2

 

State : Invis 0 Vis 1

 

   0          0

 

   1          1

 

 

 

I would like to hear your comment about this. May be there is a better solution 
or the steps above have something that could be a problem with other things in 
the system. I have been using this for about three weeks and I haven't found 
problems.

 

 

 

Thanks in advance for the comments you can send me.

 

 

 

Ignacio Queirolo Olivera

 

Control Avanzado

 

Complejo Industrial Ensenada

 

Repsol YPF - Química

 

Tel.: 54 221 429-8400 ext. 26481

 

Fax: 54 221 429-8400 ext. 26209

 

iqueiroloo@xxxxxxxxxxxxx <mailto:iqueiroloo@xxxxxxxxxxxxx> 

 

 

 

 

 

AVISO LEGAL:

Esta información es privada y confidencial y está dirigida únicamente a su 
destinatario. Si usted no es el destinatario original de este mensaje y por 
este medio pudo acceder a dicha información por favor elimine el mensaje. La 
distribución o copia de este mensaje está estrictamente prohibida. Esta 
comunicación es sólo para propósitos de información y no debe ser considerada 
como propuesta, aceptación ni como una declaración de voluntad oficial de 
REPSOL YPF S.A. y/o subsidiarias y/o afiliadas. La transmisión de e-mails no 
garantiza que el correo electrónico sea seguro o libre de error. Por 
consiguiente, no manifestamos que esta información sea completa o precisa. Toda 
información está sujeta a alterarse sin previo aviso. 

 

This information is private and confidential and intended for the recipient 
only. If you are not the intended recipient of this message you are hereby 
notified that any review, dissemination, distribution or copying of this 
message is strictly prohibited. This communication is for information purposes 
only and shall not be regarded neither as a proposal, acceptance nor as a 
statement of will or official statement from REPSOL YPF S.A. and/or 
subsidiaries and/or affiliates. Email transmission cannot be guaranteed to be 
secure or error-free. Therefore, we do not represent that this information is 
complete or accurate and it should not be relied upon as such. All information 
is subject to change without notice.

 

 

 

_______________________________________________________________________

This mailing list is neither sponsored nor endorsed by Invensys Process

Systems (formerly The Foxboro Company). Use the info you obtain here at

your own risks. Read http://www.thecassandraproject.org/disclaimer.html

 

foxboro mailing list:             //www.freelists.org/list/foxboro

to subscribe:         mailto:foxboro-request@xxxxxxxxxxxxx?subject=join

to unsubscribe:      mailto:foxboro-request@xxxxxxxxxxxxx?subject=leave

 


 
 
_______________________________________________________________________
This mailing list is neither sponsored nor endorsed by Invensys Process
Systems (formerly The Foxboro Company). Use the info you obtain here at
your own risks. Read http://www.thecassandraproject.org/disclaimer.html
 
foxboro mailing list:             //www.freelists.org/list/foxboro
to subscribe:         mailto:foxboro-request@xxxxxxxxxxxxx?subject=join
to unsubscribe:      mailto:foxboro-request@xxxxxxxxxxxxx?subject=leave
 

Other related posts: