temcocontrols / T3000_Building_Automation_System

Bacnet Modbus Zigbee building automation front end
http://temcocontrols.com
MIT License
70 stars 57 forks source link

COM Port Scanning #12

Closed JamesBremner closed 11 years ago

JamesBremner commented 11 years ago
#define  LATENCY_TIME_COM  60

File:ModbusDllforVc\ModbusDllforVc\common.cpp
Line: 7

This is the number of milliseconds that the port scanner waits for a reply before concluding that there is nothing connected. It seems very short to me.

My test setup is a virtual null modem and a simple modbus slave simulator. Usually it is plenty fast, but I cannot get reliable detection of the slave simulator unless I increase this number significantly. I would imagine you might hit the same problem out in the real world.

Increasing this number will slow the scanning, but make it more reliable.

A couple side issues:

JamesBremner commented 11 years ago

I realised that my modbus slave simulator was polling at just 1 Hz. When I increase the polling to 10Hz, the T3000 COM port scanner works reliably with a latency of 60 milliseconds.