02-07-2013 10:03 AM
I have a scavenge pump that is not continously rotating so the voltage pulses are random. As I have it now, I am taking the difference dX of the pulse and comparing it to a value inputted. This works, but occasionally it does not work resulting in oil all over the place. I was hoping that someone could shed some light on an easier more reliable way of computiong this. I have attached the section of code pertaining to this. Thanks in advance.
02-09-2013 11:59 AM
Hi tavwtby:
My first advice is to (as possible) post a screenshot of your code (not the VI), in this way is faster for the community to see your code and if someone has an older version of LV they will be able to see it too.
About your question, I'm not quite sure about what your question is, could you explain a little bit what are yoiu trying to achieve? Are you doing a control loop? What hardware from National Instruments are you using, are you doing some kind of acquisition? You will need to sort out your code, because it doesn't follow any order so it's pretty hard to read it.
Diego
02-09-2013 05:51 PM
Most often, I see the experts here ask for the VI so they can see what is happening, and modify it instead of creating it from scratch. Posting a snippet is usually better than a screenshot. As for the alarm, use the booleans to trigger it. Or are you saying that the booleans don't change when they're supposed to?
@Diego_Sanchez wrote:
... post a screenshot of your code (not the VI) ...
02-09-2013 08:36 PM
yeah, I added the VI section because there are properties in the express VI that are important to the outcome. That bein said, I have a flow meter that does not flow continously. It intermittently sends out a 3.6 volt pulse that I measure with the analog in DAQ. Like I said, it works, but I believe there is a different, better way of doing this. I did not write this code by the way. So what the code is trying to do is to take a difference in time form one pulse to the next, if it is greater than the number entered, it should trigger the boolean, thus shutting the rig down, hope I made that a bit clearer.
02-09-2013 09:44 PM
There must be a loop somewhere that reads data. In that loop, could you start a timer when the value goes above 3.6V, and reset the timer if the voltage goes back down?
Playing with the express code you posted, it appears a constant input voltage would trigger the boolean.