Final(?) thought.
If anyone familiar with LAD is having problems getting their head around logical operations and assignments in SCL, just read it in reverse. Take Jesper's small piece of LAD as an example -
Here the right-most element is the coil, Output. So that becomes the left-most element in our SCL statement -
Output := ...
And then you continue reading the LAD from right to left and building up the SCL statement accordingly -
Output := not Stop ...
Output := not Stop and (Start or Output);
Depends on how your brain's wired I suppose. Eventually you'll get used to thinking in both directions according to the application.
Regards
Ken
If anyone familiar with LAD is having problems getting their head around logical operations and assignments in SCL, just read it in reverse. Take Jesper's small piece of LAD as an example -
Start Stop output
--| |--------|/|-------( )
|
output |
--| |-----|
Here the right-most element is the coil, Output. So that becomes the left-most element in our SCL statement -
Output := ...
And then you continue reading the LAD from right to left and building up the SCL statement accordingly -
Output := not Stop ...
Output := not Stop and (Start or Output);
Depends on how your brain's wired I suppose. Eventually you'll get used to thinking in both directions according to the application.
Regards
Ken