LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Best way to measure time?

I am sorry for my react, but i hate answers, which doesnt give answer...

So, i tried your advice, but why elapsed time is giving different time than "numeric"-time ?
I'm doing this program for injection moulding machine, and I'm measuring different things like:
Pressure, movement of linear sensor, temperature etc.
I also measure times like: Injection time, postpressure time, dosage time, cooling time.

User starts program pressing start, then program asks which defines change from injection to postpressure.
Injection starts when Injection signal(digital input) goes up, postpressure stops when injection signal goes down.
So there is 3 choices to define change, distance travelled, value of the pressure ( down or up), or time.
Program should then wait for injection signal.
Now it must be able to run like 50 times with same values.

thank you
0 Kudos
Message 11 of 16
(1,670 Views)
Hi Jani,

You said
"
..., but why elapsed time is giving different time than "numeric"-time ?"

The code demonstrates the answer you posted, ie how to measure the elapsed time. The code that executes between the first millisecond timer call and the next has indeterminism due to FP object reads and the nature of the "wait until next millisecond" calls.

You went on to say,
"
I'm doing this program for injection moulding machine, and I'm measuring different things like:
Pressure, movement of linear sensor, temperature etc.
I also measure times like: Injection time, postpressure time, dosage time, cooling time.
"

I could encourage you to take a look at some of the examples that can be found under

Help >>> Find Examples >>> Browse >>> Hardware Input and Output >>> DAQmx >>> Analog measurements >>> Position

or some of the other examples in that area for something that will get you started.

If you just want to measure the period of time a logic signal is asserted, look under the digital examples.

I said "I could" because of three reasons.

1) Before this injection molding game is over someone always asks for the area under the curve.

2) I think I heard you say you wanted monitor more than one process.

3) I guess you will want to know the repeatability of a process.

I will also go on to guess that we can not say the that the indiviual processes are syncronized with each other.

If this is the case we should start by talking about the architecture of this application.
If NOT then take a look at the examples in the area I cited above.

Still trying to help,

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 12 of 16
(1,662 Views)
This example may help out down the road (LV 6.1)

There two top level VI's in this demo.

"Storage_Scope.vi" is just a basic demo of a storage O'scope.

"Storage_Scope_Simulate_error.vi" uses the above idea to demo its use in in an injection molding process. It simulates errors and allows the screen to be frozen when an anomoly is noted.

Hopefully someone will find these examples interesting.


Comments or suggestions are welcome!

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 13 of 16
(1,637 Views)
Just for fun...

Try to figure out how it was done before you look!

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 14 of 16
(1,634 Views)
Ben

I loved the look of the graph looking at your code always gives me something to strive for.
one day I will live labview but then again one I will die to.



Joe.
"NOTHING IS EVER EASY"
Message 15 of 16
(1,625 Views)
Thank you Joe,

I hope it helps "push the envelope".

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 16 of 16
(1,616 Views)