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