ARD (ASCII read)
The ARD instruction reads ASCII characters from the input buffer and stores them into a string.
Languages supported: Function block diagram, ladder diagram, structured text.
This instruction applies to the L20E, L50E, and L70E controllers.
Operation details:
- The ARD instruction runs until all of the characters in the ASCII buffer are received. If another ASCII instruction is executed, it is queued until ARD is finished.
- To cancel the ARD instruction, execute an ACL instruction.
- To prevent the ARD instruction delaying the ASCII queue while it waits for the required number of characters, use the results of an ACB instruction to trigger the ARD instruction.
- Status of the instruction can be extracted from the control bit of the instruction instance (for example, ARD_1.controlbit). This shows if the instruction is blocking the ASCII instruction queue waiting for more characters:
- 7th bit = Instruction is enabled.
- 6th bit = Instruction is in the queue.
- 5th bit = Instruction is done.
- 3rd bit = Instruction has an error.
ARD

Parameter | Parameter Type | Data Type | Description |
---|---|---|---|
IN | Input | BOOL | Rung input state.
|
ARDInput | Input | Read characters from the buffer. The maximum is 82. Use the ARDARL data type to define the Channel, Length, and Cancel parameters for the ARDInput. | |
Q | Output | BOOL | Indicates when the buffer read is ongoing or complete. Outputs of this instruction are updated asynchronously from the program scan. Output Q cannot be used to re-trigger the instruction because IN is edge triggered.
|
Destination | Output | ASCIILOCADDR | The string element where the characters are stored. |
NumChar | Output | UINT | The number of characters. |
Error | Output | BOOL | Indicates the existence of an error condition.
|
ErrorID | Output | UINT | A unique numeric that identifies the error. The errors for this instruction are defined in ABL error codes. |
Error code | Error description |
---|---|
03 | Transmission cannot be completed because the Clear-to-Send signal was lost. |
06 | Illegal parameter was detected. |
07 | Cannot complete ASCII send or receive because channel configuration has been shut down using the channel configuration dialog. |
08 | Cannot complete ASCII Write due to an ASCII transmission already in progress. |
09 | ASCII communication requested is not supported by current channel configuration. |
10 | The Cancel was set, stopping instruction execution. No action required. |
14 | The ACL function block was canceled. |
16 | Serial port is not supporting RTS or CTS control lines. |
ARD examples
ARD function block diagram example

ARD ladder diagram program example

ARD structured text example

Provide Feedback