This command sends a string to the serial port TXD/RXD.
The first input parameter string is a Python string to send to the serial port USIF0.
The second input parameter <timeout> is optional, is only available from version 12.00.xx4, version 13.00.xx5 and version 18.11.004, is a Python integer, measured in 1/10s, and is only used when flow control is enabled. In fact it represents the maximum time to wait for the string to be sent to the serial port USIF0 when buffer is full and flow control blocks further data. The timeout range is (0 ÷ 32767).
This method returns immediately after the string has been sent to the serial port USIF0 or, when flow control is enabled, after the timeout period if the whole string could not be sent to the serial port USIF0. The return value is a Python integer which is -1 if the timeout period has expired, 1 otherwise.
Example:
a = SER.send('test')
sends the string 'test' to the serial port USIF0 handling, assigning the return value to a.
|
|
Note: The buffer available for the SER.send command is 4096 bytes. |