SFC 20 shouldn't work like this - you have 32 bytes on one side and 640 bytes as destination. Actually it may work (as destination area is larger then source area) and copy to 1st array element, but it's clearly wrong program design. Do you need to copy your source string to some array element with predefined index?
In this case you may try to use P#DIX168.0 Byte 32 (to copy source string to Text[2] for example). I don't like this variant for some reasons, but it can be applicable.
If index of destination string is defined in run-time you would be forced to make ANY pointer in PLC program, with LAD it would be really ugly. In STL you can use L P## construction and code would look better. But easiest way is SCL, where you would just have
Text[i] := "SMS_Text".Stn_1_msg
Maybe i miss something in your task?
=== Edited by Aret @ 5/29/2012 10:04 AM [GMT ] ===
|