Indexing with GX IEC Developer

deeside

Member
Join Date
Jul 2004
Posts
11
Hi,

I am programming a function block in IEC developer and I need to use indexing within the block. Is there any way to carry out this using local variables only?

Regards,

deeside
 
i dont know of a way to do indexing using only local variables.

but if you are worried about overwiting your indexregisters you can always save them to temp variables in the beginning of the block and at the end of the block you write the temp values back to the index registers.

hope this helps

Greetz,

marsupilami
 
Thanks marsupilami,

I thought that was the case. I have been trying to tackle the problem differently by using the INDEX_M and OUTEX_M functions but I am getting strange results. INDEX_M seems to work fine if I address a D register as follows:

__________
| INDEX_M |
INWORDVAR=2000---|Offset |----OUTWORDVAR
0---|Gain |
DO---|Opd |
|_________|

Where OUTWORDVAR returns the contents of D2000 (great)

However if I try for an X register as follows:

__________
| INDEX_M |
INWORDVAR=16#1000---|Offset |----OUTBOOL
0---|Gain |
XO---|Opd |
|_________|

It does not return the value of X1000 in OUTBOOL but if I use a constant for the offset instead of passing a variable it works!!!

I am confused!! Any ideas

Cheers,

Dave (deeside)
 
Last edited:
i have used those instructions before with variables as input, at least variables for the offset not for the gain.

the only thing that i can think of is that your constant is hexadecimal 16#1000 and your variable might be decimal 10#1000

hope this helps,

Marsupilami
 

Similar Topics

Hi! I´m having some troubles when trying to make index of Z-Registers. I have a Q03UDE CPU with a Q2MEM extra memory card and for the application...
Replies
2
Views
2,115
Hello, I'm in the process of converting a slicer from an Ultra3000 drive to a Kinetix 5100 using the KNX software version 4.00. The current...
Replies
0
Views
537
Hello! The equipment I'm working on uses a lot of indexed tags I guess you'd call them. I thought it was indirect addresses maybe but all the...
Replies
9
Views
1,061
Hello, Please see the attached rungs of some sort of indexed sampling routine that is currently in a SLC500. I am tasked with migrating to a...
Replies
2
Views
1,292
Hi everyone. Been banging my head against a wall trying to figure out tracking on a servo driven conveyor. I already have a tracking array setup...
Replies
12
Views
3,419
Back
Top Bottom