LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Calculating with time difference

I have to make a calc different between the Set Flow time and the Flow time rem. The difference what i have with some delay's during network transer could go from 1 or more seconds. What i need is: the difference between Set Flow time and Flow time rem. this i have to add with the 6 seconds multiply.

I hope someone can help me with this.

tia William
Running with Labview 6.1
Fieldpoint hardware
0 Kudos
Message 1 of 5
(2,669 Views)
Btw, i'm using Labview 6.1


William
Running with Labview 6.1
Fieldpoint hardware
0 Kudos
Message 2 of 5
(2,669 Views)
Hi William,

I looked at your VI. Actually the code seems fine to do that calculation, though you do not really need to use the local variables, you could also use direct wires instead. I am guessing you are meaning something different in your question? Are you trying to measure the time using the FP-CTR-500? what I see in your code is that you use LabVIEW's Operating system timer function. If you want to use the Fieldpoint counter, try using FP Read vi, and read the channel count tag.

ErikvH
Applications Engineering
National Instruments
0 Kudos
Message 3 of 5
(2,669 Views)
Thanks for your reply Erik.

I try to find out with the direct wires, but some how i'm doing something wrong i guess.

The VI what i placed i 1 channel of 5 what i use.
I'm using a CTR-502 to count the pulses from a liqiudflow sensor. The timer runs for 10 seconds and resets the counter, or is there a better solution to do this without reconfiguring the module. When you look at the hpc.iak you can see how the system is configured.

(btw i'm still learning with Labview, i had to start from scrap because some else was started with this project)

William
Running with Labview 6.1
Fieldpoint hardware
0 Kudos
Message 4 of 5
(2,669 Views)
Hi William,

For counting pulses you need to specify how long you want to count pulses. After that time expires, you read the count value from the counter and then reset the counter value back to zero. The counter will start counting right away from there on. To determine when you need to read the count value, you usually use a 1 kHz reference clock (internal in the device), and use one counter to let it count to a value you like (i.e. 1000 for 1 second), then output that 1 second pulse on one of the outputs and route (wire with real wire) it to a gate. You read the gate in software, and when it toggles, you read the counter. You know that exactly the time you specified has passed and you can divide the number of pulses by the amount of time.

A good example and how to configure this is on the developer zone:
example program counter
configuration information on developer zone
0 Kudos
Message 5 of 5
(2,669 Views)