Re: [foxboro] External Reference for Compound:Block.Parameter.Extension in HLBL?

  • From: "Martijn" <mdaatje@xxxxxxxxxxx>
  • To: <foxboro@xxxxxxxxxxxxx>
  • Date: Thu, 15 Jan 2015 22:12:53 +0100

You could connect the PAKCIN to II0001 parameter and then internally extract
the individual bits.

II0001[1] for bit 1 etc.

From de B0400-DF book:
Bit_pattern
Format
destination := BIT_PATTERN ( source )
Description
The BIT_PATTERN statement enables:
- The packing of a set of Boolean values into a bit pattern
- The unpacking of a bit pattern into a set of Boolean values
- The bit pattern that can be stored in a single user-integer parameter
(II000x or IO000x) or in an integer variable, either block or subroutine.

The set of Boolean values can consist of:
- All Boolean user-input parameters
- All Boolean user-output parameters
- One of the four Boolean user-array parameters
- A Boolean local-array variable.

A Boolean formal argument:
- The Boolean parameter (or variable or argument) determines how many bits
are used in the user integer parameter. When a Boolean local array is packed
into a user integer parameter, up to 32 elements are packed. Excess elements
are ignored without an error being raised.
- The data type on the left side of the := sign in the BIT_PATTERN statement
determines whether the bits are packed or unpacked. If the left side is a
user integer parameter, a set of Boolean values are packed into the integer.

Examples:
IO0004 := BIT_PATTERN ( BA0003 )
{ All 16 elements of BA0003 are packed as a bit pattern into IO0004}

IO0008 := BIT_PATTERN ( BO0001 )
{All 16 boolean output parameters are packed as a bit pattern into IO0008}

II0001 := BIT_PATTERN ( Loc_Bool_Arr )
{Up to 32 elements of Loc_Bool_Arr are packed as a bit pattern into II0001}

BI0001 := BIT_PATTERN ( II0002 )
{24 bits of II0002 are unpacked to give all boolean input parameters a
boolean value}

BO0001 := BIT_PATTERN ( Loc_Int_Var )
{16 bits of the Loc_Int_Var are unpacked to give all boolean output
parameters a boolean value}


Another trick is to use the good old MCIN block to seperate the individual
bits from the PAKCIN parameter.
Connent the PAKCIN to MCIN and use the CIN_x parameter in the external
reference.

Regards,

Martijn


> -----Oorspronkelijk bericht-----
> Van: foxboro-bounce@xxxxxxxxxxxxx [mailto:foxboro-bounce@xxxxxxxxxxxxx]
> Namens Neufeld, Brahm
> Verzonden: donderdag 15 januari 2015 21:34
> Aan: foxboro@xxxxxxxxxxxxx
> Onderwerp: [foxboro] External Reference for
> Compound:Block.Parameter.Extension in HLBL?
> 
> All-knowing list,
> I have FCS 5.0 (Archestra IDE) and I would like to do some logic with more
> than 24 boolean inputs (valve & motor statuses).
> 
> I cannot seem to figure out how to use COMPOUND:BLOCK.PARAM.EXT in
> HLBL, specifically the IND block.
> 
> For instance, I can define a bool under VARIABLES:
> BOOL_VAR : B;
> And assign an external reference to it in my STATEMENTS:
>                 BOOL_VAR := COMPND.PAKIN_BLK.PAKCIN.B4;
> 
> The block compiles with this syntax, but IDE shows the block with
OP_ERR="-
> 60", which B0400DF describes "param does not exist... the full pathname
> refers to a block that exists in the control database, but the parameter
with
> given name does not exist in the block". The IND block is held in manual
and
> doesn't do anything.
> 
> Other familiar IDE syntax like "COMPND.PAKIN_BLK.PAKCIN#B4" refuses to
> compile.
> 
> Any thoughts?
> 
> Thanks,
> 
> Brahm Neufeld
> Process Control Engineer
> 
> 
> ________________________________
> IMPORTANT NOTICE ! This E-Mail transmission and any accompanying
> attachments may contain confidential information intended only for the use
> of the individual or entity named above. Any dissemination, distribution,
> copying or action taken in reliance on the contents of this E-Mail by
anyone
> other than the intended recipient is strictly prohibited and is not
intended to,
> in anyway, waive privilege or confidentiality. If you have received this
E-Mail
> in error please immediately delete it and notify sender at the above
E-Mail
> address. Agrium uses state of the art anti-virus technology on all
incoming
> and outgoing E-Mail. We encourage and promote the use of safe E-Mail
> management practices and recommend you check this, and all other E-Mail
> and attachments you receive for the presence of viruses. The sender and
> Agrium accept no liability for any damage caused by a virus or otherwise
by
> the transmittal of this E-Mail.
> 
> 
> 
> __________________________________________________________
> _____________
> 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: