diwa130
Member
Hello,
I have a couple of problems I am trying to solve.
1. how to use indirect addressing with variables of type T (timer) similarly to
all the other variables, Q, I, DB etc. More in detail , I can use I[bytenum, bitnum]
or DB1.DW[bytenumber] etc. How can I use something like T[x] ? On the manuals is written that it is possible but apparently is not. Any clues ?
2. similar question but related to DB, while it is possible to use
DB100.DW[byteindex] , I find hard to use the same approach with DB[number].
I know that is possible to use WORD_TO_BLOCK_DB(DB(number).DW0) but this not solving my problems. I have the following FB with multiple instances db as in the following:
FOR LOOP ....
FB501.DB501(....parameters ...
END_FOR
and I would like to use something like that:
FOR LOOP .... with j increments ...
FB501.DB[j](....parameters ...
END_FOR
Thank You,
diwa130
I have a couple of problems I am trying to solve.
1. how to use indirect addressing with variables of type T (timer) similarly to
all the other variables, Q, I, DB etc. More in detail , I can use I[bytenum, bitnum]
or DB1.DW[bytenumber] etc. How can I use something like T[x] ? On the manuals is written that it is possible but apparently is not. Any clues ?
2. similar question but related to DB, while it is possible to use
DB100.DW[byteindex] , I find hard to use the same approach with DB[number].
I know that is possible to use WORD_TO_BLOCK_DB(DB(number).DW0) but this not solving my problems. I have the following FB with multiple instances db as in the following:
FOR LOOP ....
FB501.DB501(....parameters ...
END_FOR
and I would like to use something like that:
FOR LOOP .... with j increments ...
FB501.DB[j](....parameters ...
END_FOR
Thank You,
diwa130