In this example, the CIN concatenates two strings and uses an input-output terminal. The top left terminal of the CIN takes in the first string as an input parameter to the CIN. The top right terminal of the CIN returns the result of the concatenation. This example shows only the block diagram and the code.
Complete the following steps to create the CIN.
![]() |
Note LabVIEW must be installed on the computer you use to create the CIN. |

In this example, CINRun is the only routine that performs substantial operations. CINRun concatenates the contents of strh2 to the end of strh1, with the resulting string stored in strh1. Before performing the concatenation, NumericArrayResize resizes strh1 to hold the additional data.
If NumericArrayResize fails, it returns a nonzero value of type MgErr. In this example, NumericArrayResize could fail if LabVIEW does not have enough memory to resize the string. Returning the error code gives LabVIEW a chance to handle the error. If CINRun reports an error, LabVIEW aborts the calling VIs. Aborting the VIs might free up enough memory so LabVIEW can continue running.
After resizing the string handle, MoveBlock copies the second string to the end of the first string. MoveBlock is a support manager routine that moves blocks of data. Finally, this example sets the size of the first string to the length of the string.
Refer to the Concatenate strings VI in the labview\examples\cins\lstrcat directory for an example of creating a CIN that concatenates strings.