LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with VISA connection!!

Hello, I got a problem acquiring data using VISA block diagrams. It doesn't read the data from my test bench correctly. As you can see on my VI, there are many sensors to show the values. The data acquisition block diagrams are obtained from the company, then I tried to connect it with my own VI with a few changes. However it turned out to be not working properly. The values don't change along with the sensors. Could you please check if there is something wrong with my VI. The sub VI "VI connection" is responsible for the data acquisition.

 

The attachment "Data Read (adapted)" is the VI from the company.

 

You can ask me anything if you don't understand my problems. Its quite hard to explain.

 

Thank you

Download All
Message 1 of 9
(3,376 Views)

Hi bombbooo,

 

after ~200 messages you still don't get the principles of dataflow!?

 

Your "vi connection.vi" uses while loops, which never stops. You programmed it that way. What kind of behaviour do you expect in the calling main VI?

 

For someone writing his Master thesis I would expect more knowledge about what he is doing...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 9
(3,372 Views)

The original data acquisition VI (Data Read.vi) that I attached contains a while loop too. I just extracted the block diagrams inside the while loop in that VI to put into my own while loop. Is it the wrong procedure?

0 Kudos
Message 3 of 9
(3,362 Views)

-what function should I change in my while loop? Now it reads the data only once at the beginning. It doesn't update along with the acquired data.

0 Kudos
Message 4 of 9
(3,347 Views)

Hi bombbooo,

 

you don't need to change a function.

All you have to do is to program a proper stop condition for those while loops...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 9
(3,330 Views)
I already tried to change into " continue if true" , but it still didn't work. Is there any improper codes in my vi? It only measures the values at the beginning, then no more responses! I gotta submit this program within this week, so please help !!

Thank you very much
0 Kudos
Message 6 of 9
(3,328 Views)

Hi bombbooo,

 

"I gotta submit this program within this week, so please help !!"

 

Do I get any rewards for solving your Master thesis?

Come on, do some serious debugging with probes, error checking and highlighting mode...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 9
(3,325 Views)
I did it all but im still struggling to solve the problem. I know its about the while loop thing that never stops till the stop button is pressed. But one thing i would like to ask is my origiinal sub vi has also a while loop, and it runs properly. I just copies the block diagrams inside the while loop and then put it into my main while loop. Does it cause any problems?

Could you please give me some hints?
0 Kudos
Message 8 of 9
(3,319 Views)

I already tried all possibilities for the while loop stop buttons but it still comes out unstatisfying. 😞

0 Kudos
Message 9 of 9
(3,304 Views)