<?xml version="1.0" encoding="gbk"?>
<rss version="2.0">
<channel>
 <title><![CDATA[关于寄存器中数值如何在触摸屏中显示对应 ..]]></title>
 <link><![CDATA[http://www.ymmfa.com/read-gktid-1765717.html]]></link>
 <description><![CDATA[Latest 50 replies of 关于寄存器中数值如何在触摸屏中显示对应 ..]]></description>
 <copyright><![CDATA[Copyright(C) 工控人家园]]></copyright>
 <generator><![CDATA[www.ymmfa.com]]></generator>
 <lastBuildDate><![CDATA[Fri, 17 Apr 2026 17:04:38 +0000]]></lastBuildDate>
  <image>
 <url><![CDATA[images/rss.gif]]></url>
 <title><![CDATA[工控人家园]]></title>
 <link><![CDATA[http://www.ymmfa.com]]></link>
 <description><![CDATA[工控人家园]]></description>
  </image>
<item>
 <title><![CDATA[]]></title>
 <description><![CDATA[[quote]引用第9楼wjk478于2024-02-05 16:12发表的&nbsp;&nbsp;:
macro_command main()
unsigned short c,a,e
unsigned char b[5]
float d
GetData(a, &quot;MODBUS RTU (zero-based addressing)&quot;, 3x, 2, 1)
.......
[/quote]

功能实现就好，距离完美的程序（别人死我不死，我死也要优雅的死）还有两小步
1、入参检 ..]]></description>
 <link><![CDATA[http://www.ymmfa.com/read-gktid-1765717#2412548.html]]></link>
 <author><![CDATA[gxtmdb82164]]></author>
 <category><![CDATA[综合讨论]]></category>
 <pubdate><![CDATA[Tue, 06 Feb 2024 02:05:20 +0000]]></pubdate>
</item>
<item>
 <title><![CDATA[]]></title>
 <description><![CDATA[macro_command main()
unsigned short c,a,e
unsigned char b[5]
float d
GetData(a, &quot;MODBUS RTU (zero-based addressing)&quot;, 3x, 2, 1)
//读取寄存器数值如：34567（3是放大倍数，4567为有效数值）
DEC2ASCII(a, b[0], 5)//将34567转为ASCII码
ASCII2FLOAT(b[1], d, 4)//将4567转为浮点数
c=b[0]-48//将3的ASC ..]]></description>
 <link><![CDATA[http://www.ymmfa.com/read-gktid-1765717#2412483.html]]></link>
 <author><![CDATA[wjk478]]></author>
 <category><![CDATA[综合讨论]]></category>
 <pubdate><![CDATA[Mon, 05 Feb 2024 08:12:17 +0000]]></pubdate>
</item>
<item>
 <title><![CDATA[]]></title>
 <description><![CDATA[1.蒋数据转换为字符串
2.PLC使用字符串指令，取第一位，得到其精度，
3.PLC使用字符串指令，取除第一位外其它的值，并转换为整数
4.根据2 3条换算真正的浮点数，50046，是数值除以100000,40046是除以10000,30046是除以1000
5.在人机中显示浮点数，设置小数点后位数是可能出现最小精度]]></description>
 <link><![CDATA[http://www.ymmfa.com/read-gktid-1765717#2412333.html]]></link>
 <author><![CDATA[xuxulaifeng]]></author>
 <category><![CDATA[综合讨论]]></category>
 <pubdate><![CDATA[Sun, 04 Feb 2024 08:19:04 +0000]]></pubdate>
</item>
<item>
 <title><![CDATA[]]></title>
 <description><![CDATA[[quote]引用第5楼wjk478于2024-02-01 10:01发表的&nbsp;&nbsp;:

是不是触摸屏写段宏指令对读取的数值进行一个数值转换，问题是这个数值转换思路是什么?寄存器内数值首位是决定放大倍数后几位是有效数值，放大倍数决定有效数值的小数位数
[/quote]

所以让你用宏指令读到HMI里处理，直接转成字符串，然后分成两个子字符串 ..]]></description>
 <link><![CDATA[http://www.ymmfa.com/read-gktid-1765717#2411628.html]]></link>
 <author><![CDATA[gxtmdb82164]]></author>
 <category><![CDATA[综合讨论]]></category>
 <pubdate><![CDATA[Thu, 01 Feb 2024 02:43:09 +0000]]></pubdate>
</item>
<item>
 <title><![CDATA[]]></title>
 <description><![CDATA[[quote]引用第2楼卓发智能于2024-01-31 10:01发表的&nbsp;&nbsp;:
分二步，PLC需要运算一下，屏有内差转换设置。
[/quote]
能不能屏直接读取数值对数值进行转换后再在屏上显示出来，只是现在转换的思路是什么？数值中包含放大倍数和有效数值怎么区别转换]]></description>
 <link><![CDATA[http://www.ymmfa.com/read-gktid-1765717#2411598.html]]></link>
 <author><![CDATA[wjk478]]></author>
 <category><![CDATA[综合讨论]]></category>
 <pubdate><![CDATA[Thu, 01 Feb 2024 02:07:57 +0000]]></pubdate>
</item>
<item>
 <title><![CDATA[]]></title>
 <description><![CDATA[[quote]引用第3楼gxtmdb82164于2024-01-31 10:39发表的&nbsp;&nbsp;:
如果只是显示的话，推荐HMI后写个脚本处理，最简单最灵活
[/quote]
是不是触摸屏写段宏指令对读取的数值进行一个数值转换，问题是这个数值转换思路是什么?寄存器内数值首位是决定放大倍数后几位是有效数值，放大倍数决定有效数值的小数位数]]></description>
 <link><![CDATA[http://www.ymmfa.com/read-gktid-1765717#2411596.html]]></link>
 <author><![CDATA[wjk478]]></author>
 <category><![CDATA[综合讨论]]></category>
 <pubdate><![CDATA[Thu, 01 Feb 2024 02:01:25 +0000]]></pubdate>
</item>
<item>
 <title><![CDATA[]]></title>
 <description><![CDATA[[quote]引用第1楼梦雨天涯于2024-01-30 08:20发表的&nbsp;&nbsp;:
那就把你的数值除以100，找到余数46，然后余数除以100000，得到0.00046就行
[/quote]
放大倍数不是一个固定的值是寄存器数值里决定的是可变的，寄存器里的数值是一个十进制的电压数值]]></description>
 <link><![CDATA[http://www.ymmfa.com/read-gktid-1765717#2411591.html]]></link>
 <author><![CDATA[wjk478]]></author>
 <category><![CDATA[综合讨论]]></category>
 <pubdate><![CDATA[Thu, 01 Feb 2024 01:52:25 +0000]]></pubdate>
</item>
<item>
 <title><![CDATA[]]></title>
 <description><![CDATA[如果只是显示的话，推荐HMI后写个脚本处理，最简单最灵活]]></description>
 <link><![CDATA[http://www.ymmfa.com/read-gktid-1765717#2411380.html]]></link>
 <author><![CDATA[gxtmdb82164]]></author>
 <category><![CDATA[综合讨论]]></category>
 <pubdate><![CDATA[Wed, 31 Jan 2024 02:39:38 +0000]]></pubdate>
</item>
<item>
 <title><![CDATA[]]></title>
 <description><![CDATA[分二步，PLC需要运算一下，屏有内差转换设置。]]></description>
 <link><![CDATA[http://www.ymmfa.com/read-gktid-1765717#2411361.html]]></link>
 <author><![CDATA[卓发智能]]></author>
 <category><![CDATA[综合讨论]]></category>
 <pubdate><![CDATA[Wed, 31 Jan 2024 02:01:19 +0000]]></pubdate>
</item>
<item>
 <title><![CDATA[]]></title>
 <description><![CDATA[那就把你的数值除以100，找到余数46，然后余数除以100000，得到0.00046就行]]></description>
 <link><![CDATA[http://www.ymmfa.com/read-gktid-1765717#2411020.html]]></link>
 <author><![CDATA[梦雨天涯]]></author>
 <category><![CDATA[综合讨论]]></category>
 <pubdate><![CDATA[Tue, 30 Jan 2024 00:20:56 +0000]]></pubdate>
</item>
</channel></rss>