RMA
Member
The system I'm working on at the moment uses marker-based SFCs ala Step5. About half the time a check is made at the start of the Step (i.e. as the first instruction group in the network - each Step has its own NW) to see if the Step is active, if not the rest of the code in the Step is jumped over.
In one of these Steps I want to set a Marker Bit TRUE under certain conditions and check the Bit in another SFC later on. I decided to use code of the form:
A "Condition"
= M999.0
This is easier than using the "S"et command and also means I don't have to worry about where to "R"eset the Bit (I would normally do this in the "Wait" Step, right at the start of the SFC.)
Now, unless I'm having another of my dopy days, the fact that this code is only executed during the period where the Step concerned is active (probably only a single cycle under most circumstances), shouldn't be a problem, the Bit will remain Set or Cleared until the next time the Step becomes active (with the next production unit).
Everything is working fine but for some reason, I find I have a slightly queasy feeling about this solution. I know some people don't like using "S" & "R", but I'm not one of them, in fact I often prefer them, however, this case is an exception.
I'd be interested to hear which solution others would prefer to use in this situation and why.
In one of these Steps I want to set a Marker Bit TRUE under certain conditions and check the Bit in another SFC later on. I decided to use code of the form:
A "Condition"
= M999.0
This is easier than using the "S"et command and also means I don't have to worry about where to "R"eset the Bit (I would normally do this in the "Wait" Step, right at the start of the SFC.)
Now, unless I'm having another of my dopy days, the fact that this code is only executed during the period where the Step concerned is active (probably only a single cycle under most circumstances), shouldn't be a problem, the Bit will remain Set or Cleared until the next time the Step becomes active (with the next production unit).
Everything is working fine but for some reason, I find I have a slightly queasy feeling about this solution. I know some people don't like using "S" & "R", but I'm not one of them, in fact I often prefer them, however, this case is an exception.
I'd be interested to hear which solution others would prefer to use in this situation and why.