YuParse
YuParse is a lightweight and efficient ASCII/text parser designed for real-time data extraction on the edge. It is a core component of the YuDash Axon processing engine and is optimized for structured sensor output from industrial instruments such as weather stations, weighing scales, and transmitters.
YuParse uses a pattern-matching approach where users define a template string with token identifiers (like #D1
, #I2
, #T
, #A1
, etc.) to extract specific fields from continuous or formatted ASCII inputs. It is tolerant to inconsistent whitespace and supports both data capture and structural matching.
YuParse simplifies the challenge of parsing vendor-specific ASCII formats by providing a flexible yet deterministic framework that decouples pattern logic from parsing code. It enables high-throughput, low-overhead data structuring — critical for scalable IIoT deployments.
The values extracted by YuParse can be directly utilized in various downstream pipelines. Parsed fields can be published to MQTT or HTTP endpoints. Additionally, these values can be fed into YuDash’s built-in Modbus RS485 or TCP/IP server, enabling seamless SCADA or PLC integration. This makes YuDash a powerful edge converter — capable of translating vendor-specific ASCII outputs into json payloads or Modbus-readable registers.
Reading text data from RS485/RS232 device
The reading of text data from RS485 (or RS232) port is handled as custom "Modbus" registers, as explained here. The raw input data is received as a variable in YuDash flow. This is the "inputVar" to YuParse engine.
YuParse Settings with Axon block
inputVar
string
Name of the input variable holding the ASCII string to be parsed. This is typically read through Modbus modules.
pattern
string
YuParse-compatible pattern using tokens like #D1
, #A1
, etc. This will be matched with the inputVar.
tagArray
array
List of mappings between token tags and output variable names.
tagName
string
The token ID from the pattern (e.g., "D1"
, "A2"
, "T"
)
varName
string
Custom variable name to use in downstream logic, MQTT, Modbus, etc.
Tokens
Pattern Element
Type
Stored?
Description
#D1, #D2
Decimal/Float
✅ Yes
Parsed as float
#I1, #I2
Integer
✅ Yes
Parsed as integer
#T
Timestamp
✅ Yes
Epoch timestamp
#S1, #S2
String
✅ Yes
Any text until next whitespace
#A1, #A2
Alphanumeric
✅ Yes
Strictly alphanumeric (letters and digits only)
#D, #S, #A
Match-only
❌ No
Used for pattern alignment; parsed but not stored
Non-token word
Literal Match
❌ No
Must exactly match input, ignoring extra whitespace
Examples
Input String
YuParse Pattern
Parsed Values
TEMP=23.4 RH=65.2
TEMP=#D1 RH=#D2
D1=23.4
, D2=65.2
STATUS=(OK) VALUE=99.8
STATUS=(#A1) VALUE=#D1
A1=OK
, D1=99.8
Device=ABC TEMP=45.0 UNIT=C
Device=#S TEMP=#D1 UNIT=#S
D1=45.0
t=21.5 , humid=(64.2)%
t=#D1 , humid=(#D2)%
D1=21.5
, D2=64.2
(Gross) 125.67 kg (Tare) 5.00 kg
(Gross) #D1 kg (Tare) #D2 kg
D1=125.67
, D2=5.00
TEMP:23.4,HUMIDITY:55.6
TEMP:#D1,HUMIDITY:#D2
D1=23.4
, D2=55.6
S/N=SNX123 Value=7.89
S/N=#A1 Value=#D1
A1=SNX123
, D1=7.89
Sensor1=OK Pressure=102.56 mbar
Sensor1=#A1 Pressure=#D1 mbar
A1=OK
, D1=102.56
DATA: A23 B56 C99
DATA: #A1 #A2 #A3
A1=A23
, A2=B56
, A3=C99
WSpd=5.2 Dir=NW Temp=21.3
WSpd=#D Dir=#A1 Temp=#D2
A1=NW
, D2=21.3
Last updated