Posted 15 Dec 2021 I'm modifying an STL program I wrote some years ago. I need to split an STL sequence (to let the first part restart while the second part runs on). The original POU runs from STL S100 to STL S138 in steps of 2 and the STL sequence ends in a RETSTL instruction. The modified program ends at STL S134 with a RETSTL instruction followed by the new sequence which runs from STL S140 to STL S146 and ends with another RETSTL. This modification causes the PLC to fault with error code 33E7 - Program structure error. Can anyone explain what's causing the error and suggest a fix or workaround? Many thanks. Share this post Link to post Share on other sites
Posted 18 Dec 2021 You can only have 1 RET instruction. Your breakout stl must be within the first stl and the ret. Share this post Link to post Share on other sites
Posted 19 Dec 2021 (edited) And as an addition to my last post: The extra STL routine must be started by a normal coil ie not set. -----------(S140). Not [SET S140] OUT S140 not SET S140 Edited 19 Dec 2021 by Ron_S Share this post Link to post Share on other sites
Posted 20 Dec 2021 Thanks, Ron. Where can I read up on this? The document I've got is https://www.mitsubishifa.co.th/files/dl/jy997d55801j_FX5%20Programming(Instructions).pdf (jy997d55801j_.pdf). Chapter 9 is about the STL but there's no mention of STL breakout. 1. Can you think of any reason that the STL breakout would have to start with a normal coil rather than a SET? All the examples use SET. 2. Did you mean RETSTL rather than RET? Thanks. Share this post Link to post Share on other sites
Posted 21 Dec 2021 The STL is slightly explained in the IQ-F series manuals. Lot more detailed in the Fx3 series manuals. As i recall the only difference is it ends with [RET], not [RETSTL] Section 35.2 from here: https://www.allied-automation.com/wp-content/uploads/2015/02/MITSUBISHI_FX3GFX3U-Programming-Manual-%E2%80%93-Basic-Applied-Instructions-Edition.pdf Share this post Link to post Share on other sites
Posted 21 Dec 2021 I've never programmed an FX5 but done lots of STL sequences. So yes, RET will be the same as RETSTL You use OUT instead of SET for the breakout STL so that both routines can run within the RET or RETSTL instruction The OUT is only used to start the breakout STL routine - from there the same STL rules apply to the new sequence. Share this post Link to post Share on other sites