Use the ScadaBR ASCII Serial data source to frame an incoming serial string and use a data-point regular expression to extract the required field. It is suitable for ASCII polling and parsing, but the available evidence does not show support for general PLC writes such as setpoints, numeric values, or on/off commands.
Understand the ASCII Serial data path
The data source reads a raw string from the serial port. Its stop configuration determines where the frame ends, such as after a defined character count or upon receiving a selected character. Each data point then applies a regular expression to that frame.
| Element | Function |
|---|---|
| Initialization string | Transmits once when the data source is activated. |
| Data-point command | Transmits for each point read and can request a response from the device. |
| Stop mode | Defines the end of the received frame by character count or terminating character. |
| Regular expression | Selects the required substring from the received frame. |
Choose between parsing, polling, and PLC writes
Leave both command fields empty when a device continuously transmits data and does not require a request. For a request-response protocol, leave the initialization string empty unless the device explicitly requires a startup message, and enter the read request in the data-point command field.
This polling command is distinct from a general write facility. If the application must read and write PLC values, the supported decision path is to use Modbus RTU, Modbus ASCII, or an OPC-DA driver supplied by the PLC manufacturer. If none matches the equipment protocol, a device-specific ScadaBR data source is required.
Frame and extract the received message
- Capture the complete message in a serial terminal before configuring ScadaBR. Confirm all prefixes, suffixes, spaces, signs, decimal separators, and terminators.
- Select a stop rule that returns exactly one complete message. When using a fixed count, include every prefix, data character, and suffix in that count.
- Apply a regular expression that matches only the required field. Escape a literal decimal point because an unescaped period is a wildcard in regular-expression syntax.
- Select a data type compatible with the extracted content. Keep the value alphanumeric until any required device-specific scaling or field interpretation is known.
For the frame WW0000.0kg, stopping at k can delimit the relevant portion. A decimal value consisting of four digits, a literal period, and one digit can be selected with:
[0-9]{4}\.[0-9]
For the observed frame c+p 000199000000, the prefix plus the twelve-digit field totals 16 characters. The expression [0-9]{12} selects the digit field. Although the associated display showed 19.9 kg, the evidence does not define how 000199000000 maps to that engineering value. Obtain the scale's field layout and scaling rule before converting it.
Correct the custom request-response configuration
For a protocol in which A requests an analog reading and BxxxxxE returns five data digits, configure A as the data-point command rather than as an initialization string. The response contains seven characters: one B, five digits, and one E. A six-character frame limit therefore cannot contain the stated complete response.
Use a stop rule that captures the full seven-character frame, then extract the five-digit field with [0-9]{5}. Verify the actual serial capture before relying on this layout; any unseen terminator would also need to be handled by the framing configuration.
Diagnose “No data available”
- Confirm that the terminal receives data using the same serial settings intended for ScadaBR. One reported device used
9600/8/n/1, but apply those settings only to that device. - Close or disconnect the terminal before activating ScadaBR so the applications do not compete for the serial port.
- Compare the captured frame length with the configured character count. Check whether carriage-return or line-feed characters are present rather than assuming they are absent.
- Test the regular expression against the exact captured frame, including spaces and prefixes. A timestamp without a displayed value does not prove that the required substring was extracted.
- If transmit and receive activity exists but no value appears, separate framing from parsing: first confirm that one complete frame reaches the data source, then verify the expression and data type.
- If a command disappears after saving or escape sequences such as carriage return and line feed are transmitted literally, treat that behavior as unresolved by the available evidence. Capture the transmitted bytes and verify the installed ScadaBR build before changing the PLC protocol.
FAQ
Can ScadaBR ASCII Serial write PLC setpoints?
The evidence supports ASCII request commands for point reads but not general writes such as setpoints or on/off values. Use Modbus RTU, Modbus ASCII, or a manufacturer-supplied OPC-DA driver when bidirectional PLC access is required.
Why does ScadaBR show “No data available” when a serial terminal works?
Verify that ScadaBR captures one complete frame with the same serial settings, then test the regular expression against that exact frame. Also close the terminal before ScadaBR opens the serial port.
How do I parse BxxxxxE in ScadaBR?
Send A as the data-point command, capture all seven characters of BxxxxxE, and extract the five digits with [0-9]{5}. Leave the initialization string empty unless the device requires a separate startup command.