06-20-2011 07:46 AM
Is the initilization step going to be hard coded or do you want the ability to change it like you do for the profile step?
06-20-2011 07:49 AM
The ability for the user to change it would be best
06-20-2011 08:19 AM
I added an arrayed state machine to your code. I only added everything for the top loop so that you can get understand what it will take to do what you want. I will answer as many questions as I can.
06-21-2011 03:36 AM
I can't seem to get the initialize state to work, i am not sure what i am doing wrong. I have modified the VI only slightly to include the other loops.
The exit button stops the vi at the point in which the sequence has reached, is it easy to code the exit button to turn off all digital outputs?
I have tried to link the exit button from the 3 modules using a local varibale but i am not sure how to integrate them into the single button.
The stop buttons in the main states restart the sequence from the first step rather than stopping the sequence at a point it has reached. Is it possible to use the stop button in this fashion to pause the loop?
Cheers
Ol
06-21-2011 03:47 AM
@ucbeoha wrote:
I can't seem to get the initialize state to work, i am not sure what i am doing wrong. I have modified the VI only slightly to include the other loops.
Do you get it to work in any loop? If you turn on the light bulb or insert a breakpoint or probe a line on the inialize do you see that the code is exicuting?
The exit button stops the vi at the point in which the sequence has reached, is it easy to code the exit button to turn off all digital outputs? I have tried to link the exit button from the 3 modules using a local varibale but i am not sure how to integrate them into the single button.
I made the change so that they all exit when the exit button is pushed. All you have to do it tie each event structure to the exit button. You can make all three loops react to and button on the front panel.
The stop buttons in the main states restart the sequence from the first step rather than stopping the sequence at a point it has reached. Is it possible to use the stop button in this fashion to pause the loop?
If you want it to pause and restart then you are going to have to keep up with what step it stopped in so that you can change the step index on the shift register. You could also use a dialog to prompt the user to tell what step to restart in.
Cheers
Ol
06-21-2011 03:47 AM
Here is the code.
06-21-2011 03:59 AM
I looked through the code. The wrong control was tied to the initialize button. The profile array and the button were both named initialize and the number. I changed the name of the initialize array to initialize profile and number so this does not happen again.
06-22-2011 02:56 AM
Thats brilliant, thank you for all of your time.
I will try and get the stop buttons working in a pausing fashion, and code the exit button to switch all the digital outputs off but that should be it!
Thank you again.
06-22-2011 06:34 AM
I already changed the exit button so it should work.
06-24-2011 10:29 AM
Yes, but i was also trying to write it so that the exit button cut power to all valves rather than halting the sequence in its current state.
i figured this would required another case in the state machine to turn all power off which would be linked to the exit button.