Quantcast
Channel: Visual C# forum
Viewing all articles
Browse latest Browse all 31927

SerialPort works from VS2010 IDE, but not from the exe ?

$
0
0

Hello,

I have written a modbus-like application, that polls an attached instrument for data via the serial port (a USB to Serial Adapter).

While reading from the Slave, in case of no response (read timeout), seven attempts are made. If all seven result in a read timeout, I have set up an error message that there is no Slave connected.

Now everything works perfectly while debugging (F5) from the VS2010 IDE.

However, in the deployed application, or even from the Bin (Debug or Release) the Application sends all 7 requests in quick succession, without waiting for the timeout (I checked with a Serial Port Sniffer) causing the request to fail ('Slave not Present' error) .

Why is this happening ?

Thanks in Advance !


Viewing all articles
Browse latest Browse all 31927

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>