java中使用comm api将数据传输到串口
我有一个串行绘图仪(MP2300 GRAPHTEC..非常旧),我正在使用 Comm API 编写一个 java 程序来与其通信。我正在使用 XON/XOFF (在绘图仪设置中)和我的 java 程序。
我确信计算机和绘图仪之间存在流量控制问题。经过一段时间的绘图后,绘图仪在绘图中间绘制出不稳定的图案。如果我在发送一大块文件后引入延迟(我每向绘图仪发送 10 个命令就延迟 1 秒),则绘图是完美的。
我的问题: 我是否必须从绘图仪读取数据才能查明设备是否发出 XOFF,或者是否已在 API 中处理?
I have a serial plotter (MP2300 GRAPHTEC..very old), that I am writing a java program with the Comm API to communicate with it. I am using XON/XOFF (in the plotter setting) and in my java program.
I know for sure that there is a flow control issue between the computer and the plotter. After a while of plotting, the plotter draws erratic patterns in the middle of the drawing. If I introduce a delay after sending a chunk of the file (I am delaying 1 seconds every 10 commands sent to the plotter), the drawing is perfect.
My question:
Do I have to read data from the plotter to find out if there is a XOFF issued by the device, or that is already taken care for within the API?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您使用的是操作系统驱动程序,那么它已经得到处理。应用程序无需担心。
If you are using a OS driver, then it is already taken care of. The application don't need to worry about.