Wait for String (Serial)
Use this dialog box to configure your system to wait for an incoming command.
How to Use
- Select the port on whose line you want to receive a command from the Port drop-down list.
- Select whether you want to wait for a fixed number of bytes or a termination character.
- If you selected Termination Character, select the character you want to signal the end of the command from the drop-down list. Enable the Add Termination Character to Result String to add the selected Termination Character to the string result.
- 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 Serial 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 |
---|---|
Port | Name of the serial port 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. |
Pass Inspection If | Specifies the Pass condition for the step. The following options are available:
|
Comment | Comment about the command you expect to receive. |