找回密码
 注册

QQ登录

只需一步,快速开始

搜索

[基本使用] [logix5000源程序]Number Converter AOI

[复制链接]
山海致远 发表于 2019-4-6 20:42:19 | 显示全部楼层 |阅读模式
厂商
厂商: AB
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币)
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|ELEOK |网站地图

GMT+8, 2024-12-23 20:16

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表