LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial Port in labview

Hi all,

           Im quite new to labview nad im using LV6.1 for a couple of days.I ve got a task to set up a serial interface for a board previously done by some unknown fellow.Ok i ll explain everything in detail..

I ve got an electronic board that does some say an X function.It already have a RS232 communication interface to PC with some specified baud rate 

 

(It has only 3 wires RX TX GND) Till now this interface is done via hyperterminal or equivalent software..Im supposed to develop(in future  ) a customized labview interface to do the same.

My first attempt was to try to send some commands that are stored in the firmware of the board and to expect will labview  respond in same manner as in hyperterminal.I ve wrote a basic VI ,it ll open the serial port write the command specified and then ill read back..

 

I wrote a command named "flash" it is expected to return the state of the board in hyperterminal but wat i got is some junk values ...

 

I ve a doubt also in the "requested byte count " in "serial port read" i ve given some high value since i dont know howmany letters it is going to return..

 

Can some body suggest me where  to proceed??

regards

Steeve

 

 

 

 

 

0 Kudos
Message 1 of 7
(3,271 Views)

First check the no of bytes available at the port and read the bytes that avail.

Message Edited by Baji on 05-13-2009 12:04 PM
Balaji PK (CLA)
Ever tried. Ever failed. No matter. Try again. Fail again. Fail better

Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
0 Kudos
Message 2 of 7
(3,265 Views)
hi, please find the attached VI herewith.
Alpesh Prajapati
0 Kudos
Message 3 of 7
(3,260 Views)

@ alpesh

 

Could you please put the vi as a  jpg file here.im using LV6.1 cant open ur vi here..

thanks

0 Kudos
Message 4 of 7
(3,255 Views)
here is d block diagram image.
Alpesh Prajapati
0 Kudos
Message 5 of 7
(3,236 Views)

hi all,

         i ve been writing the program wihout using visa till now..Is there any advantage/disadvantage for using VISA over ordinary serial port module in labview..Does VISA requires any aditional hardwares or softwares??

0 Kudos
Message 6 of 7
(3,219 Views)

VISA stands for Virtual Instruments Software Architecture.  It gets installed when LabVIEW is installed in the system. 

 

It is a generic driver platform that can be used to communicate with RS-232, GPIB, Printer port, USB and numerous other platforms. So when your device changes the code does not change meaning only the configuration specific to each device needs to be changed, the VISA r/w remains constant, not much code changes are required to move the code from one platform to another- this is the greatest advantage of VISA.

 

Hope this helps

With regards,
JK
(Certified LabVIEW Developer)
Give Kudos for Good Answers, and Mark it a solution if your problem is solved.
0 Kudos
Message 7 of 7
(3,200 Views)