I'm pretty sure there is no function built in to do the conversion for you. I'm fairly sure Foxboro didn't think there was any need for a control system to have much in the way of string and conversion functions available. What modbus device are you sending history records to? Regards, Kevin As far as example subroutine, I don't have one handy, but it's really not that hard. Just long. On Sat, Jun 19, 2010 at 5:20 PM, Ahmed K. Sayed <a.sayed@xxxxxxxxxx> wrote: > Isn't there any function or example subroutine that can convert char > into ASCII codes in HLBL (IND blocks)? > I think I can manage the arrangements for the ASCII codes later for > sending over MODBUS once having them in the first place. > > Running scripts over AW is not preferred idea here; the history of the > MODBUS device will depend on the ASCII codes I'm sending for records. > > Khaled > > > -----Original Message----- > From: foxboro-bounce@xxxxxxxxxxxxx [mailto:foxboro-bounce@xxxxxxxxxxxxx] > On Behalf Of Kevin Fitzgerrell > Sent: Wednesday, June 16, 2010 3:16 PM > To: foxboro@xxxxxxxxxxxxx > Subject: Re: [foxboro] String 2 ASCII > > OK, I see where you're going. I'm not sure you can do it in the I/A > side > though. You can pull the "D" out of your string using subset of your > string > in hlbl on an independent block, but I don't think you can access the > bit > pattern for the D. It remains a type string and references as value 0 I > believe. > If you send the string from I/A to a script/program on the AW then this > becomes trivial. But then, a lookup table in an AW side script/program > is > also trivial. If he needs to keep this in the CP it's more challenging. > > Cheers, > > Kevin > > On Wed, Jun 16, 2010 at 8:23 PM, Brown, Stanley < > stan.brown@xxxxxxxxxxxxxxxxx> wrote: > > > The "D" is stored in memory somewhere. Given that, Thus it is a bit > > pattern. Looking at the OP first article, it appeared to me that what > he > > needed was just the 2 ASCI chars packed into a 16 bit Modbus register. > Using > > string manipulation routines, you should be able to get access to the > byte > > the "D", in your example is stored in, right? Then it's just a matter > of > > packing the upper and lower character into one 16 bit register. > > > > Does this make sense? > > > > > > > -----Original Message----- > > > From: Stan Brown [mailto:stanb@xxxxxxxxx] On Behalf Of Kevin > > > Fitzgerrell > > > Sent: Wednesday, June 16, 2010 7:10 AM > > > To: foxboro@xxxxxxxxxxxxx > > > Subject: Re: [foxboro] String 2 ASCII > > > > > > I did look up the ascii man page, but I must be dense, I don't see > how > > > to > > > mathmatically convert a "D" for instance to an ascii code number > > > without > > > using some kind of lookup/case/if structure. > > > Can you elaborate? > > > > > > Cheers, > > > > > > Kevin > > > > > > On Wed, Jun 16, 2010 at 7:17 PM, Brown, Stanley < > > > stan.brown@xxxxxxxxxxxxxxxxx> wrote: > > > > > > > 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. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________________________________ > > > 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 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