为了解决数据处理过程由于浮点小数累加所导致的结果数据漂移问题,文章提出浮点数-整数(F-I)混合运算的数据处理策略,该策略以编码器的最小分辨率为换算单元,将计算所得的浮点小数指令转化为脉冲数,并将脉冲数的整数部分发送给基于整数运算的伺服控制系统,同时将小数部分保留,与下一周期的指令进行累加,再将累加值的整数部分发送,小数部分继续保留,这种数据处理方法将使指令数据精度控制在小于一个分辨率的范围内.为实现该运算处理策略,开发了基于F-I的多轴控制系统,有效地解决了结果数据漂移问题,并为数控系统的进一步发展提供很好的借鉴.
During the data processing, the accumulation computing of the floating-point decimal will lead to the data drift of the result value. In order to solve this problem, the data processing strategy of floating-point numbers-inte- ger (F-I) hybrid computing is proposed in this paper. The minimum resolution of the encoder is deemed as the conver- sion unit, the calculated decimal floating-point instruction is converted into the number of pulses, the integer part of the number of pulses is sent to the servo control system based on the integer arithmetic, and the decimal part is reserved. The reserved decimal part is used to accumulate with the instruction of the next cycle, then the integer part of the accu- mulated value will still be transmitted to the servo system. The fractional part will be retained. This data processing method can insure the instruction data accuracy in the range of less than a resolution. To realize the data processing strategy, the multi-axis control system based on F-I has been developed, the problem with the data drift of the result value can be solved very well. Furthermore, the research results can provide a good reference for the further develop- ment of CNC.