Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

MKS 946 Vacuum | Visa Read Problem

Solved!
Go to solution

Dear Community People,

 

I am using LabVIEW to get flow rate data from LabVIEW. I made an easy code(withoutwhile_loop.vi) using visa write and read. It reads the command. For example, for @253FR6?;FF it usually returns @253ACK-1.100E-2;FF. Here 1.100E-2 is my desired flow rate.

However I want to read this data continuously. So I used a while loop in 500ms wait time(withwhile_loop.vi). Now when I run the loop for each iteration, the read value is different. For example, for first iteration, it is @253ACK-1.100E-2, for 2nd iteration it is ;FF@253ACK-1.1, for others it is something else. I want the code to show in @253ACK-1.100E-2;FF format everytime so that after each iteration I can extract the value(For this case -1.100E-2).

Could anyone help me what I am doing wrong exactly?

I have attached both of the code. 

Additionally, how to find out what's the correct byte count?

 

Thanks. 

Download All
0 Kudos
Message 1 of 3
(2,499 Views)
Solution
Accepted by topic author Jarir

Hi

In the first iteration you read  @253ACK-1.100E-2;FF

Including all characters this is 19 character and you only ask for 16, what happens?

 

You better can ask for 100 chars and have a semicolon as end character.

Look at the examples\Instrument IO\Serial\Continuous Serial Write and Read.vi

You can get at this by help/find examples and then type in serial

 

They use char 10 as endcharacter, you should fill in the ascci value of the semi colon.

 

greetings from the Netherlands
Message 2 of 3
(2,412 Views)

You might want to also give this a watch: VIWeek 2020/Proper way to communicate over serial


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 3
(2,408 Views)