From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to transfer file from PC to PC via serial port using labview

Solved!
Go to solution

HI

 

Setting of Prepend array or string to FALSE solved my problem. But at the same time i wan to know one more thing, through serial prot i may send only character sometimes and sometime i may need to send file also. Here my doubt is at the receving end how i could differentiate whether the bytes at the port received is a FILE or CHARACTER. Bcoz if file come i have to store it and if character comes i have to just display on list box.

 

So any suggestion for finding the Bytes received at the port is a FILE or CHARACTER.

 

Padhu.

0 Kudos
Message 11 of 20
(2,703 Views)
A byte is a byte is a byte. You have no way of knowing if it was a byte read from a file or from a a string control. You have to make up your own protocol, such as first sending some kind of flag that says "hey, the next set of bytes represent a file", or "hey, the next set of bytes are from a string control".
0 Kudos
Message 12 of 20
(2,689 Views)

Padhu,

 

In addition to what smercurio wrote you also need to consider how to indicate the end of a file and how to handle special bytes which may be interpreted as control characters.  Make sure that all termination characters are disabled and that Xon/Xoff handshaking is disabled.  You need these things because all possible combinations of bits can occur in a binary file.  The special interpretations of these as ASCII characters must be ignored.

 

Lynn 

0 Kudos
Message 13 of 20
(2,676 Views)

It would also be quite helpful to understand what it is that you're doing, in a big picture kind of way. Your initial question was about transferring a file from one PC to another over the serial port, which as Dennis pointed out is quite an odd way of doing it since it is so slow. Now you are asking about detecting if it's meant for a string indicator. This leads me to suspect that there's more going on here than you're telling us.

 

Can you provide more information on your application?

0 Kudos
Message 14 of 20
(2,668 Views)

HI

 

Actually i have an application to transfer text or file to a HF transmitter through a modem. the modem communication is a serial port. So in order to test the transmision and receiving of files or text here i am using only modems. So transfering and testing of the data from 1 PC to other PC through modem is done. for achieving this only i was luking for some solution.

 

Padhu

0 Kudos
Message 15 of 20
(2,649 Views)

HI

 

I have achieved the file transfering through serial port. But even though i face some difficulty in transfering file with larger data. i am unable to understand completely the solution said by photon dan. even though u tried it. can u explain little detailed the solution said by him or with some example.

 

padhu.

0 Kudos
Message 16 of 20
(2,646 Views)

Hi

Can any one provide some sample code for transferring files of larger size from 1 PC to other PC through serial port. I meant to ask for sample code consist of formation of this larger file into packets of specified size and then transferring one by one through the port (because we are aware that we cannot transfer the file in whole through serial port due to limitation of its size).

 

Regards,

Padhu

 

 

0 Kudos
Message 17 of 20
(2,579 Views)

Hi, I have little experience with lavbiew and I need a program to communicate via RS232 serial port between two old pc's. I made a program but do not know how that works, and I have problems with the program settings on both pc's.

My prototype is this and I use version 7.1

Download All
Message 18 of 20
(1,682 Views)

but this solution is for serial cable , i am working with NI wsn kit so how can i transfer data through wsn nodes...what kind of interface should be given. basically programming in labview 2011. please help!

0 Kudos
Message 19 of 20
(1,365 Views)

Then don't post in an old thread that has nothing to do with your question.

 

Start a new thread.

0 Kudos
Message 20 of 20
(1,356 Views)