Coder Social home page Coder Social logo

pvbrowser / pvbaddon Goto Github PK

View Code? Open in Web Editor NEW
13.0 5.0 16.0 23.37 MB

Additional software for pvbrowser

License: GNU General Public License v2.0

Makefile 12.74% Shell 7.87% C 12.44% C++ 58.50% Objective-C 0.15% CSS 0.08% Batchfile 0.07% QMake 0.56% HTML 0.50% NSIS 0.05% Roff 6.89% M4 0.16% JavaScript 0.01%

pvbaddon's Issues

issue when running several modbus_client (TCP/IP) instances

Hi pvbrowser community,

I've found an issue in a recent project, about using several instances of modbus_client with several slaves .ini files.

What I want is to communicate with several slaves via modbus TCP/IP, for achieving this, I'm running several instances of modbus_client chosing differents .ini files.

The issue I'm seeing is that there is some kind of competition between the instances, making communications very irregular. The first modbus_client seems to be quicker, and the last one the slower, and sometimes communications freezes during minutes, no refreshing any tag from the slave station.

It could be interesting to implement a sequential communication inside a single modbus_client instance with all stations, as in modbus RTU?

Someone else has already faced this problem?
Thanks!

data read delay when using rlmodbus

Hi,

I've found a bug when using the modbus_client example for reading data from a M340 PLC.

it's TCP/IP communications with 20 cycles of 50 holdingRegisters each. All from the same slave.

When I have an error in communications I read data delayed 1 cycle before (1 cycle every cycle error), I've tested it finally by connecting and removing the RJ45 plug.

I've bypassed it by reseting the rlsocket construction when a modbus->response is not OK (in the modbusCycle function)

      ret = modbus->response( &slave, &function, localData);
      if(ret < 0)
	{
	  int cnt = provider->readErrorCount() + 1;
	  if(cnt >= 256*256) cnt = 0;
	  provider->setReadErrorCount(cnt);
	  poll_slave_counter[slave] = n_poll_slave;
	  //ADDED
	  printf("RESETTING MODBUS! \n");
	  delete modbus;
	  modbus = new rlModbus(1024,protocol);
	  delete mysocket;
	  mysocket = new rlSocket(ip,port,1);
	  modbus->registerSocket(mysocket);
	  mysocket->connect();
	  ////
	}

I've seen the code at low level but I don't know the reason.
Thanks!

pd:using last version form github, GNU/Linux ubuntu 16.04 64 bits.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.