Welcome, Guest
Username: Password: Remember me

TOPIC: ModbusTCP doesn't poll continuously

Re:ModbusTCP doesn't poll continuously 13 years 4 months ago #1284

  • esixtyone
  • esixtyone's Avatar
Wireshark dump of this setup
The administrator has disabled public write access.

Re:ModbusTCP doesn't poll continuously 13 years 4 months ago #1285

  • esixtyone
  • esixtyone's Avatar
here are the wireshark dumps.

I have now reconfigured to read a single Ai from the modbus slave.

the behaviour is the same, 2 polls and then endless tcp connections started but no more actual modbus traffic. wireshark dump of this also in the zip.

Attachment wireshark_dumps.zip not found

Attachments:
The administrator has disabled public write access.

Re:ModbusTCP doesn't poll continuously 13 years 4 months ago #1286

  • robert
  • robert's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 178
  • Karma: 7
Hi,

I've checked your configurations and the wireshark-dumps. The sendop-flag of the module should not be set but this shouldn't matter. The two polls that are actually made is within a very short time-interval. What do you have the cycle-time set to ?

Check also the proview-logfile if there is anything interesting there. It's located in $pwrp_log.

-Robert
The administrator has disabled public write access.

Re:ModbusTCP doesn't poll continuously 13 years 4 months ago #1287

  • esixtyone
  • esixtyone's Avatar
Thanks for the reply Robert.
I don't have my netbook in front of me right now.
I will get the details and log to you tomorrow.
I noticed how close the two polls were too. I'm sure that they are much faster than the cycle time should be. Note I have also slowed the plc thread time from 100 to 400 ms and set the modbus timeout to 1s. I had assumed that only one modbus poll would be performed per plc thread cycle. Is this correct? (there is only one modbus operation required to read the 3 DIs ,or in the case of the Ai setup a single Ai )

Also, is there an easy way of dumping the entire project configuration?
If there is I will do this and post it.

I think I set the send op flag in case there was a problem with continuous scan mode.
I also tried changing the single op ( um the one that changes the tcp stack operation - im going by memory here!) setting. Same results.
Thanks
Ben.
The administrator has disabled public write access.

Re:ModbusTCP doesn't poll continuously 13 years 4 months ago #1288

  • esixtyone
  • esixtyone's Avatar
I have another netbook with proview installed here with me at home.
I setup another simple project and tunneled the modbusTCP over ssh to my work linux machine, and finally to the modbus device. (phew!)
No polls this time...

Still looks like Proview is starting and then closing the TCP connection after ~300ms, without getting any data (the modbus request) out to the slave.
It appears that from wireshark that the slave behaving correctly, sending the synack when it should. (I haven't dug deeper).

on this test, the plc thread is 100ms, modbus module scan interval is 5, slave timeout is 200ms.

Looking at the slave object while running (using the runtime navigator) I can see the error count going up, it gets reset to zero (occasionally it gets to 10, sometimes less), the status is flicking between MB-W-CONNDOWN and MB-S-NORMAL (mainly in conndown)
Also, RX_Packets and TX_Packets are at 0.
I recall that on the other netbook, these counters were at 2. (as you saw from the wireshark logs, it got only 2 packets out, and the rx counters would indicate it did actually receive them Modbus responses...)

I found a log at this path...
/usr/local/pwrp/modbustest/bld/common/logs/pwr_netbook2.log

basically the log repeats once per second,
E pwr_plc <timedate etc> Connection down to modbus slave, <etc>
The administrator has disabled public write access.

Re:ModbusTCP doesn't poll continuously 13 years 4 months ago #1289

  • robert
  • robert's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 178
  • Karma: 7
Hi,

Really confused on this one. Can you please check at what cycletime the plc-thread is actually running. Check with rt_xtt under folder System-PlcThread.

-Robert
The administrator has disabled public write access.
Time to create page: 8.371 seconds