Hello,
I’m using MEMORY_COPY to copy 2 different strings into an array that is used by a ModBus TCP block (MB_TCP_FC16) to write the registers of a ModBus slave (an RUT240 Router) that make up the contents of an SMS. However when sending the text, the message is empty. The code is used like so:
OUT := MEMORY_COPY(SMS1 (* SRC *), 0 (* SRC_OFF *), DataToSend (* DST *), 21 (* DST_OFF *), LenSMS1 (* CNT *));
OUT2 := MEMORY_COPY(SMS2 (* SRC *), 0 (* SRC_OFF *), DataToSend (* DST *), LenSMS1+1 (* DST_OFF *), LenSMS2 (* CNT *));
Test SMS input:
'TESTSMS123'
Received SMS (empty): In the ‘WATCHES’ bar I can see that some of the words have empty values (00):


