Transistor

FX5U error code 33E7 with STL RETSTL

6 posts in this topic

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.

61ba683ff2de4_FX5URETSTLerror.png.586fd2

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

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

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 by Ron_S

Share this post


Link to post
Share on other sites

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now