Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA Write.vi Options for the Write Buffer

Hi,

 

For now I am not working with any hardware, I was just running the read write buffer within my pc only. I will try to send the 2018 file. But for now, I am attaching the snip shots. Also, I have checked and VISA Write return count is not wired to the VISA Read Byte count.

 

Thanks for quick reply

Download All
0 Kudos
Message 11 of 12
(481 Views)

You are missing the point of VISA.  VISA stands for Virtual Instrument Software Architecture - https://en.wikipedia.org/wiki/Virtual_instrument_software_architecture

 

Its an API for controlling instruments, so in your code you are asking the VISA Write to send a command "Good" to VISA Resource name "COM1" using a serial bus. You then try to read a reply from COM1, after checking if there are bytes at port.  So unless you physically have a device or an emulator ready to reply to the "Good" command you will never have a reply.

 

Here's a good introduction on how to properly use serial instruments in LabVIEW.  (Hint: DO NOT USE BYTES AT PORT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! © crossrulz)

 

https://labviewwiki.org/wiki/VIWeek_2020/Proper_way_to_communicate_over_serial

 

If instead you are looking at a way for programs to communicate between each other then look here - https://zone.ni.com/reference/en-XX/help/371361R-01/lvcomm/labview_comm/

 

Hope that helps.

Craig

0 Kudos
Message 12 of 12
(466 Views)