Sign in to follow this  
Followers 0
Ronny_resistor

CONVERTING TEXT INTO ASCII

6 posts in this topic

I can get someone to type up a spreadsheet with data and then save it as a CSV file. The problem happens when the data has to be converted to ASCII. IS there a program that will convert the CSV Data file into ASCII format that an Omron processor can understand. What I have noticed is that Microsoft's Excel program converts an "A" into the number 65, Omron's 65 equals 'e' I guess all ASCII's are not standard so how can this be done ??

Share this post


Link to post
Share on other sites
A is 65 dec or 41 hex. e is 101 dec or 65 hex. so probably everything is ok just one program uses hexadecimal notationm (omron) and other decimal (excel). just look at any ascii table on the internet (google it) and everything will be clear. regards

Share this post


Link to post
Share on other sites
MS Excel uses decimal ASCII codes, but PLCs use hexadecimal. Two ways to skin that cat: 1) Write formulas or a script in Excel to convert the numbers from decimal to hex before sending the file to the PLC. 2) Use commands in the PLC to convert the decimal to hex. I don't know Omron, but most PLCs have a BCD to binary conversion command that can be used for that purpose. If you need a primer on different numbering systems, there is some help in this forum here (and probably other places). You could also check out various tutorials on line. If you're still stuck, ask here again!

Share this post


Link to post
Share on other sites
Hi, I am going to write an Excel script for you. Please wait for a few minutes. Best Regards,

Share this post


Link to post
Share on other sites
All right, here you are. Hope it works for you. You must enable macros in order to use it properly. Omron_Text_Translate.xls

Share this post


Link to post
Share on other sites
Thank you for your efforts, I will certainly be able to use this. I had sort of given up on the idea of using an Excel spreadsheet. I will try this out and let you know how this is progressing. Once again Thanks Rick

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0