LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Highlight execution problem

Hello

I have created a small vi for taking measurements form DMM.
My goal is to stop it when buffer reaches to 100.i.e. Buffer is full.
I am giving command F1G0B1Q11X to read my data.
but buffer is never reaching 100. Buffer count sometime increases sometime decreases and program runs continuously.

It is working fine in Highlight execution mode in labview, when at runtime labview shows us where the program is executing at any instance. Buffer is increasing and program also stops when it reaches 100.

I am attaching my vi kindly take a view on it and let me know What wrong I am doing.
Please help me.

0 Kudos
Message 1 of 5
(2,637 Views)

Hi Joshi,

 

do you really need all those sequences?

 

Well, to your question:

Do you need to read 200 bytes to get the buffer count? How many chars do you expect here?

How does the buffer count  string look like?

 

- I also would like to advise you to use VISA instead of old, plain GPIB functions.

- Use the error cluster to enforce DATAFLOW!

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(2,622 Views)

Well, you are constantly reading it, which takes items out of the buffer.  So that just means that you are keeping up with the acquisition.  I most situations, that is a good thing.  If you just want the 100 items, then don't read them.  Just check for the buffer reading 100 and then use a FOR loop to read the 100 samples.  Or you could just use a FOR loop to read the 100 samples in the first place.


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
Message 3 of 5
(2,606 Views)

Hello GerdW

 

In this F1G0B1Q11X  yes I need all those B1 for Reading from buffer and Q11 for buffer interval and mode.

 

and yes for buffer count only 4 characters are enough but how it will change the output.

 

my problem is that why buffercount is changing dramatically why it not strictly increasing and halting at 100.

 

I am novice programmer to labview so can you please tell me how visa controls will effect working of my program.

My goal is just to stop program when buffer is full.

 

If there is any other way to it please tell me.

Thanks

0 Kudos
Message 4 of 5
(2,601 Views)

Hello crossrulz

 

I have done second one I use for loop to read 100 reading.

Basically I am trying to get how fast buffer is than normal execution.

Beacause it should be faster than normal execution.

0 Kudos
Message 5 of 5
(2,597 Views)