LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to connect the visa Read

Of course you need a read if you want to 'read' data from the instrument. It's really quite simple. You do a write to send a command to the instrument. The command may to set up a parameter or it could be a command for the instrument to take a measurement. In your case, you send a command to tell the instrument to transfer the display to it's transmit buffer which sends it to the pc's serial port. Then you do a VISA Read to get the information in the pc's recieve buffer and transfer it to your LabVIEW program.

Here's a cleaner version of the read subVI. Notice the single VISA resource name control that gets passed from function to function and back from the subVI. This simplifies wiring. You can also wire an error cluster directly to a case statement's selector input.

0 Kudos
Message 11 of 13
(613 Views)
Thanks. I have attached the Read subvi1.vi to this message. It is built following your instructions. However, I didn't succed to creat the "byte at port". I therefore have an error message. Can you tell me how to make it work? Thanks
0 Kudos
Message 12 of 13
(564 Views)

You could have made it easy by just picking VISA Bytes at Serial Port from the Instrument I/O>Serial palette. Smiley Wink

Since you didn't, right click on the property node and select 'Properties>Serial Settings>Number of Bytes at Serial Port.

0 Kudos
Message 13 of 13
(561 Views)