Sign in to follow this  
Followers 0
viman

Overcoming 'STRING type or an Input Output variable is not supported'

2 posts in this topic

I get the input of an encoder and do operations based on that, for at least twenty object 'slots' at once. Program is on ladder since client needs to be able to modify it at will, but I'm using structured text functions to handle all the messy operations, since every object has properties and data, and up to twenty can be running in real time. This is a CP1L.

Instead of instancing those function blocks twenty times each, I keep a single instance of them one running all the time, and output TRUE when one of those objects raises a valid comparison. In essence those FBs compare each objects' relative position to the encoder against defined points.

The picture is an example of the functionality I'm needing. When one object completes the FB task, one of its flags turns ON so that it can't be used anymore. The issue is that without an input/output ST variable, this flag stays ON no matter what, and I need to reset it from outside so the cycle can begin again. The inner FB bit linked to this output stays ON since nothing inside of it makes it change. That's why I need an input/output variable. In the picture the timer would reset the bit - until the FB turns it on again - but I can't do this in this controller.

Is there an elegant way to make this work? I know I could use the rising edge of the output to turn some other bit ON but that's the kind of thing I want to avoid.

Sin título.png

 

Edited by viman

Share this post


Link to post
Share on other sites

I figured it out. Following the previous example... I added an input that acts like a proxy to this property that I could not change. This input turns the output to FALSE when I'm done with it.

Sin título2.png

Edited by viman

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