Difference between revisions of "Modbus Handler Service+ EIServiceSDK"

From ESS-WIKI
Jump to: navigation, search
Line 1: Line 1:
 +
<parsererror style="display: block; white-space: pre; border: 2px solid #c77; padding: 0 1em 0 1em; margin: 1em; background-color: #fdd; color: black">
 +
=== This page contains the following errors: ===
 +
<div style="font-family:monospace;font-size:12px">error on line 1 at column 4311: attributes construct error </div>
 +
=== Below is a rendering of the page up to the first error. ===
 +
</parsererror>
 
<font face="Droid Sans, sans-serif"><font size="6">Overview</font></font>
 
<font face="Droid Sans, sans-serif"><font size="6">Overview</font></font>
  
Line 25: Line 30:
  
  
&#x5B;&#x5B;File:|720x406px&#x5D;&#x5D;
+
[[File:Modsim32 01.png|center|720x406px]]
  
  
Line 95: Line 100:
  
  
<font face="Droid Sans, sans-serif"><font size="6">Demo Program</font></font>
+
<font face="Droid Sans, sans-serif"><font size="6"></font></font>
  
 +
<font face="Droid Sans, sans-serif"><font size="6">Demo Program</font></font><font face="Droid Sans, sans-serif"><font size="6"></font></font>
  
  
#
+
<div></div>
 
 
<font face="Droid Sans, sans-serif"><font size="3">Run SNTest.exe and select item 5) Set Service’s Action.</font></font>
 
 
 
 
 
 
 
&#x5B;&#x5B;File:|714x444px&#x5D;&#x5D;
 
 
 
 
 
 
 
 
 
 
 
 
 
<ol start="2">
 
<li><font face="Droid Sans, sans-serif"><font size="3">To do a data Write Demonstration, please set the Service Name, Plugin Name, Sensor Name, Data Type and the value of Data that you want to write, for example</font></font></li>
 
</ol>
 
 
 
 
 
 
 
<font face="Droid Sans, sans-serif"><font size="3">'''Service Name: Modbus_Handler'''</font></font>
 
 
 
<font face="Droid Sans, sans-serif"><font size="3">'''Plugin Name: Modbus_Handler'''</font></font>
 
 
 
<font face="Droid Sans, sans-serif"><font size="3">'''Sensor Name: Modbus_Handler/Holding Registers/Data0'''</font></font>
 
 
 
<font face="Droid Sans, sans-serif"><font size="3">'''Data Type: v'''</font></font>
 
 
 
<font face="Droid Sans, sans-serif"><font size="3">'''Data: 66'''</font></font>
 
 
 
 
 
 
 
<font face="Droid Sans, sans-serif"><font size="3">After completed the procedure, the numbers will be written into assigned variable by EIService SDK function.</font></font>
 
 
 
 
 
 
 
&#x5B;&#x5B;File:|812x465px&#x5D;&#x5D;
 
 
 
 
 
 
 
 
 
 
 
 
 
<ol start="3">
 
<li><font face="Droid Sans, sans-serif"><font size="3">You can check ModSim32 screen to confirm the procedure of data write.</font></font></li>
 
</ol>
 
 
 
 
 
 
 
&#x5B;&#x5B;File:|683x463px&#x5D;&#x5D;
 
 
 
 
 
 
 
<font face="Droid Sans, sans-serif"><font size="3">(End)</font></font>
 

Revision as of 08:16, 28 December 2017

<parsererror style="display: block; white-space: pre; border: 2px solid #c77; padding: 0 1em 0 1em; margin: 1em; background-color: #fdd; color: black">

This page contains the following errors:

error on line 1 at column 4311: attributes construct error

Below is a rendering of the page up to the first error.

</parsererror> Overview


SNTest.exe is a demo program to show how to use EIService SDK API to do a Modbus data read action from Modbus register or data write action to the register.




Modbus Simulator


Start ModSim32 and configure the register for the demonstration:


  • Set Holding Register data address: 0001 (From first Holding Register address)
  • Set Length: 8
  • Set data from address 40001 ~ 40008, for example 101, 102 , 103 …


Modsim32 01.png







WISE Agent and Modbus Plugin


Configure Modbus Plugin settings (Modbus_Handler.ini) as showed below for the demonstrations:


[Platform]

Name=WISE-4012E

Protocol=Modbus_TCP

ClientIP=127.0.0.1

ClientPort=502

UnitID=1

Interval=1

#Interval: The time delay between two modbus access round in second.

Delay=0

#Delay: The time delay between two modbus access in millisecond.

#Delay=0 means no delay.

Log=0


[Holding Registers]

numberOfR=3

R0=0,Data0,-1000000,1000000,1,V,0,""

R1=1,Data1,-1000000,1000000,1,V,0,""

R2=2,Data2,-1000000,1000000,1,V,0,""


;tag = offset, name, min, max, precision, unit, data type, lua script




Demo Program