Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

647
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda