Amogh

ASCII Chercter to decimal Converter

2 posts in this topic

Thanks for the help in advance

i am using mitsubishi fx3g-40mr plc

 

1] i am reading data from camera on serial port. The data camera send is ASCII character 

if camera send 0 i receive 48 if it is 9 i receive 57 which i under stand

but when camera send 00 i receive 12336 and for 01 it shows 12592 it increment by 256

Please some one would tell me

 

2] And if camera send 000 the data receive is 12336 in first resistor and 48 in other

is there some command which i can use directly for this conversion

or any other type

 any help is appreciated

Share this post


Link to post
Share on other sites

Please See the table below. It's just interpertation you are looking at it as a decimal.

ASCI (char) 0 = DEC 48
ASCI (char) 9 = DEC 57

Change your setting in GX-.... to translate into ASCII and you will see the text.

asciifull.gif

 

Decimal 12336 = Hex 3030 
Decimal  48 = Hex 30
Hex 30 (see table above ) = 0 ASCII

Each Data register contains 2 ascii character. So the first 8 bits and the second 98 bits. thats why you have to look at in in HEX or ASCII.
 

 

 

Edited by Gambit

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