vattic Posted March 24, 2010 Report Share Posted March 24, 2010 Hi all, i want to send a file of around 1MB from one PC to another using labview through serial port.im using Xmodem protocol for this application. my problem is how to detect the serial connection lost and give an interrupt to the sender saying there is an error on the link so that the transmission should freeze until the link get live.In this time both programs in the transmitter and the receiver should run even if the serial connection is broken. can anybody please help me regarding this matter? Regards, vattic Quote Link to comment
code ferret Posted March 29, 2010 Report Share Posted March 29, 2010 Hi all, i want to send a file of around 1MB from one PC to another using labview through serial port.im using Xmodem protocol for this application. my problem is how to detect the serial connection lost and give an interrupt to the sender saying there is an error on the link so that the transmission should freeze until the link get live.In this time both programs in the transmitter and the receiver should run even if the serial connection is broken. can anybody please help me regarding this matter? Regards, vattic Vattic, Off the top of my head, I would approach this problem using hardware flow control. You can watch the DTR/DCD lines, and use an event structure for control. If you do not have a 5-wire serial port, you could try watching your input buffer over time and change program state when the data isn't arriving. Just a thought. Quote Link to comment
jdunham Posted March 30, 2010 Report Share Posted March 30, 2010 i want to send a file of around 1MB from one PC to another using labview through serial port.im using Xmodem protocol for this application. I apologize for not answering your exact question, but have you considered using PPP over serial? This is built into Windows, and you will end up with a network between the two computers. You could either share files directly or else use LabVIEW's TCP/IP functions which are going to be much easier to work with for data transfer. All the problems of link detection and error correction have been solved by other programmers long ago. If this is a school assignment or there is some other reason to use obsolete stuff, then maybe you can post your code and forum members can try to help with specific problems. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.