Barry Kirk
Lifetime Supporting Member
I'm in the process of converting a program over from Step 7 5.4 to Portal 13...
One of the instructions being used is the TRCV instruction which returns data into a memory block.
The data being received is going into a section of a data block which is configured as a string...
The actual parameter in the TRCV instruction where the data is returned to is
P#DB12.DBX2.0 BYTE 254
which is returning characters, which form a string into the string starting at byte two of the string.
The TRCV instruction also returns a length as a Word, into MW128, so now I have the length of the string...
What I would like to do is to move the length of the string into
P#DB12.DBB1 if that nomenclature makes any sense. I'm trying to set the length of the string to the length returned by the TRCV instruction. That way I can use the standard string manipulation functions in Portal to parse the string.
However, I'm getting all sorts of data mismatch type of errors.
How do I set the length of string?
One of the instructions being used is the TRCV instruction which returns data into a memory block.
The data being received is going into a section of a data block which is configured as a string...
The actual parameter in the TRCV instruction where the data is returned to is
P#DB12.DBX2.0 BYTE 254
which is returning characters, which form a string into the string starting at byte two of the string.
The TRCV instruction also returns a length as a Word, into MW128, so now I have the length of the string...
What I would like to do is to move the length of the string into
P#DB12.DBB1 if that nomenclature makes any sense. I'm trying to set the length of the string to the length returned by the TRCV instruction. That way I can use the standard string manipulation functions in Portal to parse the string.
However, I'm getting all sorts of data mismatch type of errors.
How do I set the length of string?
Last edited: