Getting started
Start here
Use this page to make your first MELSEC SLMP read from Node-RED. Start with one simple TCP flow, then move to arrays, strings, UDP, routing, or broader verification.
Prerequisites
| Requirement | Value |
|---|---|
| Node-RED | 3.0 or later |
| PLC | MELSEC PLC reachable from your Node-RED host |
| First TCP target | 192.168.250.100:1025 |
| Starting PLC profile | melsec:iq-r |
Install
- Open the Node-RED editor.
- Open Manage palette.
- Open the Install tab.
- Search for
@fa_yoshinobu/node-red-contrib-plc-comm-slmp. - Install the package.
- Restart Node-RED if your environment requires it.
Create a connection node
Create or open a slmp-connection config node and set these fields:
slmp-connection field |
Example value | Description |
|---|---|---|
| Host | 192.168.250.100 |
PLC IP address or host name. |
| Port | 1025 |
TCP port for the first example. |
| Transport | TCP |
Use TCP for the first run. |
| PLC profile | melsec:iq-r |
Required canonical PLC profile. |
Leave the route fields at their defaults unless your PLC network needs a different target.
Import the basic flow
- Open the Node-RED import dialog.
- Import
examples/flows/slmp-basic-read-write.json. - Open its
slmp-connectionnode. - Confirm Host is
192.168.250.100. - Confirm Port is
1025. - Confirm Transport is
TCP. - Confirm the PLC profile is
melsec:iq-r. - Deploy.
- Trigger the read inject node.
- Open the debug sidebar and verify
msg.payload.
In object output mode, a successful read looks like this shape:
{
"D300": 123
}
The value depends on your PLC memory.
Read your first value
To build the first read manually, add an slmp-read node and set:
slmp-read field |
Example value | Description |
|---|---|---|
| Connection | Your slmp-connection node |
Shared PLC connection. |
| Source | Literal text | The address list is entered in the editor. |
| Addresses | D300 |
First safe word register to read. |
| Output | Object payload | Returns an object keyed by address. |
| Metadata | Full msg.slmp |
Includes connection and target metadata. |
| Errors | Throw | Lets Node-RED route runtime errors normally. |
Trigger the node with any message. A successful response sets msg.payload.D300 to the current value.
Confirm success
- The flow deploys without editor validation errors.
- The
slmp-connectionnode has PLC profilemelsec:iq-r. - The read inject node produces a debug message.
msg.payloadcontains aD300key.- The connection status does not stay red after repeated reads.
If it does not work
| Symptom | Check |
|---|---|
| The read returns nothing or errors immediately | PLC profile on slmp-connection must be set. It is required, and there is no runtime default. |
| The first flow feels too busy | Import slmp-basic-read-write.json first, not slmp-device-matrix.json. |
| Address validation fails on the first run | Start with D300. Do not test with G or HG on the first run. |
| TCP does not connect | Confirm the PLC is reachable at 192.168.250.100:1025 from the Node-RED host. |
| UDP is your target | Move to the UDP example after TCP works, and set the UDP port to 1035. |