Using pointers in GX IEC Developer

cmulder

Member
Join Date
Nov 2002
Posts
14
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
 
Hi cmulder,

Perhaps you may want to consider those two additional access levels :
- When handling one element : initialize your FB by copying your DUT var in some one-dimensional array
- When handling multiple elements and indexing both var and data units in the var : why not immediately build some two-dimensional array used as a common recipient for all your values ?

Regards
Laurent
 
Peter,
you're right, as I've found after carefully reading the manual (RTFM, right!!!). In the user manual of the QnA-series pointers are mentioned. However, the pointers discussed there are not pointers as used in for instance C++. My mistake...

Laurent,
I understand the first option you supplied. However with my limited knowledge of the English language I can't really understand the second option.

The reason I'm using DUT's is because my dear colleagues have set up a company standard with Siemens Step7, thus using UDT's and DB's. Now I'm trying to "copy" this standard to Mitsubishi. Of course I'm aware that I can't copy everything, but I want to try to keep to this standard as much as possible.

Regards,
Caspar
 

Similar Topics

Hello gents, I've worked with Siemens CPU's for a long time and had the opportunity to play with HMI's on WinCC and TIA Portal and thought how...
Replies
4
Views
3,075
I have a 06 AD PLC and I need to add values which are greater than 9,999, so I’m using 60 double words starting at V4000. I did the code using the...
Replies
6
Views
1,873
Hello, I'm new with siemens step 7 (PLC : S7 300) and i have a question about using pointers. I have created a 5 DW shift register for an...
Replies
5
Views
4,587
Hi, I'm trying to use the IO Device Library (Product Versions) which is configured to work with the 1756-EN4TR & 1756-EN2TR but my system uses...
Replies
0
Views
40
Hello, As part of our project, we are using an M241 controller. This controller interfaces with an industrial computer and a router via a switch...
Replies
2
Views
74
Back
Top Bottom