Vai al contenuto

Modbus custom editor

The Modbus Custom Editor is a graphic tool that lets you define the MODBUS map of a generic TCP device, allowing you to define you own device.The file generated by this tool, that describe the device, is automatically inserted inside GF_ProjectVX Code Catalog window.To execute it, select Tool -> Run Modbus custom editor. Modbus custom editor-image_0Here’s an overview of all the editor feature
TypeDescription
BOOLbit
SINT8 bit with sing
USINT8 bit without sign
BYTE8 bit (sign is insignificant)
INT 16 bit with sign
UINT16 bit without sign
WORD16 bit (sign is insignificant)
DINT32 bit with sing
UDINT32 bit without sign
DWORD32 bit (sign is insignificant)
REAL32 bit
  • New button: lets you create a new empty custom device file.
  • Open button: lets you open an already existing custom device file.
  • Save button: lets you save the current custom device file.
  • Close button: will close the tool.
  • Name field: this is the name of this custom device, it will be visible in the Catalog window when choosing the device do add. The name must begin with a letter; if you use a number as first digit, it will be preceded automatically with a ”_” character.
  • Version field: lets you set the version of the custom device.
  • Description field: lets you set the description of the custom device
  • Modbus RTU checkbox: lets you set whether or not the custom device can be used in a Modbus RTU (Serial) network (it will be visible in the Catalog when seletting the RS485 node).
  • Modbus TCP checkbox: lets you set whether or not the custom device can be used in a Modbus TCP (Ethernet) network.
  • Max message size (bit) field: lets you set the maximum number of bits that the customde- vice will be able to exchange with the Master node using a single Modbus command.
  • Max message size (reg.) field: lets you set the maximum number of registers that the custom device will be able to exchange with the Master node usiing a single Modbus command.
  • Enable overlap of bit and reg maps checkbox: lets you set whether or not the bit map and the custom device registers overlap (i.e., whether or not they share addresses).
  • Use ”Write single coil” (if msg size = 1)” checkbox: implicitly use always the ”Write single coil” command when writing coils.
  • Use ”Write single reg” (if msg size = 1)” checkbox: implicitly use always the ”Write single register” command when writing registers.
  • Add button: lets you insert an object in the Modbus map of the custom device
  • Remove button: lets you remove selected objects (with yellow borders) from the Modbus map of the custom device. (Keeping pressed the CTRL button allow you to select multiple rows even if not contiguous; keeping pressed the SHIFT button allow you to select multiple contiguous rows).
  • Address column: lets you set the Modbus address assigned to the object in question in the slave device.
  • Label column: lets you set the name of the parameter assigned to the Modbus objectin question.
  • Type column: lets you set the type of parameter assigned to the Modbus object in ques- tion. Available data type are:
  • ReadOnly column: lets you set the access mode to the object in question (if readOnly or read/write)
  • Modbus type column: lets you set the configuration of the Modbus object in question(Type and Read only columns), using the standard code provided by the Modbus communication protocol.
The configuration of Modbus type column and the Type and Read only columns are strictly correlated; any changes to one of these columns will cause automatic alignment of the others (see table below):
TypeReadOnlyModbus type
BOOLTRUEDiscrete Input
BOOLFALSECoil
USINTTRUEInput register (8 bit)
USINTFALSEHolding register (8 bit)
BYTETRUEInput register (8 bit)
BYTEFALSEHolding register (8 bit)
INTTRUEInput register (16 bit)
INTFALSEHolding register (16 bit)
UINTTRUEInput register (16 bit)
UINTFALSEHolding register (16 bit)
WORDTRUEInput register (16 bit)
WORDFALSEHolding register (16 bit)
DINTTRUEInput register (32 bit)
DINTFALSEHolding register (32 bit)
UDINTTRUEInput register (32 bit)
UDINTFALSEHolding register (32 bit)
DWORDTRUEInput register (32 bit)
DWORDFALSEHolding register (32 bit)
REALTRUEInput register (32 bit)
REALFALSEHolding register (32 bit)
  • Description column: lets you set the description of the Modbus object in question.