LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Transferring a file through VISA

Hi everybody

I want to read the value from one file and store the same value on another file by serial connection. But when I start the VI labview crashes...

I am uploading the VI. Any help will appreciated

Thanks in advance

0 Kudos
Message 1 of 18
(3,750 Views)

That VI makes no sense to me. You are reading a file and outputing to a com port and then reading from the same com port and writing to a different location. The VISA functions are obviously not required. Are you attempting to simulate two different computers? What I would suggest is one loop that uses normal File I/O to read a file and pass x number of bytes at a time to a normal VISA Write. Then, in a separate loop or VI, a regular VISA Read that passes each byte read to a normal file write function. Use two different com ports or have a loopback plug on a single port.

 

p.s. You also really need to place the VISA Configure Serial Port and VISA Close functions outside of any loop that you use.

Message 2 of 18
(3,742 Views)

Many thanks for the advice I will try it but actually in future I want is that a computer which is connected to a DAQ will read the data store it in its memory and on the same time store it in secondary computer in real time which is connected to main computer via RS-232 and data will acquired from DAQ continuously...

0 Kudos
Message 3 of 18
(3,722 Views)
Then why are you playing around with file operations? And why RS232? Use a network connection. Many examples of that come with LabVIEW.
0 Kudos
Message 4 of 18
(3,717 Views)

Sorry for my mistake  but we are making a high altitude balloon which will measure emf, radiation etc and their will only custom made board and these board will have memory as well fsk modulator and fsk module will send data to ground as well as secondary board which will act as backup and due size consideration we will be using special serial connector implementing RS-232..

0 Kudos
Message 5 of 18
(3,709 Views)

I modified the vi but when I want to transfer a file size of I MB or more it is writing but not reading(It is showing return count but read buffer is 0). Is their any limitation on amount of  data can be transferred.

Thanking in advance...

0 Kudos
Message 6 of 18
(3,699 Views)

You did not implement any of my suggestions. How big do you think the serial port buffer is? Do you expect it to hold all of the file until the write is complete and before you get around to reading it?

0 Kudos
Message 7 of 18
(3,693 Views)

Extremely sorry for not following your suggestion but way I understood is that use normal file I/O and passes the value to normal VISA write and read the value by normal VISA read  and use normal file I/O operation to store it but you said x no of bytes but for my application it have to be the complete file so I have to use it...

0 Kudos
Message 8 of 18
(3,680 Views)
You still did not read what I said. You WILL have to write x number of bytes at a time and you WILL have to have a parallel read loop (or separate VI). I understand perfectly well that you need to send an entire file.
0 Kudos
Message 9 of 18
(3,672 Views)

Hi,

 

I need to transfer a text file from one PC to another PC through serial port.

 

I tried VISA, I can transfer the strings that are in the file. I have to transfer the entire file.

 

Could you please help in this?

 

Thanks & Regards,

Ashokan. M

Ocean Acoustics,
National Institute of Ocean Technology,
Chennai, India - 600100.
0 Kudos
Message 10 of 18
(3,634 Views)