LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to connect the visa Read

I have a subVi WriteBS subvi 1 that passes command to a device which works perfectly. I created a subvi ReadBS subvi in order to get values from the display of the device. Both subVIs are in attachment. However, there is somthing wromg in ReadBS subvi. Do you now how I should modify the input of the read buffer in order to make it work? Thanks. 
Download All
0 Kudos
Message 1 of 13
(3,547 Views)
Why don't you just delete all of the text you've got to build up the command string for your write? VISA Read returns a string and that means you need to wire an indicator to it. If you were to click on the run arrow of the broken VI, it would tell you exactly what you did wrong.
0 Kudos
Message 2 of 13
(3,547 Views)
Thank you very much. I did the changes but still doesn' work. The modified subVi is in attachment. Thanks.
0 Kudos
Message 3 of 13
(3,537 Views)
The Byte Count input is required. As Dennis said earlier, use the help to show you what is wrong and to get some ideas about how to fix it. If you do not know in advance how many bytes are expected or if the number varies, use Bytes at Port to find out how much information is currently available.

Lynn
0 Kudos
Message 4 of 13
(3,533 Views)
Thank you very much. I am not sure how to get to the option bytes at port.
0 Kudos
Message 5 of 13
(3,532 Views)

VISA Bytes at Serial Port is on the Serial palette. You would wire the output of this to the Byte count input of VISA Read.

Your read subVI has some extra code that you don't need. No reason for the while loop or the retry logic. There's seldom a reason for retrys on a write either. Why do you have that?

0 Kudos
Message 6 of 13
(3,527 Views)
Thank you very much. I have made the changes to readBS subvi1.Vi. Althought I am not sure about the bytes at count I have inserted this in the pump_write_read.Vi (in attachment). I want the readBS subvi1.VI.Vi to be able to read the display of my device. But it does not work. The command "dis" exist to read the display of the device. However I don't know how to incorporate this in the readBS subvi.Vi since the visa Read does not accept a command. Doi you know how I can do that? Thanks again  
Download All
0 Kudos
Message 7 of 13
(3,523 Views)

Since 'dis' is a command to the instrument, you would use your write subVI to send it.

You haven't inserted the VISA Bytes at Serial port anyplace that I can see. You've got a constant of 2 in the read. Are you sure that is the correct count?

I'm also doen't understand why you are using a sequence structure. If you were to wire error out to error in of the next function, you wouldn't need this. Instead of the wait (ms), you can use the delay function. This has error in/out connections. Creating a wait (ms) function to have error connections is a trivial excercise if you are up to it.

Message Edited by Dennis Knutson on 08-22-2006 01:49 PM

0 Kudos
Message 8 of 13
(3,520 Views)
Thanks Dennis. I made changes to the ReadBS subvi1.Vi for the bytes count input. Is that OK? Thanks.
0 Kudos
Message 9 of 13
(3,517 Views)
Ok so do I need a visa read? Or do I only need a write with the "dis" command in input? I would like to diplay the data values on the front panel so i can save them in a file. How can I use an indicator in the write visa to get these values? Thanks
0 Kudos
Message 10 of 13
(3,512 Views)