Sign in to follow this  
Followers 0
Van

H: Getting ASC (four bytes) equiv of HEX value (word)

3 posts in this topic

I thought I understood the ASC command but it seems I don't and I have been pulling my hair out trying to figure this out... (I'm a rookie PLC programmer). I have the math done. I see my word (D500) and it contains 0FA0 (i.e. 4000). What is stumping me is converting the WORD containing 0FA0 to it's true ASCII equivalent of "0FA0" (i.e. four bytes / two words). I think I am missing a step/command and I'm not to sure where to turn and read.

Share this post


Link to post
Share on other sites
You must separate ascii symbols in different words and then converts them by ASC instruction. You can use MOVD instruction to have 2 word with #000F and #0A00 inside. Anfter you can convert these 2 words by ASC instruction. Andrea

Share this post


Link to post
Share on other sites
*sigh* Of coarse, how obvious (now). I was making a mountain out of a mole hill. Thank You!

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