sapoleon
Member
Hi,
I'm having a hard time trying to learn very fast how to do the things in Step 7. I see a lot of options, but I don't have now the time to try them.
I made a function not nice, to get and write data to a DB made of 30 UDTs of the same type. The thing is, I someone can give me a tip on how to do it with pointers.
The UDT1 consist of 2 INT and a DINT.
The DB305 consist of 30 UDT1. (named wagon01 to wagon30).
This makes me a nice database, where the first colum (first INT of the UDT) almost never change,and I have to write a value to the second and third colums.
I get allways which of the 30 lines I have to change, and what's the data to write.
My question is how do I know the correct position of the UDT and in the UDT where the data is to be taken of or writen to with a pointer?
(I made a very ugly function where I access a line according to a comparsison, that is to say, if the #lineNumber == 5, I write in this line, if now keep asking) I don't want even to post it....
Thanks
ps: btw, I AM reading the posts, and siemens support, and trying to make it by myself...
I'm having a hard time trying to learn very fast how to do the things in Step 7. I see a lot of options, but I don't have now the time to try them.
I made a function not nice, to get and write data to a DB made of 30 UDTs of the same type. The thing is, I someone can give me a tip on how to do it with pointers.
The UDT1 consist of 2 INT and a DINT.
The DB305 consist of 30 UDT1. (named wagon01 to wagon30).
This makes me a nice database, where the first colum (first INT of the UDT) almost never change,and I have to write a value to the second and third colums.
I get allways which of the 30 lines I have to change, and what's the data to write.
My question is how do I know the correct position of the UDT and in the UDT where the data is to be taken of or writen to with a pointer?
(I made a very ugly function where I access a line according to a comparsison, that is to say, if the #lineNumber == 5, I write in this line, if now keep asking) I don't want even to post it....
Thanks
ps: btw, I AM reading the posts, and siemens support, and trying to make it by myself...