03-24-2008 09:17 AM
guys, thanks for your aasistance with this.
What Jeff has said is true of my set up. However, when the valve is fully open, it should remain in this state until a button to fully close it is pressed or a button to perform a partial stroke is pressed.
When the partial stroke is pressed, the valve should leave the open state, hit the partial limit switch, and return to open position.
03-24-2008 09:43 AM
03-24-2008 09:57 AM
Jeff,
the problem I am having is that when I ask the valve to do a full closure from the open position, the solenoid re-energises when the partial limit switch sensor goes high as the valve moves towards the closed position. I think this is because the event structure is looking for the partial limit switch value going high all the time.
I think you understand what I am trying to say, but to clear things up, the basic operations I want to perform are as follows.
1. Closed to Open. (Switch 1 High)
2. Open to Closed. (switch 1 Low)
3, Open to Partial to Open (Switch 2)
03-24-2008 10:37 AM - edited 03-24-2008 10:40 AM


03-24-2008 10:59 AM
03-24-2008 11:06 AM
03-24-2008 11:29 AM - edited 03-24-2008 11:31 AM
Only the timeout case is executed every 100 ms (unless one of the button press events occurs). The timeout case is there to determine if the valve has traveled far enough, and if it has, to energize the solenoid and end the partial or full cycle. If the timeout case is executing when a button is pressed, the button press event is queued and executes immediately after the timeout event. After the timeout event executes, the event structure waits 100ms for any other user event, and if none occurs, executes the timeout event again. In this situation, the user events (the button value changes) will deenergize the solenoid and then the timeout events will determine when to reenergize the solenoid and finish that particular valve cycle.
lmtis wrote:
Maybe I'm missing something. It looks to me like this VI will perform the current selection every 100ms (now that the enum is inside the loop), and the only time pressing the actuate switch will actually do anything is if it is pressed less than 100ms after changing the enum value.
The only code to deenergize the solenoid should be inside the button value change events. I posted the examples I did as architecture examples, so none of them may do what you want in a "plug-and-play" method, but they should be easily adaptable to your needs. That said, it sounds like you still have deenergizing code in your timeout case.
JohnnyBoyHendo wrote:
another problem I have experienced is that when the solenoid re-energises after the partial limit switch has gone high, it de-energises when the valve moves away from the partial switch. It will then re-energise as the valve will again start to close, and so on...
03-24-2008 11:50 AM
03-25-2008 04:07 AM
Jeff, Thank you. I am now getting somewhere.
I have modified your example, and when I run the VI with execution highlighting, it works perfectly. However when I switch this off, it is not working. I think it may be missing front panel events? Any suggestions. Ammended VI is attached.
03-25-2008 06:14 AM