07-02-2009 07:27 PM
Hello,
I am programing a pneumatic system that has 6 valves, 2 digital inputs and I have to read 2 analog inputs for datalogging. I am using a sequencer but I need to only start a certain sequence when I get a pulsed digital input - photoeye. Within that sequence I need to wait a certain time interval before proceeding to next sequence. I am from the PLC world and latching a bit on until you want to unlatch it is very easy for some reason I am missing how to do this in L.V. This is a very common thing to do in machine control with ladder logic but I am not able to achieve this so far in L.V. Please see attached for a similar part of my code. This vi does not work as I can't reset it for next time through. Any ideas on a simple latch and being able to unlatch it at another time would be appreicaited.
Cheers!
John
07-02-2009 07:52 PM
Please attach your subVI.
What do you mean by "next time through"? It looks like your VI only runs once once the inner while loop has stopped.
07-03-2009 04:19 AM
John ,
Attach the dependent SubVI as well,
and if possible add more details to the query to
make it more clear.
Sundar.
07-03-2009 04:21 AM
Instead of using sequencing Use state transitions.
they are more effective and more deterministic.
Sundar.
07-03-2009 06:57 AM
Hello,
Sorry I forgot the subvi, see attached. If you run this the first time you need to press the simulated input button. But when you restart the vi again you don't have to see this input again it just runs. I want to have it automatically reset i.e. I want the input which in the real world is a photoeye which is just on momentarily, but I need the timer inside the case statement to complete timing. Hopefully this is enough info.
Thanks,
John