Sign in to follow this  
Followers 0
Andy_P

Using SETR(635) in an FB

3 posts in this topic

I'm trying to put together an FB that uses the SETR(635) instruction. The FB compiles if I directly enter the table number .i.e #0 into the instruction, but I would like to be able to pass this value in via an input parameter to the FB. Can't seem to manage this. Used Input, In/Out, Internal with setting an AT address. Always fails to compile with: ERROR: Operand 1 Memory area not valid. Is it not possible, or am I missing the point somewhere? (Most likely.) Thanks. Using CJ1M-CPU22 V4.0.

Share this post


Link to post
Share on other sites
The Table Number entry point has to be a constant for this instruction. You can see below when you enter the values into the instruction that the record number has many options (all memory areas): But the table number has only one option, a constant (#): This can be seen when you try to use this instruction in your regular ladder program and this limitation holds true when you put it inside a function block.

Share this post


Link to post
Share on other sites
Thanks Michael. I really should have seen that for myself!

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
Sign in to follow this  
Followers 0