By use of this function block of the ⇘ CAA_SerialCom.library data can be written on the COM port identified by its handle. The memory content, the pointer pBuffer refers to, should not be changed while writing. Neither the size of the memory structure containing the bytes to be sent nor the number of bytes to be sent will be checked!
If the stability of the pointer on the data structures and their contents cannot be ensured during an online change, the online change has to be prohibited by the function block with the help of functions which are part of the CAA.Application library.
Input:
xExecute |
BOOL |
see: ⇘ “CAA 指南” |
xAbort |
BOOL |
see: ⇘ “CAA 指南” |
udiTimeOut |
UDINT |
see: ⇘ “CAA 指南” |
hCom |
CAA.HANDLE |
Handle of COM port |
pBuffer |
CAA.PVOID |
Address, the data to be sent can be retrieved; this address can be determined employing the operator |
szSize |
CAA.SIZE |
Number of bytes to be written; can be determined by employing the operator |
Output:
xDone |
BOOL |
see: ⇘ “CAA 指南” |
xBusy |
BOOL |
see: ⇘ “CAA 指南” |
xError |
BOOL |
see: ⇘ “CAA 指南” |
eError |
COM.ERROR |
Error ID |