LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to do a simple pulse count that continues in the background as a main program runs with a 6602 counter?

Dear all,
 
I have what seems a fairly simple event counting requirement but I can't find a way to do it.
 
I have a watt-hour transducer to measure the power to a set of heaters (like the electrical meter in your house). The output from the meter switches (between 0 and 5 volts) every time a certain amount of energy is consumed. All I wish to do is to monitor this switching constantly and get a total over a several hours. However, my program is quite large (many different user functions) and I don't want to have to run this counter through the main labview program all the time. What I want is a subVI that will check (say every 5 seconds) to see what the latest count is, and return this to the main program.
 
Does anyone know of a VI that will do this? I couldn't find an example to do it. I tried to use the "Count Events or Time.vi" but it returned an error. This VI didn't ask for the usual Counter set-up (eg. PFI numbers etc.) so maybe I have to configure it first.
 
Thanks in advance,
 
Will.
0 Kudos
Message 1 of 2
(2,555 Views)
The "Count Events or Time.vi" is used to "Configures one or two counters to count edges in the signal on the specified counter's SOURCE pin or the number of cycles of a specified internal timebase signal. " it also has defaults so it could be that these don't match your configuration.

Try taking a look at the Getting Started Counters.VI

The example shows how to use the various VI's you can then call a Counter Read.VI whenever you want to know the current count to calculate the consumed power.

0 Kudos
Message 2 of 2
(2,550 Views)