Previous Up Next

_openSIO
Required : scol v4.5

Create a new serial port communication. The function returns immediatly : the connection process is asynchronous.

SerialIO _openSIO (
Chn _channel_
S _port_name_
[I I I I] _communication_settings_
fun [SerialIO u0 S I] I _read_callback_
u0 _user_parameter_
)
Parameters

_channel_
any channel
_port_name_
"com1", "com2", "com3", "com4"
_communication_settings_
[baudRate parity byteSize stopBits]
_read_callback_
callback for data reading. [SerialIO_object user_parameter data size_of_data]
_user_parameter_
user parameter
Return value

new serial communication object. nil if an error occured (a bad parameter, bad settings...).
If no device is connected to the port given as the port parameter, nothing happens...