RMA
Member
The following code snippet is part of a longer STL Network monitoring the press-fitting of a bearing. The error condition gets set if the timer times out.
In order to better understand what exactly is going on, I wanted to convert it to FB, which I'm more comfortable with for this sort of thing. However, try as I might, I can't get it to come up with an identical listing when I convert my FB version back to STL.
This was pretty well my nearest approach so far (I replaced the Timer with M1000.0 for test purposes):
When I convert it back to STL I got the following:
which is not quite right. Had the final "NOT" been after the second closing bracket, I might have accepted it as being equivalent, but not where it is.
If I try moving the negation to immediately before the assign command (=) in the FB instead of on the preceding &-input (which is where I reckon it ought to be), the the outer bracket pair disappears completely, which is also not quite right!
Would anybody like to have a go at producing an FB (or Ladder) version of the commands which translates exactly to the first version.
Code:
A "St1.5_DB Handling".N12
AN(
AN "ME_MW-1.5S05.01"
A(
A "ME_MW-1.5S05.02"
A "ME_MW-1.5S06.01"
O
A "ME_MW-1.5S05.04"
AN "ME_MW-1.5S06.01"
)
)
L S5T#4S
SD "T84" //Überwachungszeit, danach wird Teil NIO gesetzt
In order to better understand what exactly is going on, I wanted to convert it to FB, which I'm more comfortable with for this sort of thing. However, try as I might, I can't get it to come up with an identical listing when I convert my FB version back to STL.
This was pretty well my nearest approach so far (I replaced the Timer with M1000.0 for test purposes):
When I convert it back to STL I got the following:
Code:
A "St1.5_DB Handling".N12
AN "ME_MW-1.5S05.01"
A(
A(
A "ME_MW-1.5S05.02"
A "ME_MW-1.5S06.01"
O
A "ME_MW-1.5S05.04"
AN "ME_MW-1.5S06.01"
)
NOT
)
= M 1000.0
which is not quite right. Had the final "NOT" been after the second closing bracket, I might have accepted it as being equivalent, but not where it is.
If I try moving the negation to immediately before the assign command (=) in the FB instead of on the preceding &-input (which is where I reckon it ought to be), the the outer bracket pair disappears completely, which is also not quite right!
Would anybody like to have a go at producing an FB (or Ladder) version of the commands which translates exactly to the first version.