Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
en:mervis-ide:30-communication-protocols:30-modbus [2017/07/25 15:35]
m.chlupac created
en:mervis-ide:30-communication-protocols:30-modbus [2021/04/08 13:04] (current)
Line 3: Line 3:
 ===== Import Device Definition ===== ===== Import Device Definition =====
  
-You can use use simple CSV file to import definition of modbus device into your Mervis IDE project.+You can use simple CSV file to import definition of modbus device into your Mervis IDE project.
  
-<code csv ModbusDefinition.csv> +==== Columns ==== 
-StationNumber,Name,Element,Count,Function,Writable,StType,ByteOrder,K,Q,X1,Y1,X2,Y2 + 
-StationNumber,Name,Element,Count,Function,Writable,StType,ByteOrder,K,Q,X1,Y1,X2,Y2+^ Name           ^ Description                                                                                                         ^ 
 +StationNumber  | Modbus server address                                                                                               | 
 +Name           | Variable name                                                                                                       | 
 +Element        | Register/Coil address. \\ The concrete bit position (LSB=.1 to MSB=.16) or byte (.Lo or .Hi) can be specified for Registers - see examples below | 
 +Count          | Number of modbus elements to be read/written                                                                        | 
 +Function       | Coil/DiscreteInput/InputRegister/HoldingRegister                                                                    | 
 +Writable       | Read only = 0Read/Write = 1                                                                                       | 
 +StType         | Standard Mervis IDE variable type                                                                                   | 
 +ByteOrder      | Leave empty for default byte order or specify correct byte positions as numbers from 1 to 8 (eg. 1234/3412/4321/2143 for 32 bit number) | 
 +             | Transformation parameter for y = Kx + Q                                                                             | 
 +^ Q              | Transformation parameter for y = Kx + Q                                                                             | 
 +^ X1             | Alternative definition for y = Kx + Qwhere the parameters are computed from [X1,Y1], [X2,Y2] points of the line.  | 
 +^ Y1             | Alternative definition for y = Kx + Q, where the parameters are computed from [X1,Y1][X2,Y2] points of the line.  | 
 +^ X2             | Alternative definition for y = Kx + Q, where the parameters are computed from [X1,Y1], [X2,Y2] points of the line.  | 
 +^ Y2             | Alternative definition for y = Kx + Q, where the parameters are computed from [X1,Y1], [X2,Y2] points of the line.  | 
 + 
 + 
 +<code csv ModbusDefinition.csv>StationNumber,Name,Element,Count,Function,Writable,StType,ByteOrder,K,Q,X1,Y1,X2,Y2
 1,Variable001,1201,1,InputRegister,0,Int,12,,,,,, 1,Variable001,1201,1,InputRegister,0,Int,12,,,,,,
 1,Variable002,1202,1,InputRegister,0,Int,12,,,,,, 1,Variable002,1202,1,InputRegister,0,Int,12,,,,,,
Line 15: Line 32:
 1,Variable006,505,2,InputRegister,0,Real,3412,,,,,, 1,Variable006,505,2,InputRegister,0,Real,3412,,,,,,
 1,Variable007,507,2,InputRegister,0,Real,,,,,,, 1,Variable007,507,2,InputRegister,0,Real,,,,,,,
-1,Variable008,407,1,HoldingRegister,0,Int,,,,,,,+1,Variable008,407,1,HoldingRegister,0,Int,,0.1,,,,,
 1,Variable009,408,1,HoldingRegister,0,Int,,,,,,, 1,Variable009,408,1,HoldingRegister,0,Int,,,,,,,
 1,Variable010,409,1,HoldingRegister,0,Int,,,,,,, 1,Variable010,409,1,HoldingRegister,0,Int,,,,,,,
Line 23: Line 40:
 1,Variable014,428,1,HoldingRegister,0,Int,,,,,,, 1,Variable014,428,1,HoldingRegister,0,Int,,,,,,,
 1,Variable015,429,1,HoldingRegister,0,Int,,,,,,, 1,Variable015,429,1,HoldingRegister,0,Int,,,,,,,
-1,Variable016,1,2,HoldingRegister,0,Real,,2,7,,,,+1,Variable016,1,2,HoldingRegister,0,Real,,0.1,0,,,,
 1,Variable017,3,2,HoldingRegister,0,Real,,,,0,0,20,10 1,Variable017,3,2,HoldingRegister,0,Real,,,,0,0,20,10
 1,Variable018,5,2,HoldingRegister,0,Real,,,,,,, 1,Variable018,5,2,HoldingRegister,0,Real,,,,,,,
 1,Variable019,7,2,HoldingRegister,0,Real,,,,,,, 1,Variable019,7,2,HoldingRegister,0,Real,,,,,,,
 +</code>
 +
 +<code csv ModbusDefinition2.csv>StationNumber,Name,Element,Count,Function,Writable,StType,ByteOrder,K,Q,X1,Y1,X2,Y2
 +1,Variable001_bit1,1201.1,1,InputRegister,0,Bool,12,,,,,,
 +1,Variable001_bit10,1201.10,1,InputRegister,0,Bool,12,,,,,,
 +1,Variable001_Hi,1201.Hi,1,InputRegister,0,Usint,12,,,,,,
 </code> </code>
  
  
  • © Energocentrum Plus, s.r.o. 2017 - 2024