Re: [foxboro] String 2 ASCII

  • From: "Brown, Stanley" <stan.brown@xxxxxxxxxxxxxxxxx>
  • To: "foxboro@xxxxxxxxxxxxx" <foxboro@xxxxxxxxxxxxx>
  • Date: Wed, 16 Jun 2010 06:17:57 -0400

Google is your friend. Try "ASCII table"

Sent from my iPhone

On Jun 16, 2010, at 0:50, "Ahmed K. Sayed" <a.sayed@xxxxxxxxxx> wrote:

> Our platform is mainly XP, where can I find that ASCII manual?
>
>
> -----Original Message-----
> From: foxboro-bounce@xxxxxxxxxxxxx [mailto:foxboro-
> bounce@xxxxxxxxxxxxx]
> On Behalf Of Brown, Stanley
> Sent: Monday, June 14, 2010 4:42 PM
> To: foxboro@xxxxxxxxxxxxx
> Subject: Re: [foxboro] String 2 ASCII
>
>
>
> Converting the ASCII char to its composite integer representation
> can be
> done mathematically, therefore you do not have to use a lookup table.
>
>
>
> Man ascii on one of your UNIX boxes will show you how this works. Just
> remember  you put 2 chars in each int, as chars are 8 bit, and Modbus
> ints are 16 bit.
>
>
>
>
>
>> -----Original Message-----
>
>> From: Stan Brown [mailto:stanb@xxxxxxxxx] On Behalf Of Kevin
>
>> Fitzgerrell
>
>> Sent: Monday, June 14, 2010 9:23 AM
>
>> To: foxboro@xxxxxxxxxxxxx
>
>> Subject: Re: [foxboro] String 2 ASCII
>
>>
>
>> Khaled,
>
>> I'm away from the office now so can't check.  In the documentation
>> you
>
>> can
>
>> look up "subset" of an internal string reference.  I have not done
> this
>
>> in a
>
>> long time, but I believe the format was STRING (1 .. 4) or something
>
>> similar
>
>> to use character 1,2,3,4 of STRING.
>
>>
>
>> The "lookup table" is probably going to be a subroutine with a series
>
>> of IF
>
>> statements comparing each character to the allowable ASCII characters
>
>> to
>
>> determine what it is and writing the appropriate output.
>
>>
>
>> This is relatively trivial programming but because of the number of
>
>> steps
>
>> needed to parse and output values for an 80 character string this has
>
>> the
>
>> capacity to put significant load on the system.  I would lean towards
>
>> processing this on the AW rather than in the controller.  On the AW
>
>> this
>
>> would be a straightforward "C" or a trivial Perl program.
>
>>
>
>> Regards,
>
>>
>
>> Kevin
>
>>
>
>>
>
>>
>
>>
>
>>
>
>> On Mon, Jun 14, 2010 at 8:49 PM, Ahmed K. Sayed <a.sayed@xxxxxxxxxx>
>
>> wrote:
>
>>
>
>>> Kevin,
>
>>>
>
>>> Can you give an example of such sequence? Or at least its main
>
>>> functions?
>
>>> How to read each character individually from a string? How to use
>
>> lookup
>
>>> table inside a sequence?
>
>>>
>
>>> Thanks,
>
>>>
>
>>> Khaled
>
>>>
>
>>> -----Original Message-----
>
>>> From: foxboro-bounce@xxxxxxxxxxxxx [mailto:foxboro-
>
>> bounce@xxxxxxxxxxxxx]
>
>>> On Behalf Of Kevin Fitzgerrell
>
>>> Sent: Monday, June 14, 2010 8:43 AM
>
>>> To: foxboro@xxxxxxxxxxxxx
>
>>> Subject: Re: [foxboro] String 2 ASCII
>
>>>
>
>>> Off the top of my head I don't see any way to do this without
>
>> changing
>
>>> the
>
>>> string to ascii codes on the DCS side.
>
>>> You can do this in sequence logic, one character at a time.  If the
>
>>> operator
>
>>> enters a string, you can read that string in to sequence logic, read
>
>>> each
>
>>> character, use an ASCII lookup table to convert, and then output
>
>> those
>
>>> values to the specified registers as integers or packed.
>
>>>
>
>>> Regards,
>
>>>
>
>>> Kevin
>
>>>
>
>>> On Mon, Jun 14, 2010 at 2:17 PM, Ahmed K. Sayed <a.sayed@xxxxxxxxxx>
>
>>> wrote:
>
>>>
>
>>>> Hello list,
>
>>>>
>
>>>>
>
>>>> I need some help on communication requirement with one MODBUS TCP
>
>>> device
>
>>>> via FDSI link.
>
>>>>
>
>>>> DCS has to send some specific string messages indicating package
>
>>> status,
>
>>>> lot number, time stamp, product type, etc.
>
>>>>
>
>>>>
>
>>>>
>
>>>> What I normally do for such requirements is to map those
> predefined
>
>>>> strings to integer numbers, and through graphics or simple CALCA I
>
>> can
>
>>>> send them.
>
>>>>
>
>>>> The requirements here is bit different, those strings are not
>
>>>> predefined, i.e. any text can be entered by operator must be sent
>
>> to
>
>>> the
>
>>>> MODBUS device for historical notes recording.
>
>>>>
>
>>>>
>
>>>>
>
>>>> The vendor has defined the ASCII mapping he's using, which maps
>
>> every
>
>>>> character to specific register bit coding.
>
>>>>
>
>>>>
>
>>>>
>
>>>> Example: if the DCS transmits string "OFF" then the corresponding
>
>>>> registers must have the following values:
>
>>>>
>
>>>> Register 0001 = 464F
>
>>>>
>
>>>> Register 0002 = 0046
>
>>>>
>
>>>> Register 0003 to 0016 = 0000
>
>>>>
>
>>>> Where 0x46 is the ASCII code for the letter "F", and 0x4F is for
>
>>> letter
>
>>>> "O".
>
>>>>
>
>>>>
>
>>>>
>
>>>> I've tried to use STROUT block, but failed to get it to work. It
>
>> does
>
>>>> not accept the allocated MODBUS registers giving "invalid point
>
>>>> connection".
>
>>>>
>
>>>> There isn't any information mentioned the use of STROUT/STRIN
>
>> blocks
>
>>> in
>
>>>> FDSI TCP/IP & Serial MODBUS documentation; Only for other DCI
>
>> blocks.
>
>>>>
>
>>>>
>
>>>>
>
>>>> Is there any other built-in function that can do this
>
>> transformation
>
>>>> from string to ASCII?
>
>>>>
>
>>>>
>
>>>>
>
>>>> Regards,
>
>>>>
>
>>>>
>
>>>>
>
>>>> Khaled
>
>>>>
>
>>>>
>
>>>
>
>>>
>
>>>
>
>>>
>
>>>
>
>>
> _______________________________________________________________________


>
>>> 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 message may contain TASNEE's confidential information
>
>>> and is
>
>>> intended only for the individual named. If you are not the named
>
>>> addressee you should not disseminate, distribute or copy this e-
>
>>> mail.
>
>>> Please notify the sender immediately by e-mail if you have
>
>>> received this e-mail by mistake and delete this e-mail from your
>
>>> system.The information transmitted in electronic mail does not
>
>>> necessarily represent the views of TASNEE.
>
>>> E-mail transmission cannot be guaranteed to be secured or
>
>>> error-
>
>>> free as information could be intercepted, corrupted, lost,
>
>>> destroyed, received late or incomplete,or could contain viruses.
>
>>> The sender therefore does not accept liability for any error or
>
>>> omission in the contents of this message, which arises as a
>
>>> result of e-mail transmission.
>
>>> No representation is made that this email or any attachments are
>
>>> free of viruses. Virus scanning is recommended and is the
>
>>> responsibility of the recipient ...
>
>>>
>
>>>
>
>>>
>
>>
> _______________________________________________________________________


>
>>> 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
>
>>
>
>
>
>
>
> The information contained in this message and any attached files may
> be
> privileged and/or confidential and protected from disclosure. If you
> are
> not the intended recipient, any disclosure, copying, distribution or
> use
> of any of the information contained in or attached to this
> transmission
> is strictly prohibited. If you have received this transmission in
> error,
> please so notify the sender immediately without reading it. Also,
> please
> promptly destroy the original transmission and its attachments. Any
> views or opinions presented in this message or attachments are those
> of
> the author and do not necessarily represent those of KapStone Paper
> and
> Packaging Corporation or its subsidiaries.
>
>
>
>
>
> _______________________________________________________________________


>
> 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 message may contain TASNEE's confidential information
> and is
> intended only for the individual named. If you are not the named
> addressee you should not disseminate, distribute or copy this e-
> mail.
> Please notify the sender immediately by e-mail if you have
> received this e-mail by mistake and delete this e-mail from your
> system.The information transmitted in electronic mail does not
> necessarily represent the views of TASNEE.
> E-mail transmission cannot be guaranteed to be secured or
> error-
> free as information could be intercepted, corrupted, lost,
> destroyed, received late or incomplete,or could contain viruses.
> The sender therefore does not accept liability for any error or
> omission in the contents of this message, which arises as a
> result of e-mail transmission.
> No representation is made that this email or any attachments are
> free of viruses. Virus scanning is recommended and is the
> responsibility of the recipient ...
>
>
> _______________________________________________________________________


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

The information contained in this message and any attached files may be 
privileged and/or confidential and protected from disclosure. If you are not 
the intended recipient, any disclosure, copying, distribution or use of any of 
the information contained in or attached to this transmission is strictly 
prohibited. If you have received this transmission in error, please so notify 
the sender immediately without reading it. Also, please promptly destroy the 
original transmission and its attachments. Any views or opinions presented in 
this message or attachments are those of the author and do not necessarily 
represent those of KapStone Paper and Packaging Corporation or its subsidiaries.
 
 
_______________________________________________________________________
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: