|
|
Topic: P132 |
ASCII Out (AOUT) Instruction |
|
Icon / Button =
![]()
Send ASCII String data out of the Serial Ports of the CPU for the purpose of device control, data printing, or displaying data on simple operator interfaces.
|
Parameter |
Parameter Type |
Requirements |
Description |
|
Enable |
Ladder Input |
Must Have |
Edge-driven. When Enable transitions from OFF to ON, the instruction will operate for one scan. |
|
Serial Port |
Drop Down Selection |
Must Have |
The Serial Port from where ASCII data is sent. |
|
String |
String Tag / Constant |
Must Have |
The field that contains the String Tag or the String Constant that will be sent out the serial port. If using a String Constant, you MUST put quotes (" ") around the characters to be sent out the port. |
|
No Termination |
Selectable Option |
Must select No Termination, 1 Character or 2 Characters |
This option specifies that no trailing Characters will be sent out of the serial port with the data from the String field. |
|
1 Character |
Selectable Option |
This option specifies that the CPU will send out 1 Character that is specified in the Termination Code 1 0x field trailing the String field data. |
|
|
2 Characters |
Selectable Option |
This option specifies that the CPU will send out 2 Characters that are specified in the Termination Code 1 0x field and Termination Code 2 0x field trailing the String field data. |
|
|
Termination Code 1 0x |
Constant |
Must Have when selecting 1 or 2 Characters. |
Used to mark the end of a message. Must be configured using Hexadecimal format. When the Termination Code is sent, the CPU is signaling the end of the ASCII String. |
|
Termination Code 2 0x |
Constant |
Used in conjunction with Termination Code 1 to mark the end of a message. Must be configured using Hexadecimal format. When Termination Code 1 and Termination Code 2 are sent (consecutively), the CPU is signaling the end of the ASCII String. |
|
|
Byte Swap Option |
Selectable Option |
Must Have No Byte Swap, All Characters, or All But NULL Characters selected. |
No Byte Swap: No Bytes will be Swapped from the String field data when being sent out of the Serial Port. All Characters: Every Two Characters will be Swapped from the String field data when being sent out of the Serial Port. All But Null Characters: Every Two Characters except for Null Characters will be Swapped from the String field data when being sent out of the Serial Port. |
|
Convert 0x to NULL |
Constant |
Optional |
Some devices need a Space to be a 0x20 and others need a Space to be a 0x00. Spaces will always be stored as 0x20 in the Strings in the CPU. This option allows the 0x20 (or other character codes) to be converted to NULL before being sent out of the Serial Port. |
|
In Progress |
Boolean Tag |
Optional |
This bit turns ON when the Ladder Logic attempts to send the String data out of the Serial Port. This bit turns OFF once the data has been sent. |
|
Complete |
Boolean Tag |
Optional |
This bit turns ON once the String data has been successfully sent out the Serial Port. |
|
Use Structure |
Checkbox |
Optional |
Enables the use of Structures. |
Note: One of theSerial Ports must be configured for ASCII/Custom Protocol before configuring this instruction.
Note: Tag Values are updated immediately as each Ladder Rung is executed, top to bottom. However, Tag Values representing physical Outputs are only applied to the physical Output after the END statement of the last Task to be scanned is reached. Outputs in Remote Base Groups have additional limitations regarding Update Intervals.
When ASCII Out Instruction is selected the window shown below opens.
In this example, an Alarm Barcode String is transferred from the Communications Port of the CPU to a marquee display. The String is terminated with a carriage return (0x0D).