Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Any Labview or RS-232 experts here?...(serial file transfer)

Status
Not open for further replies.

jrz126

Active Member
I'm working on this simulator at work and I need a way to transfer files over RS232 using Labview. I'm able to do simple commands over the line, (like change directory), but I need a way to transfer a couple of small INI files.
I googled a bunch and I think I might need some sort of extra library or something that supports Xmodem transfer.


The serial connection is at 38400 8 bit, no parity and uses Xon Xoff flow control? Also, the labview is running on a linux server as well.
 
to make RS232 connection you need crossover cable (if both ends are PC). you can make simple crossover cable using two DB9 female conenctors by connecting 5-5, 2-3 and 3-2 (pins 2 and 3 are crossed).
since this cable only ses Rx and Tx lines (pins 2 and 3) you must choose no handshaking (handshaking = flow control). hardware handshaking requires wiring of remaining pins (search web for crossover cable diagram, AB cable 1747-CP3 or 1756-CP3 are such cables for example). port setting must be same on both devices (baud rate, parity, stop bits, handshaking type). simplest test is using some sort of terminal emulator. Hyperterminal comes with every windows although it may not be installed (if that's case use Control Panel, Add Remove Programs, Add Remove Windows component to install it). After establishing connection, use Transfer menu, select send on one machine and receive on another etc.
I didn't play with Linux in a long time (even longer for Labview) so you are on your own there. I know that linux comes with terminal emulators as well (Minicom for example). The idea is the same. Just make sure that both sides use same protocol (Z-Modem, Xmodem, or whatever). any decent terminal will support at least few protocols. For example Hyperterminal on WinXP supports:
1k X modem,
Kermit,
Xmodem,
Ymodem,
Ymodem-G,
Zmodem,
Zmodem with crash recovery.

Was this helpful?
 
Wow, thanks a bunch...here's alittle more background...The serial connection is to the computer that is being simulated (the locomotive controller), I have all of the connections done up properly.
I have been using hyperterminal on a regular PC (running WinNT) and hyperlink requires using a pull down menu and selecting the send file command and I think it is defaulted to Zmodem crash recovery. I'm trying to automate this process by using Labview and I need a way to tell it that I am sending a file. I thought I would have to use labview for all of the commands (including sending the file).

Now that I think about it, I am able to run regular linux commands in labview, so maybe I can use that to access those other programs.
 
it should be no problem to save required keystrokes in a text file and then forward them to an application using command line.
 
rs232 interfacing

hi...i want to interface pc to 89c51 via rs232.i tried a lot with different codes n hardware bt its showin nothin in hyperterminal.i always do port setting in device manager of pc to set the baudrate 1200 4 16mhz crystal.i have attached dia n code.plz tel me y its nt running?code is made in keil using c.
 

Attachments

  • dia of rs232.doc
    30.5 KB · Views: 805
  • code.doc
    20 KB · Views: 1,046
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top