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

Reply via email to