LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

quick questions about visa/serial

Hi.
I'm using labview 6.0.
Under "Functions/ Instrument I/O / "
And then Serial submenu and VISA submenu.

In Serial submenu: VISA configure, VISA Read, VISA write, VISA Close.

In VISA submenu: VISA Read, VISA Write, VISA Advanced, VISA Clear,
VISA Read STB, VISA Assert trigger.

Question 2: Is there any difference between VISA Read/write between
the two menus? (For me it doesnt seem to be any difference
visually/practically)

Question 2: Why two menus? Or why isnt VISA configure and VISA Close
also in VISA submenu and VISA Clear in Serial submenu?

Thanks
/J
0 Kudos
Message 1 of 5
(3,086 Views)
The functions are the same. The two menus are there for convenience I'm guessing. Someone developing a VISA serial application can tack down a single palette and have the most commonly used functions readily available. The same would be true of the regular VISA palette for GPIB/VXI development. The actual name of the VISA configure function you mention is VISA Configure Serial Port and it makes sense to put it on a higher level on the serial palette (it's also on a lower-level palette of VISA menu). When looking at function palette's, it's very helpful to have Show Context Help turned on. If you did that, you'd see that VISA Clear does a IEEE-488 device clear - not at all applicable to a serial device.
0 Kudos
Message 2 of 5
(3,086 Views)
Dennis Knutson wrote in message news:<506500000005000000EDC40000-1042324653000@exchange.ni.com>...
> The functions are the same. The two menus are there for convenience
> I'm guessing. Someone developing a VISA serial application can tack
> down a single palette and have the most commonly used functions
> readily available. The same would be true of the regular VISA palette
> for GPIB/VXI development. The actual name of the VISA configure
> function you mention is VISA Configure Serial Port and it makes sense
> to put it on a higher level on the serial palette (it's also on a
> lower-level palette of VISA menu). When looking at function palette's,
> it's very helpful to have Show Context Help turned on. If you did
> that, you'd see that VISA
Clear does a IEEE-488 device clear - not at
> all applicable to a serial device.

Ah, ok!
So VISA Clear can be used to clear a GPIB device for example?
While also GPIB Clear can be used.

I have another question:
I sometime need to empty com port buffer. Also i dont know the
transmit buffer of the device.
What is the proper way to empty all data everywhere?
VISA Flush I/O Buffer? what parameters?. VISA Read.. etc?
("VISA Read" works most of the time)

I know im not very specific here but I hope you can tell me something
useful anyway.
Thanks alot!
/ape
0 Kudos
Message 3 of 5
(3,086 Views)
I use VISA Flush I/O Buffer to clear a serial port. Doing a VISA Bytes at Serial Port and then a VISA Read with that numbr of bytes specified will work too but I'd rather use one function instead of two. Typically, all I need to do is flush the receive buffer because my programs are in charge of transmitting and I know that everthing in the transmit buffer has been sent so I just wire the VISA resource and let the mask input be the default.
0 Kudos
Message 4 of 5
(3,086 Views)
ok, thanks!
i'll try out some more later on.
0 Kudos
Message 5 of 5
(3,086 Views)