Obsah

Modbus

Import definice zařízení

Pro import definice Modbus zařízení do projektu v Mervis IDE lze použít jednoduchý CSV soubor.

Sloupce

Název Popis
StationNumber Adresa Modbus serveru
Name Název proměnné
Element Adresa registru / cívky.
Konkrétní bitová pozice (LSB=.1 až MSB=.16) nebo bajt (.Lo nebo .Hi) lze specifikovat pro registry – viz příklady níže
Count Počet Modbus elementů ke čtení/zápisu
Function Coil/DiscreteInput/InputRegister/HoldingRegister
Writable Pouze pro čtení = 0, čtení/zápis = 1
StType Standardní datový typ Mervis IDE
ByteOrder Nechte prázdné pro výchozí pořadí bajtů, nebo zadejte správné pořadí bajtů jako čísla 1 až 8 (např. 1234/3412/4321/2143 pro 32bit číslo)
K Transformační koeficient pro y = Kx + Q
Q Transformační konstanta pro y = Kx + Q
X1 Alternativní definice y = Kx + Q, kde jsou parametry vypočteny z bodů [X1,Y1], [X2,Y2]
Y1 Alternativní definice y = Kx + Q, kde jsou parametry vypočteny z bodů [X1,Y1], [X2,Y2]
X2 Alternativní definice y = Kx + Q, kde jsou parametry vypočteny z bodů [X1,Y1], [X2,Y2]
Y2 Alternativní definice y = Kx + Q, kde jsou parametry vypočteny z bodů [X1,Y1], [X2,Y2]
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,,,,,,,
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,,,,,,