From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Time delay between VISA W/W and String problem

Solved!
Go to solution

Hello,

 

I am working on documentation of others VI. I got a question about the time delay between VISA W/W. I was wondering why we can not put the all strings in one VISA Write and what is the purpose to have two Write here and the delay time of 0.1s is critical?

 

For the String problem I had where you can find it with three question marks labeling in the .png file,  I want to see what STRING I get here but when I add

a indicator here, what I got is a number instead, why?

 

BTW, what the meaning of integer 70, I knew is number of bytes of data to be read, but where I got the exactly 70?

 

Thank you

0 Kudos
Message 1 of 6
(2,437 Views)
Solution
Accepted by topic author huskerli
The delay does absolutely nothing. I suspect the original programmer intended to give some time for the instrument to setup before taking a reading. The measurement request and the delay happen in parallel though.

The number of requested bytes is a somewhat random number. You just want something large enough to get all data in the buffer. It could just as easily be 1000 or 10000. The read will automatically terminate with EOI is asserted by the instrument.

The indicator will display a string but obviously the string is the numeric prior to being converted to a DBL.
0 Kudos
Message 2 of 6
(2,432 Views)

Is that the setup will happen everytime after I close the VI or only the first time?

 

Sorry, I am not sure why it being converted to a DBL? If I'd like to see the string in the indicator, what can I do?

 

Thanks

0 Kudos
Message 3 of 6
(2,422 Views)
The setup will happen each and every time the case is true.

You are seeing a string. If you want to see the complete string as the instrument returns it, you need to look at the output of the VISA Read.
0 Kudos
Message 4 of 6
(2,416 Views)

the output of the VISA read i got is call read buffer, but it still seems like a number instead of a string?

0 Kudos
Message 5 of 6
(2,414 Views)
Isn't a numeric value what you would expect if you requested a current measurement? Read the instrument manual if you are confused as to what the query is supposed to return.
0 Kudos
Message 6 of 6
(2,402 Views)