Member Login
Search
Jump to a Date
Sponsored Communities
Cool stuff
Neat Stuff

Visit our shop for nerds in control lifestyle products.
Thermal Overload
The threads that wouldn't die...
- PC reliability?
- Windows, real time
- PID loops
- PCs vs. PLCs
- Replacing people
- MS 'monopoly'?
- Software quality
- Where do we go from here?
- Why pay?
- PC reliability?
- Windows, real time
- PID loops
- PCs vs. PLCs
- Replacing people
- MS 'monopoly'?
- Software quality
- Where do we go from here?
- Why pay?
Fortune
You look like a million dollars. All green and wrinkled.
RSS Feed
www.control.com/rss/
To get a personalized feed, become a member at no cost.
Hi everyone,
I am writing buffers to the serial port one after the other in a sequence. But since the write operation cannot finish and a new buffer becomes available for writing, some of my buffers are lost.How can I make sure that all my buffers are written and none of them is lost?
I tried to use Sleep() after each write operation to let the WriteFile() function finish writing, but it does not seem to help. Please advise.
Thanks in advance.
I am writing buffers to the serial port one after the other in a sequence. But since the write operation cannot finish and a new buffer becomes available for writing, some of my buffers are lost.How can I make sure that all my buffers are written and none of them is lost?
I tried to use Sleep() after each write operation to let the WriteFile() function finish writing, but it does not seem to help. Please advise.
Thanks in advance.
Your description is a bit unclear, but it sounds like either the output buffer on the sending end or the input buffer in the receiving end is overflowing
because you are filling the buffer faster than it can empty. The problem is usually at the receiving end, since most serial libraries block if the sending buffer is full.
1) Find out which end the data is being lost at.
2) Try using a bigger buffer.
3) Check your flow control settings and wiring.
because you are filling the buffer faster than it can empty. The problem is usually at the receiving end, since most serial libraries block if the sending buffer is full.
1) Find out which end the data is being lost at.
2) Try using a bigger buffer.
3) Check your flow control settings and wiring.
From Control Engineering magazine...
Related articles from Control
Engineering magazine- Industrial Ethernet advantages using Profinet protocol
- Fieldbus Foundation Seminar: Chicago
- Radios for long-distance use in industrial mesh network
- Embedded: Precise Time Protocol enables new-generation Ethernet mobile networks
- Optimize field wiring with decentralized IP 67 fieldbus system
- Pack Expo: SERCOS real-time communications for packaging
- Modbus RTU master, distributed I/O in compact package: microNCS
- Cordsets meet Fieldbus Foundation H1 Type A cable requirements
Above articles copyright 2008 Reed Business Information.
Subject to its Terms of Use.
Your use of this site is subject to the terms and conditions set forth under Legal Notices and the Privacy Policy. Please read those terms and conditions carefully. Subject to the rights expressly reserved to others under Legal Notices, the content of this site and the compilation thereof is © 1999-2008 Control Technology Corporation. All rights reserved.
Our Advertisers
Help keep our servers running...
Patronize our advertisers!
Patronize our advertisers!




