The DTOS instruction in Logix processors converts a DINT into a decimal ASCII string. It is sometimes required to convert numbers to different bases (most usually Hexadecimal, Binary and Octal). This AOI converts a positive DINT number (Source) to an ASCII string of any base (Base) between 2 and 16 and stores the result in Destination. The program operates by dividing the Source (numerator) by Base (denominator) and storing the remainder (converted to an ASCII character) in Destination. The integer result of this division is then set as the new numerator (Source) and is divided by base and the remainder is stored. This process is repeated until the numerator (Source) is less than base.
The instruction sets the Error bit when Source is negative or when Base is outside the range 2 - 16.
DTBN_AOI_V1_3_Rev17.ACD
(315.91 KB, 售价: 1 E币)
DTBN_Converter_V1.3_Rev17.L5X
(11.17 KB, 售价: 1 E币)
【必读】版权免责声明
1、本主题所有言论和内容纯属会员个人意见,与本论坛立场无关。2、本站对所发内容真实性、客观性、可用性不做任何保证也不负任何责任,网友之间仅出于学习目的进行交流。3、对提供的数字内容不拥有任何权利,其版权归原著者拥有。请勿将该数字内容进行商业交易、转载等行为,该内容只为学习所提供,使用后发生的一切问题与本站无关。 4、本网站不保证本站提供的下载资源的准确性、安全性和完整性;同时本网站也不承担用户因使用这些下载资源对自己和他人造成任何形式的损失或伤害。 5、本网站所有软件和资料均为网友推荐收集整理而来,仅供学习用途使用,请务必下载后两小时内删除,禁止商用。6、如有侵犯你版权的,请及时联系我们(电子邮箱1370723259@qq.com)指出,本站将立即改正。
|