Functions | |
| enumports () | |
| Finds and enumerates ports on the PC. | |
| openport (port, baudrate, databits, parity, stopbits) | |
| Opens a serial port. | |
| closeport (port) | |
| Closes a serial port. | |
| showterm (port, width, height, chars) | |
| Shows a terminal window. | |
| hideterm (port) | |
| Hides a terminal window. | |
| receive (port) | |
| Get received data from a port. | |
| send (port, mydata) | |
| Send data to port. | |
| flush (port) | |
| Flush receive buffer. | |
| flush (port, char_no) | |
| Partially flush receive buffer. | |
| setrts (port) | |
| Set RTS signal. | |
| clearrts (port) | |
| Clear RTS signal. | |
| setdtr (port) | |
| Set DTR signal. | |
| cleardtr (port) | |
| Clear DTR signal. | |
| getcts (port) | |
| Returns CTS line state. | |
| getdsr (port) | |
| Returns DSR line state. | |
| getring (port) | |
| Returns RING line state. | |
| getrlsd (port) | |
| Returns RLSD line state. | |
|
|
Clear DTR signal. Puts in inactive state the DTR (data-terminal-ready) signal, that is, puts the RTS line of the port if open in logic 0 state (3...25 V).
|
|
|
Clear RTS signal. Puts in inactive state the RTS (request-to-send) signal, that is, puts the RTS line of the port if open in logic 0 state (3...25 V).
|
|
|
Closes a serial port.
Closes port, if open, and its terminal window.
closeport ("com3") |
|
|
Finds and enumerates ports on the PC.
Returns a string containing the names of serial ports available on server. There are shown only free ports. The format of the string is as follows (name space name space...):
Example: |
|
||||||||||||
|
Partially flush receive buffer.
Flushes only first char_no characters (bytes) of Easy Control's input buffer of the serial port.
|
|
|
Flush receive buffer.
Flushes Easy Control's input buffer of the serial port.
|
|
|
Returns CTS line state. Returns 1 if CTS line of the port (if open) is in active state (logic 1, -3...-25 V) or 0 if is in inactive state (logic 0, 3...25 V).
|
|
|
Returns DSR line state. Returns 1 if DSR line of the port (if open) is in active state (logic 1, -3...-25 V) or 0 if is in inactive state (logic 0, 3...25 V).
|
|
|
Returns RING line state. Returns 1 if RING line of the port (if open) is in active state (logic 1, -3...-25 V) or 0 if is in inactive state (logic 0, 3...25 V).
|
|
|
Returns RLSD line state. Returns 1 if RLSD (aka CD) line of the port (if open) is in active state (logic 1, -3...-25 V) or 0 if is in inactive state (logic 0, 3...25 V).
|
|
|
Hides a terminal window.
Hides terminal window of a port, if open.
|
|
||||||||||||||||||||||||
|
Opens a serial port.
Opens port with specified settings.
openport ("com3",33600,8,"n",1) |
|
|
Get received data from a port. Get received data from a port. The return value will contain all data received since port was opened or it was flushed. The call to the function must be done exactly when data is needed.
mydata=receive("com3") writelog (mydata) |
|
||||||||||||
|
Send data to port. Send data to a serial port, if open.
myport="com3" mydata="hello there" openport (myport,9600,8,"n",1) send (myport,mydata) |
|
|
Set DTR signal. Puts in active state the DTR (data-terminal-ready) signal, that is, puts the DTR line of the port if open in logic 1 state (-3...-25 V).
|
|
|
Set RTS signal. Puts in active state the RTS (request-to-send) signal, that is, puts the RTS line of the port if open in logic 1 state (-3...-25 V).
|
|
||||||||||||||||||||
|
Shows a terminal window.
Shows a terminal window for a serial port, if open.
|