加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

ABB_800xA学习笔记263:System_800xA_Control_6.0_AC_800M_Configuration53

(2023-12-17 19:03:24)
标签:

abb

system_800xa_ac800m

配置手册

功能和组件

分类: ABBDCS
继续学习ABB 800xA配置手册第一章功能和组件,进入第131页。
How does AC 800M handle the result when result is out of limits
当结果超限时,AC 800N如何处理

Arithmetical calculations near the range limits will result in either overflow or underflow.
数学计算接近范围限制将导致上溢或者下溢。
Division by zero will result in the largest positive value if the numerator is positive and the largest negative value if the numerator is negative.
如果分子为正数,除以零导致最大的正数,如果分子为负数,除以零将导致最大的负值。
In some rare case could the result be NaN (Not a Number).
极少数情况下,结果是NaN(不是数字)
To ensure that the result is proper values use the function RealInfo. See online Help for details about RealInfo.
要确保结果是正确的值,使用函数RealInfo,有关RealInfo详细信息,请看联机帮助。
How to use floating point
如何使用浮点数
The IEEE Standard for Floating-Point Arithmetic (IEEE 754) is a technical standard for floating-point computation. A floating point value has the type real in IEC61131-3.
IEEE浮点计算标准(IEEE 754)是浮点数计算的技术标准。浮点数值在IEEE61131-3中为实数。
Arithmetic
算数
A floating point value has typically 7 significant figures. If a big and a small floating point value are added there is not enough significant figures.
浮点数值通常有7个有效数值。如果将大浮点值和小浮点值相加,则没有足够有效数字。
Example:
例如:
An accumulator r1 is incremented by a small value r2: "r1:= r1 + r2;". It will work fine when r1 is small but suddenly r1 won't increase anymore, and that is because the sum has too many significant figures. If for instance r1 = 123456.0 and r2 = 0.0009 the sum r1 should be 123456.0009. But this value will be truncated to 123456.0, thus no increase of r1.
累加器r1递增一个小值r2,r1:=r1+r2;  当r1很小,可以正常工作。但当和有太多有效数字就突然不再工作了。例如,如果 r1 = 123456.0 和 r2 = 0.0009,则总和 r1 应为 123456.0009。If for instance r1 = 123456.0 and r2 = 0.0009 the sum r1 should be 123456.0009.
The solution is to use another accumulator that accumulates r2 up to a size that could be safely added to the final accumulator r1.
解决方案是使用另一个累加器,该累加器将 r2 累积到可以安全地添加到最终累加器 r1 的大小。
 Division
除法
Division by zero will result in the largest positive value if the numerator is positive and the largest negative value if the numerator is negative.
如果分子为正数,除以零将得到最大的正值。如果分子为负数,则为最大负值。
 Comparison
比较
Don't do "b1:= r1 = r2;" to find out if two floating point values are the same. r1 and r2 might be shown as the same value but have different binary representation. You probably want to do something like "b1:= abs(r1 - r2) < 0.001;"
不要执行“b1:= r1 = r2;”来确定两个浮点值是否相同。R1 和 R2 可能显示为相同的值,但具有不同的二进制表示形式。您可能想执行类似“b1:= abs(r1 - r2) < 0.001;”
 Overflow
溢出
A floating point value might get the special value "overflow" if for instance two big values are multiplied. Any subsequent use of an overflow value will result in a new overflow value. Thus one overflow value might be spread through a computation unit every value is an overflow. When there is a risk that an operation might give an overflow the function RealInfo can be used. See Online Help for details about RealInfo.
例如,如果将两个大值相乘,浮点值可能会获得特殊值“溢出”。后续使用溢出值将导致新的溢出值。因此,一个溢出值可能分布在一个计算单元中,每个值都是一个溢出值。当存在操作可能产生溢出的风险时,可以使用函数 RealInfo。有关 RealInfo 的详细信息,请参阅联机帮助。

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有