Jump to content

Serial link detection in labview


Recommended Posts

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

Link to comment

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.

Link to comment

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.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.