Ah, almost right this first time,

It should ofcourse be:

FOR i := 1 TO 9 DO
  number := i;
  ::'block_name'.RI000'number' :=0;
ENFOR
FOR i :=  10 TO 12 DO 
  number := i;
  ::'block_name'.RI00'number' := 0;
ENDFOR

where 'i' is declared as interger and 'number' as string.

-----Original Message-----
From: Marsman, Bram [mailto:[EMAIL PROTECTED]]
Sent: woensdag 29 augustus 2001 10:10
To: 'Foxboro DCS Mail List'
Subject: RE: HLBL question


If I understand you correct, you want to set one or more Real-outputs on the
sequence block to 0?
Unfortunately, in HLBL you cant make a variable variable. So you cant build
a string which happens to match a variable you declared and then use it in a
statement. However, you CAN build variable external references in a sequence
to write to its own block. The catch is, you can only do this using input
parameters. (cant set RO000x from "outside") 
So instead of using RO0001 to RO0012, use RI0001 to RI0012, then:

Let's assume the number of the RI you want to set is on II0001, and
block_name and number are Strings:


block_name := BLOCK_NAME;
number := II0001;
::'block_name'.RI000'number' := 0;

If the number > 9, you must redirect the program (like below)
If you want to set all 12 (initialisation or something) then you could:


FOR number := 1 TO 9 DO
  ::'block_name'.RI000'number' :=0;
ENFOR
FOR number :=  10 TO 12 DO 
  ::'block_name'.RI00'number' := 0;
ENDFOR

If you insist on using the RO, ignore this suggestion.


A general warning applies here:
Be "critical" using external references (:C:B.P) in sequences, as they could
noticeably increase network load when used unwise. An external reference to
a compound not in the same CP causes a broadcast. Not a problem, unless you
have hundreds of them at the same time. So avoid cunstructions like 'WAIT
UNTIL :COMPOUND:BLOCK.PARAMETER" since it will do a broadcast each BPC.
Having a bunch of sequences doing this in a bunch of different CP's to a
bunch of other CP's at the same time can cause eh... "unessecary" network
traffic. (this doesn't apply to above example since we stay in the same CP)

Hope this helps,

Bram Marsman.




-----Original Message-----
From: Stefano Persico [mailto:[EMAIL PROTECTED]]
Sent: woensdag 29 augustus 2001 0:09
To: Foxboro DCS Mail List
Subject: HLBL question


Hi list

i built an HLBL source where are defined some user labels for Real
Output with a name like OUT1 OUT2 and so on.
I've also an array (in a subroutine) with a S12 internal flag used to
build the same name of the ones used for RO.
I made this because i need to reset to zero a certain real output when a
given integer and boolean are passed to the sequence.

So the structure af the array is
sorg[1] := "OUT1" ; sorg[2] := "OUT2" ; .........(sorg --> S12)

I call the subroutine at first step of the sequence and some steps after
i've the IF clause wich test the status of a given boolean and use the
array with a given integer .
I supposed to do
        sorg[integer_input] := 0;
but nothing run.
It's probably because my array build a STRING which can't have a real
value ???
If so how can i build the name of a given real output user label and
then put it to a given real value ???

(OK probably is the worst way to have this function but when i started i
didn't know where i'll arrive.......)

Thank's lot


-----------------------------------------------------------------------
This list is neither sponsored nor endorsed by the Foxboro Company. All 
postings from this list are the work of list subscribers and no warranty 
is made or implied as to the accuracy of any information disseminated 
through this medium. By subscribing to this list you agree to hold the 
list sponsor(s) blameless for any and all mishaps which might occur due to 
your application of information received from this mailing list.

To be removed from this list, send mail to 
[EMAIL PROTECTED] 
with "unsubscribe foxboro" in the Subject. Or, send any mail to
[EMAIL PROTECTED]

-----------------------------------------------------------------------
This list is neither sponsored nor endorsed by the Foxboro Company. All 
postings from this list are the work of list subscribers and no warranty 
is made or implied as to the accuracy of any information disseminated 
through this medium. By subscribing to this list you agree to hold the 
list sponsor(s) blameless for any and all mishaps which might occur due to 
your application of information received from this mailing list.

To be removed from this list, send mail to 
[EMAIL PROTECTED] 
with "unsubscribe foxboro" in the Subject. Or, send any mail to
[EMAIL PROTECTED]

-----------------------------------------------------------------------
This list is neither sponsored nor endorsed by the Foxboro Company. All 
postings from this list are the work of list subscribers and no warranty 
is made or implied as to the accuracy of any information disseminated 
through this medium. By subscribing to this list you agree to hold the 
list sponsor(s) blameless for any and all mishaps which might occur due to 
your application of information received from this mailing list.

To be removed from this list, send mail to 
[EMAIL PROTECTED] 
with "unsubscribe foxboro" in the Subject. Or, send any mail to
[EMAIL PROTECTED]

Reply via email to