08-18-2019 04:36 AM
Hi, everyone.
I ran into a problem and I would be happy to help , I built the module shown in Figure 1, the goal is to measure time on the exit of the Hall sensor
(ie whenever the voltage is large a certain value then approach a magnet sensor)
The timer in picture 1 works fine, but as soon as I connect the part of the sample the timer gets stuck on value 3.6 ... and does not move even though the value at the timer entry is FALSE (as seen in picture 2)
I would love if you could help me, how can I connect the modules to work as in fig 1
08-18-2019 09:57 AM
So, two issues:
The 3.6 is because your numeric indicator is too narrow on the front panel. So actually, if you make it wider, you'll see it says 3.64898e+9 (at least right now, probably it was a bit lower when you tried). This is the number of seconds since January 1st, 1904. See here for more details: LabVIEW Timestamp.
Second issue: Your code is much more complicated than it needs to be to do the operation you're trying to do. I'd strongly suggest taking some of the tutorials and looking through the learning materials at the top of this forum, but as a simple example, this will probably do what you want:
The image above is a snippet, you should be able to save it to your computer then drag and drop it into LabVIEW to recreate the code.
08-27-2019 10:52 AM
Hey
Thanks a lot for the help, the problem was that I needed my model to continuously calculate the engine RPM with the sensor.
In the end I managed to get by.
I have another small problem, how can I save the value created from the switch - case structre
I mean that I want to put were the red highlighted circule when the switch - case structre is false it will save some value (currently the value is saved)
And when the allowance is changed to true the value will not change.
After that this value should enter the graph that will show me the rotation speed as a function of the torque.
08-27-2019 10:53 AM
08-27-2019 01:53 PM
08-27-2019 03:45 PM - edited 08-27-2019 04:09 PM
@adadadadm wrote:Thanks a lot for the help, the problem was that I needed my model to continuously calculate the engine RPM with the sensor.
In the end I managed to get by.
I have another small problem, how can I save the value created from the switch - case structre
I mean that I want to put were the red highlighted circule when the switch - case structre is false it will save some value (currently the value is saved)
OK, please take a step back and not show us convoluted code that makes no sense (even though Gerd was able to somewhat clean it up :D).
Tell us what you want to do, not how you want to do it!
What is the VI supposed to do, exactly? You talk about calculating RPM, but none of your indicators is labeled RPM!
Shouldn't some of your shift registers be initialized? What's the point of the loop inside the sequence frame all the way to the left?
All loops stopping after one iteration serve no purpose (you use them to anchor shift registers, but these belong on the outer loop).
Assuming you simply want to measure the elapsed time between two successive true conditions on the comparison, you can do that with much lesscode.