Serial Port Polling

Posted on by
Serial Port Polling Average ratng: 7,6/10 6379votes
Serial Port Polling

I am just reviewing some code I wrote to communicate with the serial port in C# on CF2.0. I am not using DataReceived event since it's not reliable. MSDN states that. When I read from my serial port, LabVIEW continuously polls for data until the data is available on the port. This increases my processor and resource usage and. I am trying to read from several serial ports from sensors through microcontrollers. Each serial port will receive more than 2000 measurements (each measurement is 7.

The text widget does, indeed, have a get method, but 'you're not in Cansas anymore'. It seems you're refering to the widget by the namespace in which it was created. Windows (that is, widgets) are designated with a path refering to the main window (aka '.'

These references are, if you like, inherently global. You need to explicitly refer to the path of the text widget.

Somewhere in your code you must have declared the widget with something like text.frame.subframe.widgetname. (where I hope 'widgetname' is not 'text' as that might lead to problems). It is that reference:.frame.subframe.widgetname that has the get command (method).

_________________ Bob Rashkin RE: poll serial port (Programmer). It says: [string first string1 string2?startIndex? Torrent Theme Hospital Windows 7. Search string2 for a sequence of characters that exactly match the characters in string1. If found, return the index of the first character in the first such match within string2.

If not found, return -1. If startIndex is specified (in any of the forms accepted by the index method), then the search is constrained to start with the character in string2 specified by the index. So the parameters have to be the other way round in the string first call;) - for futyure reference;).

I have RS232 connection to a device and I used the SerialPort Wrapper in C#. I am able to establish connection and be able to access registers. What I need is to continuously monitor the connection and automatically indicate disconnect(button) in GUI whenever there is a reset on the hardware.

The reset on the hardware doesnot affect the USB ports or voltage on the RS232 lines. The USB ports are all the time available. I implemented connection polling by reading a scratch register with a timer. But then this is going intrusive, when I try to read a block of data on the serial port, the timer expires and port gets disconnected. This is one case where this is affecting the functionality of the tool.

But I am not sure of the best way to implement the connection polling. Please give a suggestion.

Comments are closed.