YuDash
  • Welcome
  • YuDash IoT Devices
    • LYNX User Manual
      • Terminals and Wiring
      • LYNX Configuration
      • Network Settings
      • LYNX Settings
        • Modbus RS485
        • Analog Inputs
        • Data Scaling
        • Advance Feature Settings
        • Cloud and Payload Settings
        • Ethernet Settings
        • Modbus TCP/IP
        • HTML Parser Settings
        • Digital Sensors Settings
    • ZENYX User Manual
      • Terminals and Wiring
      • ZENYX Configuration
      • Network Settings
      • ZENYX Settings
        • Modbus RS485
        • Analog Inputs
        • Data Scaling
        • Advance Feature Settings
        • Cloud and Payload Settings
        • Ethernet Settings
        • Modbus TCP/IP
    • QUBIX User Manual
    • ONYX User Manual
  • Device Configuration
    • Device Configuration
    • Device Features
      • Network
      • Modbus/RS485
        • Modbus Poll Tutorial
      • Modbus TCP/IP
      • Modbus Server
        • Analog to Modbus/RS485 Server (Slave)
        • Analog to Modbus/TCP-IP Server
      • Ethernet
      • Data Logging
  • Firmware
    • Firmware release notes
    • Firmware upgrade
  • YuDash JSON API
    • Modbus Settings
    • Analog Settings
    • Data Scale Settings
  • DEVICE TO CLOUD API
    • YuDash IIoT Stack
    • Cloud Protocols
      • MQTT
      • HTTP
      • FTP
      • SSL/TLS
    • Payload Formats
      • JSON Payloads
      • YuTGT: YuDash Text Generator
    • Network Connectivity
    • Industrial Protocols
      • Modbus
  • YuDash IoT Platform
    • YuReCon
  • Integration Guides
    • IoT Platform Integration
      • Ubidots
      • TagoIO
      • Losant
      • Datacake
      • Eagle.io
      • Boodskap
      • Statstream
      • Qubitro
      • Thingsboard
    • Industrial Instruments
      • Energy
        • SE EM6400NG+
        • Selec MFM376
        • L&T WL 4040
        • Entes MPR-46S
        • Selec EM4M
        • Secure Elite 100
        • Siemens Smart 7KT
        • Selec EM2M
      • Process Control
        • Selec FLEX2MV3 6AII
        • Selec MiBRX 2M PLC
        • Temp+Humidity XY-MD02
        • PPI AIMS 4/8X
    • Environment/Emission
      • Air & Water
      • Weather
    • Industrial PLCs
  • Use Cases
    • Environment
      • Ground Water Compliance
      • Continuous Emission Monitoring System (CEMS)
    • Smart Building
      • IoT based Building Monitoring Solution
      • Tenant Energy Sub-metering and Billing System
    • Asset Management
      • Centralized Monitoring System for Gas Plant OEM
Powered by GitBook
On this page
  • 1) Connection Diagram
  • 2) General Settings in ZENYX settings
  • 3) Analog Input Settings in ZENYX
  • 4) Modbus Server Settings
  • 5) Tutorial Json configuration file
  • 6) Advance Feature Settings (optional)
  • 6) Modbus poll read
  • YuDash Modbus Server specifications
  • 7) YuDash ZENYX as Analog to Modbus TCP/IP Server
  • 8) Analog to Modbus TCP/IP Server Json file
  1. Device Configuration
  2. Device Features
  3. Modbus Server

Analog to Modbus/RS485 Server (Slave)

PreviousModbus ServerNextAnalog to Modbus/TCP-IP Server

Last updated 23 days ago

In this tutorial, YuDash ZENYX will be used to read 4 channel analog inputs (4-20mA) and act as Modbus/RS485 slave (server).

Ready-to-use json configuration files are available for ZENYX and LYNX in the end of the tutoral. They can simply be loaded into the device for quick start.

1) Connection Diagram

  1. Test setup of 4 channel 4-20mA analog generator is connected (red line) to analog inputs of ZENYX. The value of 5, 10, 15 and 20 mA are being generated in the test setup.

  2. The Modbus/RS485 is connected to RS485-USB converter (yellow and green) for modbus read on the laptop. ZENYX Modbus/RS85 is configured as modbus slave (server).

  3. The Modbus Poll software is acting as modbus master in the laptop. It is reading ZENYX Modbus/RS485 and receiving 4 analog values on given modbus registers.

2) General Settings in ZENYX settings

  • Loop Delay is set to 0. As we act as server, we want to read input data continuously without any delay.

  • Analog Inputs is enabled to read 4-20mA input.

  • The Cloud/Network set to to "Offline". In this usage, we are not sending data to any server.

Notes in general settings:

1) Modbus/RS485 is NOT enabled here (which makes YuDash as Modbus master). We will be enabling Modbus/RS485 server in the next step

2) The datascale feature of YuDash can be used to scale the analog input to required process values. This is not covered in this tutorial for simplicity.

3) Analog Input Settings in ZENYX

  • Analog Input Settings: The four analog inputs are enabled. We read 0-20mA inputs.

  • The four variables are read as analog1, analog2, analog3 and analog4. These variables will be mapped to Modbus/RS485 server register in next section.

4) Modbus Server Settings

  • Modbus Server Type: This is selected as RS485. This pertains to RS485 acting as Modbus Server (Slave). In case of LYNX, this maps to first RS485 channel acting as server.

  • Modbus RS485 Server Settings:

    • Modbus Server Id: Enter the Slave ID as per choice. (selected as 1 at present)

    • BaudRate: Required baud rate. Selected as 9600.

    • Data Parity: Required data parity. Selected as 8N1.

  • Modbus Server Register Settings block

    • You need to click "Open Modbus Server Settings" to open the details.

    • Click on "Read Modbus Server Settings" to check existing mappings.

    • Click on "Update Modbus Server Settings" after any changes.

  • Modbus Server Register Settings

    • Input variables "analog1" is mapped to 40000 register as floating point output.

    • The "Var Type" is set to 2 (floating point data type). This is the only supported data type at present. So, 2 modbus registers are used for one variable.

    • The "Enable Modbus Register" checkbox enables the value. This entry is ignored/delete if the check box is not present.

    • In the tutorial, the four analog inputs variables (analog1, analog2, analog3 and analog4) are mapped to registers 40000 40002 40004 and 40006

5) Tutorial Json configuration file

Above 4 steps complete the configuration in the ZENYX. These settings are readily available in the following json file. We recommend loading below json file to run through the tutorial.

6) Advance Feature Settings (optional)

These settings pertain to using TimeSync mode within "Advane Feature Settings".

In case RTC and timeSync is enabled in the advance settings, loopDelay=0 will be ignored. In this case TimeSync Server Mode sould be enabled for fast response.

These settings are for specific advance use-cases and not required for the tutorial. We recommend loading ready-made json configuration files as starting point.

6) Modbus poll read

Reboot ZENYX after completing all settings. The input analog values should be available on modbus-poll on the laptop. Following are typical settings to match the Modbus server

1) The Connection Setup is matched to 9600, 8N1

2) The Slave ID is 1 and function is 0x3 (Read Holding Registers)

3) The Display data type is "32 bit Float" with Little-endian byte swap

YuDash Modbus Server specifications

  1. The output registers are mapped in holding registers (starting from 40000).

  2. The data type is fixed floating type (Var Type = 2).

  3. The entries in the register map should be in increasing order only.

  4. Maximum of 16 variables (32 registers) can be mapped to modbus register map.

  5. The data scaling on input variables can be applied to receive process data on the modbus registers.

7) YuDash ZENYX as Analog to Modbus TCP/IP Server

Similar to above tutorial, YuDash ZENYX can be configured as Modbus TCP/IP Server. Following is typical wire connection:

7.1) Ethernet LAN is enabled to use LAN port for Modbus TCP/IP server

7.2) Ethernet of YuDash ZENYX is configured as static IP

The IP address is assigned as static. Sample IP address of 192.168.2.73 is assigned. This IP address will be readby Modbus poll software.

7.3) Modbus Server Settings.

  • In Modbus Server Type Settings, "TCP/IP" is selected

  • The Modbus TCP/IP port of 502 is assigned. The IP address was assigned in 7.2 earlier.

  • The block of "Modbus RS485 Server Settings" is ignored.

  • Modbus Server ID remains 1 for Modbus TCP/IP.

  • Only server ID of 1 is supported in Modbus TCP/IP. The uniqueness is managed by port number.

8) Analog to Modbus TCP/IP Server Json file

Modbus Poll

download link
3KB
mb_rs485_server_zenyx.json
3KB
mb_tcp_server_zenyx.json