Btw, the two instructions [BST GRT Station TotalStations NXB LES Station 1 BND] could be replaced by [LIM TotalStations Station 1]*, as long as TotalStations is greater than 1.
* or summat like that; LIM has special behavior when the first parameter is greater than the last parameter.
The limits are exclusive in that config. This means to use a LIM I have to create a value one larger than Total Stations to use as the upper limit. This adds another instruction so no real gain I can see.
Yes that is correct, 3 is "Pause" This number will increase to 50 or so as work progresses and stations are added.3* appears to not be a station, is that correct?
* actually (TotalStations+1)
So ...
If none of the .EnableStation bits are 1it's actuallyIs that correct?
- 1, 2, pause, 1, 2, pause, ...
- where "pause" is effectively equivalent to "3"
- there is no station 3 (= TotalStations+1), so while Station is 3, nothing should happen other than the timer running.
If enabled they would be included in the sequence. Otherwise skipped.If any of the .EnableStation bits are 1How should the behavior of Station change from the [no-.EnableStation bits = 1] case above?I agree with the others that your code, or something close to it, will do what you want, or at least what I think you want.
When the station N .EnableStation bit is 1 and Station is N, should that prevent Station from incrementing away from N?
I'm not above simplifying it, what did you have in mind.But I can't help thinking this code is more complicated than it needs to be for the desired behavior. There is "it works, I will move on" and "it works, but I want to be able to debug and/or modify it three months hence."
Did swapping the last two rungs appear to cause the pause, but not the repeat? Are you sure it was not repeating, with a minimal time (1-2 scans) between the end of one pause and the start of the next?
Y
Because of the speed I'm not sure what swapping the rungs did, It changed what it counted to, but still didn't present the entire sequence. In its present incantation they don't need to be swapped.
I'm not above simplifying it, what did you have in mind.
I can see the first point. Would require modifying 2 data points when the system count was increased. But that can be fixed with a CPT but that adds CPU cycles (not that those are at a premium here)
... I can see incrementing through a bit array to eliminate the rungs, but adding .enables to the array members would be more complex and maybe harder to follow?