One other comment on Sequence Blocks:

Sequence Blocks are VERY CPU intensive.

The time to execute one simple line of Sequence Block code is roughly the
same as the time required to process an AIN block!

So, be cautious about using this approach on a large number of such inputs. 


Regards,


Alex Johnson
10707 Haddington
Houston, TX 77043
713.722.2859 (office)
713.722.2700 (switchboard)
713.932.0222 (fax)
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 


        -----Original Message-----
        From:   Fitzgerrell Kevin [SMTP:[EMAIL PROTECTED]]
        Sent:   Monday, April 23, 2001 6:31 PM
        To:     Foxboro DCS Mail List
        Subject:        Re: ASCII Characters in 16 bit registers


        --- "Loupe, Rory (RJ)" <[EMAIL PROTECTED]> wrote: > List,
        > I prefer not to use a C program when I can do it in an I/A block 
        > relatively easy.  Using the MAIN block would allow me to keep my 
        > strings in a logical grouping.
        > How would you do it in an IND block?  From what I read in B0193AV
you

        > can't "AND" integers (for masking purposes) in an IND block.  
        <snip>
        > Assume I have two characters 'A' and 'B' (in that order) in the 
        > register connected to RI01 of the CALC block.  Therefore the
register

        > contains 0x41 and 0x42.
        <snip>

        Rory,

        In the ind block you can have RI0001 connected to your MAIN block
        analog out (ie. PNT_1) where you are representing character pair
'AB'
        as 0x4142.  
        RI0001 will be 16706.
        Divide RI01 by 256 and truncate to get left hand character value of
65
        (decimal representation of 0x41).
        RI0001 MOD 256 will give you right hand character value of 66
(decimal
        representation of 0x42).
        A subroutine for mapping these decimal equivalents to ascii text
should
        be simple, ie.
        IF (char = 65) THEN
          char_out := "A";
        ELSEIF (char = 66) THEN
          char_out := "B";
        ELSEIF (char = 67) THEN
          char_out := "C";
        etc...

        Regards,

        Kevin FitzGerrell

        
____________________________________________________________________________
_
        http://store.yahoo.com.au - Yahoo! Store
        - It's time you had your business online!

        
-----------------------------------------------------------------------
        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