Email Us at [email protected]

Download N3uron
Back to videos

Modbus Client / Modbus Client Tags Configuration

Modbus Client Tags Configuration

Description

In this video of our N3uron Academy, we’re going to explain how to configure the tags for the Modbus Client in N3uron.

  • [04:49] Modbus Client Tags Configuration

Transcription

[00:00] Hello and welcome back! Following our previous video on configuring the connection to a Modbus server, today we’re going to explain how to configure the tags for the Modbus client in N3uron. We’re going to connect to a Modbus server configured in a PLC. In the Modbus server TCP device I/O mapping, we have seven tags divided into four holding registers and two coils. These variables represent the control system of a motor. We have a speed sensor tag for the motor, a tag to set the speed of the motor, and a motor temperature sensor tag, which occupies two registers since it’s a Float32, a 32-bit real data type. Additionally, there are two status variables, Running and Stopping, which are mapped to a single register with each variable assigned to the first and second bit of the register. Finally, we have two coil registers to send the Start and Stop commands to the motor.

[01:04] Let’s dive into configuring these tags in N3uron. I’ll navigate to the “Tags” configuration subsection in the “Config” tab and start setting up the tags. First, we will create a new group named “Motor” and create the tags inside this group. We’ll start with the Speed tag. This tag will be of type Number and I will set a deadband of 1 absolute unit, so there will be updates only if there is a real change in its value. Then, I will enable the source for this tag and select the module type as ModbusClient and the module name as ModbusClient, just like we named ModbusClient’s instance. Next, I will enter the Device name, which is formed by the channel name, forward slash, and device name as we configured previously in the connection configuration. Then, I will set the Modbus address to the first holding register, set the data type to Int16, and change the scan rate to 500 milliseconds.

[02:02] Next, I will create the tag “SetpointSpeed” with read-write permission since it is a command to send to the Modbus Server. After that, I will create a tag with read permissions for the motor temperature, which is of data type Float32. N3uron will know that it occupies two holding registers transparently. Next, I will create the tags for reading the status of the motor, in this case, Running and Stopping, which are of type Boolean. Notice how you must use the dot notation to access a specific bit within a register.

[03:17] Finally, I will create the tags for Start and Stop commands of data type Boolean since they are Coil registers and have read and write permissions. If you have any doubts about the Modbus protocol addressing, you can always look at the help section for the Modbus address setting. Once all these settings are configured, I head over to the “Data” section and select the “Real Time” tab.

[04:00] Here, I will test the motor control system by writing some speed setpoints and testing the Start and Stop commands. As we can see, all the status tags are displayed correctly and the commands are sent correctly to the Modbus server. That’s it! We’ve successfully configured the tags to read and write data using the Modbus Client module. Thanks for watching, and see you in the next video!

Privacy Settings
We use cookies to enhance your experience while using our website. If you are using our Services via a browser you can restrict, block or remove cookies through your web browser settings. We also use content and scripts from third parties that may use tracking technologies. You can selectively provide your consent below to allow such third party embeds. For complete information about the cookies we use, data we collect and how we process them, please check our Privacy Policy
Youtube
Consent to display content from - Youtube
Vimeo
Consent to display content from - Vimeo
Google Maps
Consent to display content from - Google
Spotify
Consent to display content from - Spotify
Sound Cloud
Consent to display content from - Sound