The first step in enabling vNode to send data over the Modbus protocol involves creating a new module within vNode, specifically utilizing the Modbus Server module. This essential module establishes the communication channel necessary for transmitting data via the Modbus protocol.
Once the module is created, the next step involves configuring it to establish a reliable communication channel. The main objective is to define essential parameters for the connection, including the network interface through which various computers can access the Modbus server, and the specific port number designated for communication. Additionally, we have the option to limit the number of connections allowed to our vNode Modbus Server.
A critical aspect of this configuration is the capability to restrict communication to specific hosts by specifying their IP addresses in the source IP address field. This feature enhances security and control over access to the Modbus server from authorized endpoints.
Next, it is necessary to create a device and configure the Modbus communication parameters. At this stage, we specify the Slave Address. Additionally, we set up buffers for the different classes of the Modbus protocol to ensure efficient and orderly communication. These parameters are crucial for enabling the device to interpret transmitted and received data accurately, facilitating smooth interaction with other devices on the network.
Finally, we need to create the data group we intend to publish. This process involves creating tags and mapping them to corresponding tags within our vNode. Subsequently, we specify several critical Modbus protocol parameters to ensure proper communication:
- We can select whether our Modbus server starts at offset 0 or 1.
- We can also choose the buffer size and enable the Swap option, The "Swap" option in Modbus configuration allows you to specify the byte order (endianness) of data transmission. It ensures compatibility between devices by adjusting how bytes are organized and transmitted (either Little Endian or Big Endian) based on the requirements of connected devices or systems.
- We have the option to enable a control status, which maps to a tag we want to publish via this protocol. This control status verifies its quality; if it's good, the data is sent for Modbus publication. If not, no data is published.
- Finally, we create the Map Groups where we map our data and choose which Modbus address to redirect it to.
These steps ensure that our Modbus server operates effectively, transmitting and receiving data accurately according to configured parameters, and integrating seamlessly with other systems in the network.
Created by JF
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article