03-29-2020 08:43 AM
Hi guys,
Im trying to measure the time between two limits, I want to measure the time it takes for a strain value to go from, say 10 to 3.(FYI Im very new to labview and don't quite follow the terminology.)
Thanks
03-29-2020 09:43 AM
Hi Rory,
It sounds like your problem consists of the following steps (possibly in a different order):
Does that sound possible?
Maybe you can let us know if you've done any of this already, or what hardware you're using, or any other questions you have on specific details.
03-29-2020 11:26 AM - edited 03-29-2020 11:44 AM
so due to the current situation in the world i cant get my hands on the equipment, so instead im just using a slider. i want to demonstrate how to detect, when the measured time between the limits is greater than 10 seconds.
my idea is to have a clock running in the background and when the strain reads 10, take a record of it, and when the strain reads 3 take a record, then minus one from the other and get the difference. if the difference is greater than 10 seconds get an led to light.
i just really poor at coding ive done a small bit of it before but cant remember much.
03-29-2020 12:21 PM
Ok, so your "virtual" description simplifies step 2 immensely - it becomes just "read the slider value".
Your description of the method sounds fine.
As to a clock running in the background, for the precision you're describing, I'd suggest something like Get Date/Time in Seconds.
You can use an Event Structure if you want to monitor the slider, but be aware that this probably won't map to hardware effectively.
If you're going to want to use the strain gauge later, I'd suggest writing some sort of VI (perhaps with a reference to the slider wired in) to "simulate" reading the voltage/force.
Then when you have the real gauge, you can replace the VI more easily.
This is a very simple "hardware abstraction layer" kind of approach.
03-29-2020 12:44 PM
so the limits wont change but the slider will be moving up and down between them, so i want to be able to have a clock running in the background and then record readings when the limits are reached and then calculate the time difference in between, as i said previously. but thinking of it now, i probably wont be using it with a strain gauge. its just a proof of concept idea and im substituting the slider for the physical gauge and the change in the gauge.
will the case structure automatically record the time when the limit is reached?
03-29-2020 03:45 PM
Hi Rory,
@RORY.c wrote:will the case structure automatically record the time when the limit is reached?
No, of course not! The case structure does comparisons, but not data storage...
You need to store timestamp data in shift registers!