06-27-2011 07:21 AM
That would be exactly be how to do it. Give it a try and see what you can do. If you can not figure it out then I will give you a hand.
06-28-2011 07:37 AM
I have written a new case for the exit button to stop digital outputs, but i dont know how to make sure it occurs before the final close commands.
I have also written new cases for 'pause' and 'continue' (after pause) but i haven't got them quite right.
The 'stop' case seems to be working fine.
I have also linked all of the initialize steps into 1 button. How can i set it up so that the main stages Auto-Start after 1 cycle of their initialize stage?
07-11-2011 04:39 AM
Looks like the stop button just halts the VI rather than cuts power to the digital outputs.
How can i code to stop power in the 'stop' and 'exit' event cases?
07-11-2011 07:45 AM
@ucbeoha wrote:
I have written a new case for the exit button to stop digital outputs, but i don't know how to make sure it occurs before the final close commands.
The way that I did the exit should already take care of this. If not then you will need to write to the digital channels to put them in the correct position prior to closing.
I have also written new cases for 'pause' and 'continue' (after pause) but i haven't got them quite right.
I added a shift register to pause and continue to the top loop. You will have to replicate it for the rest of the code. I am assuming that you do not want to do anything to the digital output if you pause the code. I also added a component on the continue that reset the time to keep up with the elapsed time properly.
The 'stop' case seems to be working fine.
I have also linked all of the initialize steps into 1 button. How can i set it up so that the main stages Auto-Start after 1 cycle of their initialize stage?
For this I added a "Start 1" Val(sgnl) property node to the initialize step. This will be just like pressing the start button. I am not sure if it will reset. The way I would take care of this if it were my code would be to move the start out of the event structure and make it a case then you could call it from any button or any where in your code.
07-18-2011 06:44 AM
Thanks for your help.
The pause and continue work great.
I couldn't get the Value signaling to work, but i got around it by using a controllable time delay for each module.
I also created a case to turn off all DOs to run before exiting the VI.
Thanks again for your help