Browse FAQs

How do I convert integer to ASCII using Twido Suite and rearrange the bytes order?

Published date: 27 April 2019

Goals and Symptoms

Goals: To explain the new function available in Twido firmware 5.0 or higher.

Causes and Fixes

The new function to convert Integer to ASCII characters is available in Twido firmware 5.0 or higher. The INT_TO_ASCII function always writes the Most Significant Byte (MSB) first.
The End character is "Space" (ASCII 32). Also the function automatically calculates how many memory words (%MWs) should be filled with the ASCII values ( from 1 to 4 %MWs).
After the conversion, the customer can use the ROL (Rotate to Left) function to rearrange the bytes order.
Below is an example converting an integer value to ASCII characters and rearranging the bytes order. You may use the attached PLC code example if are converting integer value to 3 or 4 ASCII characters.


Was this helpful?

What can we do to improve the information ?

Can't find what you are looking for?

Reach out to our customer care team to receive information on technical support, assistance for complaints and more.