Skip to content

Dn9x/dn-modbus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dn-modbus

在Modbus Slave中配置如下四个寄存器, 图片 可以根据代码中xml/sensor.xml这个文件进行配置(注意ip):

  <registers>
		<register>
			<address>0</address>
			<defaultValue>123</defaultValue>
			<type>DI</type>
		</register>
		<register>
			<address>1</address>
			<defaultValue>12</defaultValue>
			<type>DO</type>
		</register>
		<register>
			<address>2</address>
			<defaultValue>53</defaultValue>
			<type>IR</type>
		</register>
		<register>
			<address>3</address>
			<defaultValue>63</defaultValue>
			<type>RE</type>
		</register>
	</registers>

然后运行程序中Test,你就可以读取和设置模拟器上面的值了。

Releases

No releases published

Packages

No packages published

Languages