Stuck in a Case Twincat 3

Good Afternoon,

I've been fighting this for a while and I can't figure out why I am stuck in this case (see attached file). I had this working, by that I mean cycling through the different case statements, a month ago but my dumb self didn't make a backup of the code that cycled. I know it was slightly different because I found mistakes in it but I didn't think I changed it that much.
 

Attachments

you might want to put an else statement before each end_if and some debug info in each condition to give yourself a clue as to where it is cycling.....
 
I found the issue I was forcing Case 1 every cycle above the the initialization of the Case. I did what you suggested and realized that I wasn't stuck in this case but the case before it.
 
(*tmr_VibConv1ShiftBoardsDown (IN := tmr_VibratingConveyorsAtSpeed.Q AND xOUT_VibratingConveyor1_Run, pt := T#2100MS);
brackets ??
( fVibratingConveyor2Zone1BoardCount <= (fVibratingConveyor2Full/6)
brackets ??
 
be careful with the brackets ...depending on the compiler ...it can give some funny results..
....good practice to end else if with else...I'm guilty of this sin as well
 
Now that I have it cycling through the cases I'm cleaning everything up and trying to follow best practices. I was putting brackets everywhere because I have seen in TC3 that if you try to use LREAL as a logical statement without correct brackets it will reject that if statement. Thank you for your response on a Sunday, I wasn't expecting anything today to be honest.
 
yea....I just finished an awful job for Noord stream 2,,,so got some time
your welcome by the way
there were a few nick nacks in the code....but I assume its work in progress
 
Top