威纶通官方论坛

setdata int 溢出

[复制链接]
发表于 2015-2-9 20:42:44 | 显示全部楼层 |阅读模式
int weight
weight =1000000
SetData(weight ,LW_Binplc ,8,2)  

执行完以下指令后
页面数值显示  -48576   
数值显示配置:(设备类型:LW 设备地址:2   bin   字数:2)

为什么不能正常显示1000000呢?
发表于 2015-2-26 13:37:42 | 显示全部楼层
macro_command main()

int weight
weight = 1000000
SetData(weight, "Local HMI", LW, 8, 1)

end macro_command
 楼主| 发表于 2015-3-6 10:02:38 | 显示全部楼层
版主你好,谢谢您的回答,年前回家了,所以没有留意您的回答,我用SetData(weight, "Local HMI", LW, 8, 1) 但是编译错误,我用的是eb500
您需要登录后才可以发帖 登录 | 注册

本版积分规则

回复帖子

Archiver|小黑屋|威纶通官网 ( 粤ICP备06054553号 )

GMT+8, 2024-5-15 12:16

Powered by Discuz! X3.4

© 2001-2023 Comsenz Inc.

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