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: 

Error between graph and indicator values

Solved!
Go to solution

i am running a lab view program for some kind of pulses and the number of pulses are appearing different in graph and in indicator. how can i get the same pulses and their value in both graph and indicator

0 Kudos
Message 1 of 8
(2,532 Views)

Hi Rahul,

Could you  share your block diagram to understand what exactly is happening.

 

0 Kudos
Message 2 of 8
(2,505 Views)

here is the block diagram

0 Kudos
Message 3 of 8
(2,496 Views)

What exactly are you expecting to see? You are counting forever, but the graph only shows the last shot, i.e. the data from the current iteration.

0 Kudos
Message 4 of 8
(2,482 Views)
I want to see continuse pulses in graph and same amount of number in indicator
 
0 Kudos
Message 5 of 8
(2,456 Views)

@Rahul1123 wrote:
I want to see continuse pulses in graph and same amount of number in indicator
 

I don't know what "continuous pulses" are. Seems like a contradiction 😄 Maybe you want a chart?

 

Still, this entire things seems extremely wrong and convoluted because each iteration of the FOR loops operates in the same scalar boolean. If you had an array of booleans you can calculate the number of trues as follows:

 

altenbach_0-1583166916621.png

 

Do you have a VI with some actual data?

Can you define exactly what result you expect?

 

I would eliminate most of the dynamic data and signal processing subVIs, because your problem is much simpler. Just do a comparison with a proper threshold and count F->T transitions, for example. (or count all transitions and divide by two).

 

0 Kudos
Message 6 of 8
(2,447 Views)

My setup:

My machine outputs pulses of a certain width. I am capturing the same with my scope. 

My requirement: 

count number of pulses greater than a certain threshold ("Delay time" control)

My issue:

I can see on the graph that 3 pulses have been outputted. However, my count value, as seen in the 'No Discharge' indicator, is always 1.

I now understand that I'm operating on the same boolean on all the iterations of the loop. Besides that, please suggest the changes I should implement to see results as per my requirement"

 

0 Kudos
Message 7 of 8
(2,404 Views)
Solution
Accepted by topic author Rahul1123

All you need to do is count F->T transitions of a comparison with a reasonable threshold value. (This ensures that the pulse width does not matter).

 

Here's a very simple example. No need for complicated signal processing.

 

(Details depend how the data arrives, but the code can easily be modified for any other situation. This should give you some ideas.)

 

 

altenbach_0-1583424083280.png

 

0 Kudos
Message 8 of 8
(2,389 Views)