LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial port download

Hi,

 

We use an application for the serial port called Tera Term.

 

We use Z Modem at 57.6 KB/s, n, 1, stop bit and handshaking disabled to download two files (bl1pkg.tar.gz, bl1pkg.tar.gz.sig) at the same time to the target unit.

 

On completion the unit to which the files were sent will reboot which then needs to be checked if all is OK.

 

Can this be duplicated in CVI?

 

Thanks for the help

Simon

0 Kudos
Message 1 of 8
(7,949 Views)
Hi Simon,
 
Thanks for posting your query on the NI discussion forum. Having looked at some resouces it seems as though there are many people who have attepted the same. i.e. do in CVI that which Tera Term does.
 
Check this link out:
 
 
If your interested in programming the serial port using CVI Check this example out:
 
 
Serial Communication LabWindows/CVI Troubleshooting Guide:
 
 
I hope this helps!
 
Kurt
 
 
0 Kudos
Message 2 of 8
(7,912 Views)

Hi Simon,

Yes, you should be able to duplicate what Tera Term does.  We have used Tera Term, now using Procom.  We can do serial transfer of files.  However, we have not programmed a routine to transfer two files concurrently (is that what you were asking?).  I do not see any problems sending to files concurrently to 2 different ports 🙂

Ray

😄

Message 3 of 8
(7,907 Views)

Hi,

 

There is write Buffer and write byte but how do I go about writing a whole file?

 

Also how do I stream the output from the com port to the text box of my application to see real time what is been outputted?

 

Up to now I have been unable to achieve this!!

 

Should I be using the text box?

 

Thanks for the help

            Simon
0 Kudos
Message 4 of 8
(7,856 Views)
Hi Simon,
I attached a small vi to illustrate what you want to do. 
Look at the block diagram BEFORE running it.  I placed an example for reading a script file.  Choose the single command or the script file.
 
I didn't wire any controls (because of time), but you should be able to use the Context Help (? at top right) to guide you on how to config the port.  The streaming output should appear in the output window.
 
JLV
Message 5 of 8
(7,829 Views)

Hi,

 

Thanks for the VI and the effort in trying to help but I am trying to implement in CVI/LabWindows and I am unable to view the file.

 

From my understanding this is for LabVIEW, is it possible to get inspiration from this code to use in CVI?

 

Thanks for the help

            Simon

0 Kudos
Message 6 of 8
(7,822 Views)
Yes, Simon, "VI" is a typical file extension for LabVIEW code.
JLV suggestion is basically to use VISA functions to transfer the file to the instrument, what you can do in CVI using viWriteFromFile function in VISA library or simply ComFromFile from the RS232 library: both of these functions simply send to the port the file content without adding any control character, which as far as I can understand is not as rich and controlled as using ZModem protocol.
Moreover, both functions are syncronous, i.e. they return to the caller only when file transfer is completed, so that you cannot use them to concurrently send 2 files at the same time.


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 7 of 8
(7,816 Views)

OOps!!

Sorry Simon,

My mistake...  I thought this was the Labview forum...  😄

LOL!!  Where is my head these days..  If I have a chance, I will re-write in LW-CVI and post the example. 

Sorry about that.. 

JLV

Message 8 of 8
(7,811 Views)