TestIT:Programming Serial
Jump to navigation
Jump to search
5.3.11 Serial
RS232
Description:
It will execute serial device.
Code example:
Serial.RS232(Port1,_ST01,_ST02,10,S,TimeoutActive)
| Parameters | ||
|---|---|---|
| Parameter | Type | Description |
| Device name | String or String symbol | The device name |
| Send | String or String symbol | Text to send |
| Received | String or String symbol | Text received from COM port |
| Timeout | Int or Int symbol | Time before the communication times out |
| Time unit | String | Select the time unit, from the list |
| Timeout active | Bool symbol | True if timeout active |
RS232ADV
Description:
It will execute serial advanced device.
Code example:
Serial.RS232ADV(Serial,1,"!R",_ST01,10,S,TimeoutActive,_IN01,S,_B01,AlwOFF)
| Parameters | ||
|---|---|---|
| Parameter | Type | Description |
| Device name | String or String symbol | The device name |
| CriteriaType | Int | Select if any criteria. 0: None, 1: Begins with, 2: Contains |
| Criteria | String or String symbol | The value to test against |
| Received | String or String symbol | Text received from COM port |
| Timeout | Int or Int symbol | Time before the communication times out |
| Time unit | String | Select the time unit, from the list |
| Timeout active | Bool symbol | True if timeout active |
| Time active | Int or Int symbol | Time before receiving |
| Time unit | String | Select the time unit, from the list |
| Active | Bool symbol | Symbol to hold active value |
| Keep alive | Bool symbol | Keep connection open |