LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Digital Output Sequence (variable timing) NI 9472

Solved!
Go to solution

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?

Tim
GHSP
0 Kudos
Message 21 of 35
(1,452 Views)

The ability for the user to change it would be best

0 Kudos
Message 22 of 35
(1,450 Views)

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.

Tim
GHSP
0 Kudos
Message 23 of 35
(1,444 Views)

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

0 Kudos
Message 24 of 35
(1,434 Views)

 


@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


 

Tim
GHSP
0 Kudos
Message 25 of 35
(1,431 Views)
0 Kudos
Message 26 of 35
(1,430 Views)

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.

Tim
GHSP
0 Kudos
Message 27 of 35
(1,429 Views)

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.

0 Kudos
Message 28 of 35
(1,413 Views)

I already changed the exit button so it should work.

Tim
GHSP
0 Kudos
Message 29 of 35
(1,406 Views)

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.

0 Kudos
Message 30 of 35
(1,392 Views)