LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Changing an indicator value using an event structure

Solved!
Go to solution

I'm running the program using the Run Continuously button, since at any case the whole program as to run to get a measurement, I could use a loop, but it will have to encase the whole program, since leaving the opening/closing sequence outside the loop eventually fills the internal memory of the TDC and would require a manual restart.

0 Kudos
Message 11 of 14
(506 Views)

That makes no sense whatsoever.


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
Message 12 of 14
(496 Views)

The subVi that makes the counter work only collects the data store in the TDC, as long as it (the TDC) is on, I don't need to run the program for the TDC to register data, but I need it to collect it, if I run the program (single time) after a while the indicator labeled as 'Event counter' wired to the 'Get event stored' subVi gives the number of events registered since the last time I run the program, and ,just like the last person commented, my counter indicator would only say 1 since there was only a single value change, but running the program continously does nothing until an event occur, which puts a 1 in the 'Event counter' indicator, which should 1 in the 'Counter' indicator for every event. 

 

At least I can confirm that this is the way the subVi work since I can get the number of events from an external counter, so the question I've been asking is regarding the case structure, wired to the change in the 'Event counter' indicator (the one from the screenshot), the LED does turn on every time there is an event, but the counter for some reason does not, and actually counts every events twice as can be seen from the divide operation I use, so I'm not sure if the feedback is correctly wired to do what I'm intending.

0 Kudos
Message 13 of 14
(494 Views)
Solution
Accepted by topic author robertomp09

What you want to do should use a loop inside the Counter VI you uploaded.

 

Most of the code can occur before the loop starts - all of the initialization only needs to be done once. Run the data read in the loop with some polling timer (as the simplest implementation) and then call the clean-up VIs after you stop the loop.

 

I tried to find documentation for the VMELib VIs, but could only find the Digitizer and Comm library documentation. It seems likely if you've already programmed this in C, you know which function you need to be able to either clear the buffer (perhaps "cvt V1190 data clear.vi") or empty it as part of the data read (I'd consider looking at the "dequeue" function, but I'm not sure what it would dequeue, or what you need to wire to make it work.

 

If you use the "Run Continuously" option, you should just assume that the simplest way to consider it is as if you're only running it once, then you're restarting the whole process again. Although it might be you can call it quite quickly, and although there are ways to store data between VI runs (like your feedback node) you're definitely not approaching the problem in the way most likely to give the outcome you want (continuous monitoring and then updating an Event counter?).


GCentral
Message 14 of 14
(462 Views)