News:

  • June 26, 2026, 10:35:17 PM

Login with username, password and session length

Author Topic: Modbus Slave driver for a PC  (Read 19777 times)

DLTimmons

  • Hero Member
  • *****
  • Posts: 232
Modbus Slave driver for a PC
« on: October 06, 2014, 01:54:56 PM »
Doe anyone know of a driver for .net or C++ That will let a PC function as a Modbus TCP slave and not have to run a Polling loop on the PC?

LWgreys

  • Hero Member
  • *****
  • Posts: 117
Re: Modbus Slave driver for a PC
« Reply #1 on: October 08, 2014, 12:16:08 AM »
I would upload a couple of NModbus zip files for you to look at, but there is a file size restriction here. Maybe I can email them to you. About 4 megs long. I haven't used them but just happened to have them. Nmodbus web site closed down sometime this year. You mite still find these files elsewhere. But if your look to purchase drivers, take a look at http://www.modbusdriver.com/.

LWgreys

  • Hero Member
  • *****
  • Posts: 117
Re: Modbus Slave driver for a PC
« Reply #2 on: October 08, 2014, 12:21:07 AM »
Download the file from code.google.com. Here is the link https://code.google.com/p/nmodbus/downloads/list

DLTimmons

  • Hero Member
  • *****
  • Posts: 232
Re: Modbus Slave driver for a PC
« Reply #3 on: October 08, 2014, 12:33:58 PM »
Thanks

I have look at them and they setup a thread that continuously runs. Every thing I found so far either does the continuous thread or infinite loop. Was hoping to find an interrupt based driver that work much like a serial port only runs when there is activity, the IT guys are paranoid of polling for the data from the PC side.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6164
  • Yes Pinky, Do-more will control the world!
Re: Modbus Slave driver for a PC
« Reply #4 on: October 08, 2014, 03:51:18 PM »
Multithreaded operating systems don't typcally operate that way. You normally create a thread that will block on a system call until there is something to do. Just because the thread appears to spin doesn't mean that it actually runs all the time. Interrupts are happening at the driver level, but that doesn't extend to the the thread level.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

DLTimmons

  • Hero Member
  • *****
  • Posts: 232
Re: Modbus Slave driver for a PC
« Reply #5 on: October 09, 2014, 09:17:05 AM »
I will pass this along to the IT guys. If I can do the PC as a slave would be great as only need to send data max once every 4-5 minutes to hours between sending data. But on the flip side I can not wait for a minute to poll for the data.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6164
  • Yes Pinky, Do-more will control the world!
Re: Modbus Slave driver for a PC
« Reply #6 on: October 09, 2014, 09:36:30 AM »
Simple way to test it is to run the server and look at CPU load. If the process is eating up all the time, it isn't doing it the way you want. If it isn't, it's fine. One caveat, in multi-core systems, 'all' might be 25% or even 12.5%. Should be pretty obvious though...near 0% with spikes for activity is good. A constant number (100, 50, 25, 12.5...depending on cores) is what your IT has an allergy to.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

DLTimmons

  • Hero Member
  • *****
  • Posts: 232
Re: Modbus Slave driver for a PC
« Reply #7 on: October 09, 2014, 10:04:16 AM »
This is a complex systems I have 3 Do-mores and 2 AB compact logix that I added a Prosoft TCP card to and 2 PCs each communicating  with  a do-more. (If I had a device net scanner the Compact Logix would go but it came in as a function machine with all I/O on device net. Oh I could have replaced the AB's for what the Prosoft card cost)

One of the do-more will be connected Modbus RTU to five Clicks on one port and 4 GS2 drives on the second port and a bar code scanner on port 3.  one of the other D0-mores will be connect Modbus RTU to 9 GS2 drives. One of the PC will be communicating with the 2 AB's and a Do-more the second PC will be communicating with just a Do-more. and the 3 Do-mores will be communicating with each other.


So how is that for a application of the Do-more ;D

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6164
  • Yes Pinky, Do-more will control the world!
Re: Modbus Slave driver for a PC
« Reply #8 on: October 09, 2014, 10:30:51 AM »
Do-more won't break a sweat. Lotta work for the engineer though. ;)
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

DLTimmons

  • Hero Member
  • *****
  • Posts: 232
Re: Modbus Slave driver for a PC
« Reply #9 on: October 09, 2014, 12:55:09 PM »
Do-more won't break a sweat. Lotta work for the engineer though. ;)

Make one silk purse out of a sow's ear and they expect it every time ;D

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6164
  • Yes Pinky, Do-more will control the world!
Re: Modbus Slave driver for a PC
« Reply #10 on: October 09, 2014, 01:48:42 PM »
Silly mortals. Don't they know that although we have super-powers, these things actually are hard?!?
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3612
  • Darth Ladder
Re: Modbus Slave driver for a PC
« Reply #11 on: October 09, 2014, 03:07:56 PM »
Exactly.  While our super powers are indeed amazing, they do become depleted and require recharging, which involves beer, time off, and cheesy sci-fi movies.
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6164
  • Yes Pinky, Do-more will control the world!
Re: Modbus Slave driver for a PC
« Reply #12 on: October 09, 2014, 03:13:12 PM »
Exactly.  While our super powers are indeed amazing, they do become depleted and require recharging, which involves beer, time off, and cheesy sci-fi movies.

Indeed, and well stated. Might need some of that recharging myself shortly.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

DLTimmons

  • Hero Member
  • *****
  • Posts: 232
Re: Modbus Slave driver for a PC
« Reply #13 on: October 09, 2014, 05:20:02 PM »
Time off rare but tomorrow I will be and paying a visit to the Grizzly showroom ;D