YuDash
  • Welcome
  • YuDash IoT Products
    • 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
    • ONYX
    • Setu
    • QUBIX
  • Device Configuration
    • Device Configuration
    • Device Features
      • Network
      • Modbus/RS485
        • Modbus Poll Tutorial
        • String read in RS485/RS232
      • Modbus TCP/IP
      • Modbus Server
        • Analog to Modbus/RS485 Server (Slave)
        • Analog to Modbus/TCP-IP Server
      • Ethernet
      • Data Logging
      • YuDash Axon
        • YuParse
  • 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
        • MQTT with Self Signed 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. Device Configuration
  2. Device Features
  3. Modbus/RS485

String read in RS485/RS232

YuDash devices use the built-in Modbus RS485/RS232 interface to receive ASCII/text data from serial instruments such as weather sensors, analyzers, or weighing systems. The interface is defined as custom Modbus registers, for a flexible raw text inputs parsing.

The input string is defined with modbus register value of 60000 range.

mbReg: 60ABC: ABC represent maximum bytes to be read from the input stream.

varType: defines the format and handline of input read.

The input can be treated as String (ASCII) or HEX data:

  1. String: Input treated as ASCII/text data. This is applicable for varType range 50-54.

  2. Hex: The input is treated as HEX data. A two character output in capital letters (followed by a space) is written for every input hex byte. This is applicable for varType range 55-59.

varType
Input Type
Input read behavior

50

String

Terminate input read at new line (\n, or \r). Flush balance input buffer after read.

51

String

Do not terminal at newline. Read all input bytes based on mbReg.

52

String

Terminate read at new line (\n, or \r). Do not flush buffer after serial read.

55

Hex

Terminate input read at new line (\n, or \r). Flush balance input buffer after read.

56

Hex

Do not terminal at newline. Read all input bytes based on mbReg.

57

Hex

Terminate read at new line (\n, or \r). Do not flush buffer after serial read.

Sample Modbus Slave settings for String input

  • slaveID and mbRegCnt: These value remain 1 as default.

  • varName: The output variable name (voltage_string) in which output string will be stored for further processing.

  • mbReg: 60050. A register number >6000 represent string input read. 50 represents maximum 50 bytes to be read from the input. This can be set based on estimated text input line from the instrument.

  • varType: 50. 50 means we treat input as string (ASCII), terminate reading at a newline and flush the baalnce input buffer. This will be the typical setting for most of the use-cases.

// modbus settings for RS485 string read
  "modBusSlaves": [
    {
      "slaveID": "1",
      "mbRegCnt": 1,
      "mbArray": [
        {
          "varName": "voltage_string",
          "mbReg": "60050",
          "varType": "50",
          "varFactor": "1"
        }
      ]
    }
  ],
PreviousModbus Poll TutorialNextModbus TCP/IP

Last updated 9 days ago