Questions tagged [easy-modbus]

14 questions
6
votes
2 answers

Issue while writing ModbusClient and ModbusServer together

About the Code I am using EasyModbus Nuget in C# Window Form Application. I am trying to fetch the changed Holding Register's Address Value through RTU(Real Time Update) using ModbusServer. Below code connect to server. void Connect() { …
Pankaj
  • 9,749
  • 32
  • 139
  • 283
1
vote
1 answer

C# .NET How to read continuously an input from a PLC through Modbus

I am using the EasyModbus library from GitHub to communicate to the PLC, I tried the required functions and I accomplish to run them on visual studio 2019 individually, and worked fine. I did a basic program to switch on and off an output of the PLC…
Gino
  • 11
  • 2
1
vote
1 answer

EasyModBus modbusClient.ReadHoldingRegisters() returning unexpected 0

Background: We have been using the Schneider M251 PLC with the TM3AI8, TM3DQ8R and TM3DI8 modules for some time now and I have noticed that we are getting unexpected values being sent over Modbus tcp. Most of the time, the signal we receive over the…
Thornack
  • 51
  • 1
  • 6
0
votes
0 answers

Issue with closing COM port when using EasyModbusTCP

I am using the code found at the following repository: https://github.com/Festo-se/PGVA-1/blob/main/examples/c%23/src/driver/PgvaDriver.cs I use the following line of code to connect using a serial port: pgva = new PgvaDriver("serial",…
0
votes
0 answers

EasyModbus modbusClient.WriteSingleCoil(2, true);

I was able to establish a connection with the S7-1200. Reads positively all registers. However, when trying to write to the Holding Registry [table below] position offset 0.2 and using the command modbusClient.WriteSingleCoil(2, true); value to…
0
votes
1 answer

Easymodbus gives connection error in Quartz.net class

Friends, I am pulling data from a device with a library called EasyModbus. I want to use the Quartz library to automatically pull this data every hour. The problem is that while I can pull data normally, when I use the same code inside the class I…
kaptan
  • 1
  • 2
0
votes
0 answers

Connection closed: how to find out which end-point is the cause

In a C# application I have this code: for (var i = 0; i < 10; i++) { try { var op = operators[i]; // retrieve data plc.Modbus.WriteSingleRegister(MODBUS_TABLE_OP + i * 2, op.Id); …
Mark
  • 4,338
  • 7
  • 58
  • 120
0
votes
1 answer

recover connection after changing slave ID in easymodbus RTU c#

i am trying to change the slave Id of my energy meter by writing a new value to right register. once the value is changed the connection is obviously lost but i can't find a way to renew it. i cant close the port without closing my entire…
Shay Avitapl
  • 23
  • 1
  • 6
0
votes
0 answers

Problem reading FT300 sensor data from Modbus EasyModbus.dll library in Windows form C#

I'm right now trying to read sensor data through USB-RS485 converter and utilizing the EasyModbus.dll in C#. However, I've kept receiving CRC checked failed at the ReadHoldingRegister part. The connection and reading part is shown below. I've…
0
votes
1 answer

Writing ASCII Values Into the Register of Serial Communication Devices Like RS485

I am creating a java Desktop Application. I want to write the data into the register of a device. As per my project document, size of the register is 16-bit long. I am using EasyModbusJava jar to write data into the register. Till now I have written…
0
votes
0 answers

Modbus holding register read with Pyserial - less Byte received than expected

I am using PySerial library to read an holding register value from a modbus rtu slave. I have an embedded gateway device with Unix O.S (so /dev/tty ports). and a modbus slave which could give me some metrics, such as frequency, temperature, etc. I…
johnny_kb
  • 694
  • 9
  • 27
0
votes
1 answer

Python comunication modbus tcp with plc saia sbc

I am trying to read the registers and flags of the saia sbc PCD2 M4_x ​​plc via Modbus TCP communication. I know the IP address and the communication port of the plc, however every time I read a flag or a register I always get different values…
0
votes
1 answer

EasyModbus TCP communication slowing down windows application

The WinForms application slows down when the number of methods inside the timer for EasyModbus TCP increases. What should be done to increase the speed of the application? I'm connecting a slave device from a WinForms application using Modbus…
impulse101
  • 99
  • 1
  • 10
0
votes
0 answers

Socket is Connected or not in dealing with EASYMODBUS in C#

I am using "EasyModBus" to communicate with a BUS system. I need the user to be aware immediately if connection lost or is getting down. Another issue is that if i disconnect the network, the software will get hang due to a non-connected Socket on…
Ehsan
  • 85
  • 9