The table below lists functions and subroutines frequently used for controlling I/O devices. For more detailed information about each function, please refer to the Functions for Communication section in Appendix 1. Please note that functions return a value, while subroutines do not.
Function | OpenPort(PortNo., BaudRate, Parity, Data Bit, Stop Bit) | Opens the serial port. |
Function | ClosePort(PortNo.) | Closes the serial port. |
Function | SendByte(PortNo., Data) | Sends byte data with the selected port. |
Function | SendString(PortNo., Data) | Sends string data with the selected port. |
Function | ReceiveByte(PortNo., Data) | Receives data with the selected port. |
Function | GetCommStatus(“DeviceName”, “StationName”) | Checks the selected station’s communication status. |
Subroutine | EnableDriver(“DeviceName”, “StationName”, Enable/Disable) | Controls the selected station’s communication. |
...
To configure Xpanel as a data bridge between devices, see the Data Bridge chapter.
So To send and receive contiguous blocks of data to/from I/O devices, see the Recipe chapter.