[foxboro] AW: dmcmd from HLBL
- From: "Rameil, Marcel" <Marcel.Rameil@xxxxxxxxxxxxxxxxxxxxxx>
- To: "foxboro@xxxxxxxxxxxxx" <foxboro@xxxxxxxxxxxxx>
- Date: Mon, 11 Jan 2016 07:31:10 -0500
Dirk,
Is there a way to check in HLBL if certain foxview sessions exist?
Not in a reliable manner that I know of.
I suggest instead to build an exception routine in HLBL that handles block
exceptions (like accessing not existing parameters) in a defined manner. For
many projects I used the following code snippet. SN0001 and MSGGR1 are used for
error reporting in this case (I used a printer port and avoided sending these
messages to operators) as a general convention in all sequence blocks that use
this subroutine. Also the global String S12 named "BLOCK_NAME" needs to be
created in the main code section for this routine to work. Certainly all this
can be adjusted, please use this as a hint how things could go.
I hope this makes any sense to your application.
===========================
{*********************************************************
*
* Block-Exceptions for non-batch Sequence Code
*
* can be used as a starting point for your own SBX
* please note: This is software from an arbitrary
* project to be used as-is without warranty or support.
* This is NOT Foxboro standard software and should only
* be used by experienced engineering personnel which
* is able to adapt it to the local programming
* environment. These routines however are proven in
* use in real world existing projects. If you do not
* understand the code herein look for qualified
* HLBL coding training.
*
* For precise, brief and short questions you may write
* an email to marcel.rameil@xxxxxxxxxxxxxxxxxxxxxx.
*
* This Code needs the global String (S12) variable
* "BLOCK_NAME" to be created in the main code to work.
*
* May 2005, Marcel Rameil, Invensys Duesseldorf, Germany.
*
*********************************************************}
BLOCK_EXCEPTION TO_SYS_ERROR
STATEMENTS
IF OP_ERR = 3 THEN
SN0001 := "!!! SYS_ERR: BAD SET! OP_ERR ",OP_ERR,", B_STMNO
",BLOCK_STMNO,", SUBR_LEV ",SUBR_LEVEL,"!";
ELSEIF OP_ERR = -1 OR OP_ERR = -45 THEN
SN0001 := "!!! SYS_ERR: PARM not found! OP_ERR ",OP_ERR,", B_STMNO
",BLOCK_STMNO,", SUBR_LEV ",SUBR_LEVEL,"!";
ELSE
SN0001 := "!!! SYS_ERR: OP_ERR ",OP_ERR,", B_STMNO ",BLOCK_STMNO,",
SUBR_LEV ",SUBR_LEVEL,"!";
ENDIF;
{ configure alarm devices to MSGGR1 }
SENDMSG(SN0001) TO MSGGR1;
{ Activate Boolean Monitor Input if required }
{ :COMP:MON_BLOCK.BI000X := TRUE; }
{ wait 5 seconds for Exception block to get active }
WAIT 5.0;
ENDEXCEPTION
BLOCK_EXCEPTION TO_USR_ERROR
STATEMENTS
SN0001 := "!!! USR_ERR: OP_ERR ",OP_ERR,", B_STMNO ",BLOCK_STMNO,", SUBR_LEV
",SUBR_LEVEL,"!";
{ configure alarm devices to MSGGR1 }
SENDMSG(SN0001) TO MSGGR1;
{ Activate Boolean Monitor Input if required }
{ :COMP:MON_BLOCK.BI000X := TRUE; }
{ wait 5 seconds for Exception block to get active }
WAIT 5.0;
ENDEXCEPTION
BLOCK_EXCEPTION TO_MANUAL
{ This exception switches the own MA input back to TRUE in case someone put
it to FALSE }
STATEMENTS
WAIT 1.0;
block_name := BLOCK_NAME;
::'block_name'.MA := TRUE;
ENDEXCEPTION
BLOCK_EXCEPTION TO_PAUSED
STATEMENTS
SN0001 := "!!! BLOCK->PAUSED: B_STMNO ",BLOCK_STMNO,", SUBR_LEV
",SUBR_LEVEL,"!";
{ configure alarm devices to MSGGR1 }
SENDMSG(SN0001) TO MSGGR1;
ENDEXCEPTION
===========================
best regards - mit freundlichen Grüßen -
Marcel Rameil
_____________________________________________________________________________________
Marcel Rameil | Schneider Electric Systems Germany GmbH | Industry
Business | Germany, Austria, Switzerland, Eastern Europe | Technical
Sales Consultant Systems
Phone: +49 2131 4062 302 | Fax: +49 2841 1691107 | Mobile: +49 172 3980 302
Email: marcel.rameil@xxxxxxxxxxxxxxxxxxxxxx | Site: : www.iom.invensys.de
| Address: Hermann Klammt Strasse 1-3, D 41460 Neuss, Germany
*** Please consider the environment before printing this e-mail
-----Ursprüngliche Nachricht-----
Von: foxboro-bounce@xxxxxxxxxxxxx [
mailto:foxboro-bounce@xxxxxxxxxxxxx] Im ;
Auftrag von Dirk Pauwels
Gesendet: Montag, 11. Januar 2016 13:21
An: foxboro@xxxxxxxxxxxxx
Betreff: [foxboro] dmcmd from HLBL
Hi list,
Is there a way to check in HLBL if certain foxview sessions exist?
I want to avoid the -45 error if a sequence sends a dmcmd to a non existing
session. I know I can "handle" the error in the exception handler, but want to
avoid the error from happening.
Thanks & Rgds,
Dirk
________________________________
Lawter Notice: The information (including any attachments) contained in this
communication is confidential, private and proprietary, may be privileged or
otherwise protected by applicable law or legal rule, and is intended only for
the use of the addressee(s). Unauthorized use, disclosure, distribution or
copying is strictly prohibited and may be unlawful. If you have received this
communication in error, please notify the sender immediately by reply e-mail,
or by calling the sender, and then delete it completely from your system.
_________________________________________________________________________
This mailing list is neither sponsored nor endorsed by Schneider Electric
(formerly The Foxboro Company). Use the info you obtain here at your own
risks. See the disclaimer at 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 email has been scanned by the Symantec Email Security.cloud service.
______________________________________________________________________
*** Confidentiality Notice: This e-mail, including any associated or attached
files, is intended solely for the individual or entity to which it is
addressed. This e-mail is confidential and may well also be legally privileged.
If you have received it in error, you are on notice of its status. Please
notify the sender immediately by reply e-mail and then delete this message from
your system. Please do not copy it or use it for any purposes, or disclose its
contents to any other person.
_________________________________________________________________________
This mailing list is neither sponsored nor endorsed by Schneider Electric
(formerly The Foxboro Company). Use the info you obtain here at your own
risks. See the disclaimer at 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:
- » [foxboro] AW: dmcmd from HLBL - Rameil, Marcel