Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

648
Views
Modbus TCP connection fail

the master plc I use is "Panasonic FP7", and I have their official software "FPWIN GR7" so that I can use the PC to see the data flow, but the software lake of the function so I want to create one using nodeJS, there is my code :

master plc address: 192.168.50.30
port:502

PC:192.168.50.138

const Modbus = require('jsmodbus')
const net = require('net')
const socket = new net.Socket()
const netServer = new net.Server()
const server = new Modbus.server.TCP(netServer)



const options = {
'host' : "192.168.50.30",
'port' : "502"
}

const client = new Modbus.client.TCP(socket)

var myData;

socket.on("connect",function(){
    function getData(){
        client.readHoldingRegisters(0,1)
        .then((resp)=>{
            console.log(resp.response)
            socket.end()
        }).catch((err)=>{
            console.log(err)
      
        })
        socket.end()
    }
    setInterval(getData,500)
 })


socket.on("error",console.error)

socket.connect(options)

the error code I couldn't figure out:

UserRequestError {
  err: 'Offline',
  message: 'no connection to modbus server',
  response: undefined
}

my struct

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

After seeing "from56" advice, I go Panasonic download every PLC documentation looking for TCP/IP setting, and I realize that my DHCP setting was wrong after fixing it, and then add a new "user connection information setting13" -> open type -> server connection.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!