Posted 24 Sep 2019 (edited) I'm trying to use a tag as an array index in FBD in Studio 5000, this works without issue in ST and LDD, but seems to not be allowed in function block. This seems incredibly short sighted to me which leads me to believe I must be doing something wrong. Is this possible? and if not is there a better way to accomplish what I'm trying to do? Attached are two screenshots, one of my problem with the exact error and one with a (hopefully) temporary workaround that I'm using currently. Thanks. Edited 24 Sep 2019 by ceckert Share this post Link to post Share on other sites
Posted 25 Sep 2019 Looking at the MOV instruction, it appears your tag is a REAL. The MVMT instruction requires a DINT for the Dest. What are you trying to do? Share this post Link to post Share on other sites
Posted 25 Sep 2019 (edited) Wow that was stupid. Somehow I didn't notice that you could only move DINT with MVMT. Seems ... limiting. How can I move a REAL conditionally with fbd? Also, regardless of that, the error message i am getting has nothing to do with that strangely enough, it could just be poor error checking, but it literally says that Language element can not refer to a variable array index. which, again, seems very strange to me. Edited 25 Sep 2019 by ceckert Share this post Link to post Share on other sites