solve this sequence a+a-b+b-a+a-c+c-

I believe his 'math looking' sequence is a statement of the actuation of cylinders. The letters identifying the cylinder and the '+' or '-' indicates the direction of actuation. But, as stated, we now await the first attempt at a solution before comment.
 
Here's a start. It is missing a few things that should be dealt with, but you've got to make the students squirm a little.


If (Sequence_Step = 0) AND (Transition_0_to_1 = True), Sequence_Step := 1
If (Sequence_Step = 1), A+ := True, Else A+ := False
If (Sequence_Step = 1) AND (Transition_1_to_2 = True), Sequence_Step := 2
If (Sequence_Step = 2), A- := True, Else A- := False
If (Sequence_Step = 2) AND (Transition_2_to_3 = True), Sequence_Step := 3
If (Sequence_Step = 3), B+ := True, Else B+ := False
If (Sequence_Step = 3) AND (Transition_3_to_4 = True), Sequence_Step := 4
If (Sequence_Step = 4), B- := True, Else B- := False
If (Sequence_Step = 4) AND (Transition_4_to_5 = True), Sequence_Step := 5
If (Sequence_Step = 5), C+ := True, Else C+ := False
If (Sequence_Step = 5) AND (Transition_5_to_6 = True), Sequence_Step := 6
If (Sequence_Step = 6), C- := True, Else C- := False
If (Sequence_Step = 6) AND (Transition_6_to_0 = True), Sequence_Step := 0
 

Similar Topics

We switched from a SLC5/04 to a 5069-L320ER, and the SLC's NI4's were replaced with the 5069-IY4, which is a pretty neat card; however, the IY4's...
Replies
3
Views
1,776
First time posting. I'm just a mechanical engineer trying to be a programmer so bear with me on some potentially stupid questions. I'm attempting...
Replies
4
Views
4,412
Hello, I'm creating a small application to operate a valve on an existing application between a CompactLogix and a FTView SE instance. I...
Replies
4
Views
1,497
Replies
49
Views
10,936
please help i didn't solve this problem with rslogix. I counted but i am not using timer. How i will fix this situation? Please anyone solve this...
Replies
18
Views
4,994
Back
Top Bottom