# Modbus

You can use simple CSV file to import definition of modbus device into your Mervis IDE project.

### Columns

Name Description
Name Variable name
Count Number of modbus elements to be read/written
Function Coil/DiscreteInput/InputRegister/HoldingRegister
Writable 0/1
StType Standard Mervis IDE variable type
ByteOrder Leave empty for default byte order
K Transformation parameter for y = Kx + Q
Q Transformation parameter for y = Kx + Q
X1 Alternative definition for y = Kx + Q, where 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.
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,Variable002,1202,1,InputRegister,0,Int,12,,,,,,
1,Variable003,1203,1,InputRegister,0,Int,12,,,,,,
1,Variable004,501,2,InputRegister,0,Real,3412,,,,,,
1,Variable005,503,2,InputRegister,0,Real,3412,,,,,,
1,Variable006,505,2,InputRegister,0,Real,3412,,,,,,
1,Variable007,507,2,InputRegister,0,Real,,,,,,,
1,Variable008,407,1,HoldingRegister,0,Int,,0.1,,,,,
1,Variable009,408,1,HoldingRegister,0,Int,,,,,,,
1,Variable010,409,1,HoldingRegister,0,Int,,,,,,,
1,Variable011,425,1,HoldingRegister,0,Int,,,,,,,
1,Variable012,426,1,HoldingRegister,0,Int,,,,,,,
1,Variable013,427,1,HoldingRegister,0,Int,,,,,,,
1,Variable014,428,1,HoldingRegister,0,Int,,,,,,,
1,Variable015,429,1,HoldingRegister,0,Int,,,,,,,
1,Variable016,1,2,HoldingRegister,0,Real,,0.1,0,,,,
1,Variable017,3,2,HoldingRegister,0,Real,,,,0,0,20,10
1,Variable018,5,2,HoldingRegister,0,Real,,,,,,,
1,Variable019,7,2,HoldingRegister,0,Real,,,,,,,