Wait for String (TCP)
Use this dialog box to configure your system to wait for an incoming command.
How to Use
- Select the device you want to receive a command from the Device Name drop-down list.
- Select whether you want to wait for a fixed number of bytes or a specified termination character or character set.
- If you selected Termination Character, enter the termination character or character set you want to signal the end of the command. Enable the Add Termination Character to Result String to add the selected Termination Character to the string result.
Tip Change the Display type to enter the termination character in hexadecimal or \ codes. - Type the number of milliseconds to wait for the command before timing out.
- Select the Pass condition for the step. If you want the inspection to pass only when a specific string is received, select String received before timeout matches, and enter the expected string. Also, enable the Inspection fails in case of error or timeout control located on the TCP I/O property page.
Tip You can use the following wildcard characters in the expected string:
Character Description %d match decimal integer %o match octal integer %x match hexadecimal integer %b match binary integer %e match scientific real number %f match floating-point real number %g match floating-point or scientific real number %% match a single % character - Type a comment about the command you expect to receive.
Control Descriptions
The following controls are found on the Wait for String dialog box.
Control Name | Description |
---|---|
Device Name | Name of the device from which you expect to receive a command. |
Wait For | Specifies how long the step waits for a command. The following options are available:
|
Timeout | Number of milliseconds to wait for the string before timing out.
For TCP slave devices, if a timeout occurs, the step returns the characters received before the timeout. For TCP master devices, if a timeout occurs, no characters are returned. |
Pass Inspection If | Specifies the Pass condition for the step. The following options are available:
|
Comment | Comment about the command you expect to receive. |