Hello,
I use a function block with a variable Pointer to Byte (I don't the choice).
I must have an array of 18 words to write in this pointer variable. I don't know how to do. I would like to write the values in one time.
Someone can help me please ?
Thanks in advance.
Pascal.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Maybe you could use the "CAA Memory" library for this. This library contains a function MemMove.
Here you can specify the pointer to memory of your source and target and set the number of bytes to "move".
To get the pointer to your array of 18 Words, use ADR(nameOfYourArray) to get the pointer to it's memory location.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for your answer.
I don't find this library. I had search on the net but I don't find the file.
I found informations about that but not the library to import on Codesys.
Can you help me ?
Thanks for your help.
Pascal.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
go to the library manager of your project
click on Add Library (top left corner)
type in CAA Memory
- you will see it in the list. If not, and you don't have the latest version, maybe you have to select Advanced first.
then double click it to add it to the library manager of your project.
Then you can use the functions from it in your project.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I use a function block with a variable Pointer to Byte (I don't the choice).
I must have an array of 18 words to write in this pointer variable. I don't know how to do. I would like to write the values in one time.
Someone can help me please ?
Thanks in advance.
Pascal.
Maybe you could use the "CAA Memory" library for this. This library contains a function MemMove.
Here you can specify the pointer to memory of your source and target and set the number of bytes to "move".
To get the pointer to your array of 18 Words, use ADR(nameOfYourArray) to get the pointer to it's memory location.
Hello TimvH,
Thanks for your answer.
I don't find this library. I had search on the net but I don't find the file.
I found informations about that but not the library to import on Codesys.
Can you help me ?
Thanks for your help.
Pascal.
go to the library manager of your project
click on Add Library (top left corner)
type in CAA Memory
- you will see it in the list. If not, and you don't have the latest version, maybe you have to select Advanced first.
then double click it to add it to the library manager of your project.
Then you can use the functions from it in your project.
Hello TimvH,
That's works, it's perfect !
Many thanks.
Pascal.