simple RS-232 advice for labview novice 
Author Message
 simple RS-232 advice for labview novice

Help I'm lost in a mound of confusing labview Information!!

I have an old RS-232 instrument which I want to send simple ASCII
commands to. No need to read anything back or do any handshaking. I am
running Windows XP Pro and have a serial port COM1. I can send
individual commands no problem using hyperterminal in Windows. Now I
want to do the same from LabView 6.1.

There are no labview drivers etc available for my instrument.

I've looked at the serial.vi examples and labview advice of what to do
when there are no drivers, but frankly I lost as to what I need to do.
Although the vi's look simple the problem is that they seem to use
NI-VISA and I don't really understand what this is. For instance
whether this is something that is used for communicating with the
actual instrument (which I doubt would be compatible with my old
instrument) or whether it's something that is needed for driving the
serial port itself from Windows.

So any advice on how to do the kind of simple equivalent of the basic
DOS type commands like:

open (com1:9600,N,8,2) for random as #1
print #1, "A"
close #1

and whether the labview examples would work would be appreciated.

Thanks Ed

ps Just to emphasise I'm running XP - don't know if this make things
harder?



Sun, 18 Sep 2005 11:16:25 GMT  
 simple RS-232 advice for labview novice
You can use either VISA or the older serial functions.
Both of them interface to the serial port of your computer. VISA is an
API that works with not only serial instruments, but also GPIB, VXI,
and TCP/IP. The theory behind VISA is that a single driver can be used
for an instrument no matter how it's connected to the computer. The
fact that your instrument is old should have no bearing on whether you
use VISA or not. VISA does require more files (and larger) to be
installed on the computer whereas the old serial drivr requires only
one small one (serpdrv). This can be a factor if you build an
application and want to distribute it. NI is no longer supporting the
old serial drivers and there has been some recent speculation about
whether they will be part of future LabVIEW releases. I almost always
use VISA but then I almost always have GPIB instruments mixed with my
serial ones and I have to install VISA anyway. In your application,
since you just want to write to the instrument, all you need are two
functions. Use the VISA Configure Serial Port (check the name, I'm not
on a computer with LabVIEW right now) where you specify the baud rate,
etc., and then a VISA Write with the command you went to send as the
write string. To the VISA configure, you can create a constant or
front panel VISA Resource Name. Click on it to select Com1. Connect
the VISA REsource Out of the configure to the VISA Resource In of the
VISA Write. Do the same with the Error Out/Error In, create an Error
Out indicator from the VISA Write to check if any errors occurred and
you're done.


Sun, 18 Sep 2005 12:22:55 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. simple RS-232 advice for labview

2. Labview & RS-232

3. RS-232 and LabVIEW

4. MOXA C218 RS-232 Async Card under Labview

5. HP 34970A and Labview via RS-232

6. Visibility of an RS 232 converter on USB

7. VisualAge Smalltalk RS 232 Communication

8. Placing RS-232 Data into the Keyboard Buffer?

9. some problem in RS-232

10. RS-232 Problem

11. push botton for RS 232 serial bus

12. RS-232 problems

 

 
Powered by phpBB® Forum Software