Guest cmulder Posted December 10, 2003 Report Posted December 10, 2003 Hi all, The thing I'm trying to achieve is actually quite difficult to explain, but since there's no use posting this topic if I can't explain, I'll give it a go anyway... I have created a DUT ("DUTDigitalInput") consisting of 4 BOOL's. The DUT represents one digital input, with extra information that can be used to "overrule" the input via software, for instance during commissioning. In the GVL I have defined a number of digital inputs, each of the type DUTDigitalInput. Now I would like to create an FB where I can address each variable defined in the GVL one-by-one to check whether it has to be overruled or not. Of course I would prefer not to call them by name or even address. Instead I would like to input the startaddress and number of inputs in the FB, and internally in the FB I can then address the correct variable. My guess is I have to use pointers for this, but I do not really know how to create and use these in GX IEC Developer. Any help would be much appreciated. My apologies if it isn't exactly my explanation isn't exactly clear. I have tried to explain as good as possible. Thanks in advance, Caspar Quote
navillusi Posted December 13, 2003 Report Posted December 13, 2003 if your data types are all the same, you can use arrays, move your DUT defined variables into an array of the same dimension, this array can then be moved into your user defined function blocks as a single addressable element. Hope this answer matches your question! Quote
Guest cmulder Posted December 15, 2003 Report Posted December 15, 2003 That would be perfect. Thank you Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.