| The function BUFFER_To_STRING extracts a String from any array of Byte. The String is copied from any position START from the buffer and ends at the STOP position. The first element in the array is at position number 0. When called aPointer to the array and its size in bytes is passed to the function. Under CoDeSys the call reads |
BUFFER_TO_STRING (ADR (Array), SIZEOF (ARRAY), START, STOP), ARRAY is the name of the array. ADR() is a standard function which identifies the pointer to the array and SIZEOF() is a standard function, which determines the size of the array. The function returns the string copied from the buffer as STRING. This type of processing arrays is very efficient because no additional memory is required and no surrender values must be copied. Example: BUFFER_TO_STRING(ADR(Array), SIZEOF(ARRAY), START, STOP) |