Bulan Sabit Posted December 19, 2014 Report Posted December 19, 2014 hai everuone, I have a problem with ASCII programming. how or use any command to convert the ASCII value to Decimal ( D40 Value ) I beg you as soon as possible, because I'm pressed for time. please see the attachment Quote
Inntele Posted December 19, 2014 Report Posted December 19, 2014 If you are pressed in time, a quickest way is to look the programming manual, that contain the information you need, than to publish the banal question and to wait an answer on forums. Or at least use the search on forum, because before you this question has been asked for several times. All in your hands! Quote
Bryll Posted December 19, 2014 Report Posted December 19, 2014 I used the function DEVAL first to convert the ASCII string to REAL value, then REAL_TO_DINT to get it in DINT format when building a communication protocol to an old chiller unit. If you need interger value, use REAL_TO_INT after DEVAL. Quote
Ron_S Posted December 20, 2014 Report Posted December 20, 2014 Blimey Bryll you took nearly 5 hours to answer. Didn't you read, he said he was pressed for time.... come on chop chop. 2 Quote
Bulan Sabit Posted December 22, 2014 Author Report Posted December 22, 2014 I'm apologize to all, because I was almost confused to ask anyone else. I only hope in this forum I get the answer, because the program I want to wear on the 25th of December of this month. once again, i am sorry. Quote
Inntele Posted December 22, 2014 Report Posted December 22, 2014 Dear Bulan, As said, no problem you can get the answer to your question immediately just by using the search option on this forum or by learning the programming manual. Please, take in mind, that experts do not have a prejudice to newbies and are glad to help anyone, who has met with difficulties, if the man itself takes efforts to find the answer. Quote
Hatchy Posted December 22, 2014 Report Posted December 22, 2014 Assuming you are using GX Works and only looking for numbers you can use the WTOB instruction to split the two characters into two locations and subtract 30 HEX from each register to give you the number in decimal. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.