serial
Usage
>> link serial [ baudrate | mode | availablemodes | availablebaudrates]
Security
Unsafe - no modifications while the instrument is enabled.
Description
This command can be used to either report or set the parameters which apply to the serial link. The command can be issued over either the USB or serial links, but care must obviously be taken if the serial link is used to change its own operating parameters. In this case, new settings are acknowledged while the old parameters are still in force, then the changes are applied. The next command sent must use the new configuration of the link if the logger is to recognize it.
Modifications to parameters may not be made while logging is enabled; this is to avoid disturbing any real-time data output.
The individual parameters are described below.
baudrate [= <baudrate>]: baudrate of the serial link.
mode [= <mode>]: this parameter allows the electrical interface standard used for the serial link to be changed, the available choices being listed below. Different modes typically require differences in hardware, so changing modes may not always be appropriate. The most common mode is RS-232, and this is the default setting typically shipped from the factory. If an instrument has been built to use one of the other interfaces, the mode will be correctly set when the instrument is shipped.
.rs232: This is the legacy standard used by default on most equipment with serial ports, referred to as RS-232, EIA-232, TIA-232, or variations on one of these depending on the revision, but for most practical purposes they are interchangeable. The logger's implementation of RS-232 is always full duplex, with no hardware flow control lines required: transmit, receive and ground are the three connections needed.
rs485f: This is the full duplex version of the RS-485 standard (also EIA-485, TIA-485, etc), which permits higher speeds and/or longer distances than RS-232. A five-conductor cable is required; two lines each for both receive and transmit, plus a ground connection. In most cases a simple cable will work, but at extreme speeds and distances, the transmit and receive line pairs may require impedance matching termination components. The logger does not include these, as they will be specific to each individual installation.
uart: This offers a logic level (0-3.3V swing) serial interface to the UART on the logger’s serial port. The “idle” state of the line, i.e. the state of the serial transmit line during the time before and after transmission of data bytes, is high (3.3V). This may be a useful option for OEM integrators, typically over short distances to another piece of equipment, where the communication link is not exposed to the outside world. In this mode, it is worth noting that the serial receiver interface on the logger has a (nominal) 5KΩ pulldown resistor to 0V in the circuit at all times. As such, in order to minimize current consumption while there is no serial activity, it is recommended that the serial transmit signal coming from the circuit that the logger is interfaced to is either tristated off (high impedance) or held at a logic low (0V).
uart_idlelow: the same as uart, but with inverted logic levels, so that the "idle" state is low (0V). This may be thought of as the same logic states as RS232, except that it utilizes 0-3.3V logic levels.
availablemodes: report the list of available modes. This value is only reported when explicitly requested.
availablebaudrates: report the list of available baudrates. This value is only reported when explicitly requested.
Examples
>> link serial
<< link serial baudrate=19200 mode=rs232
Sending the serial command without any arguments will result in all parameters being returned. Note the absence of availablemodes and availablebaudrates.
>> link serial baudrate=115200
<< link serial baudrate=115200
Set the serial baudrate to 115200.
>> link serial mode
<< link serial mode=rs232
>> link serial mode=rs485f
<< link serial mode=rs485f
Request the serial mode, then set it to rs485f.
>> link serial availablebaudrates
<< link serial availablebaudrates=115200|19200|9600|4800|2400|1200|230400|460800
Request the availablebaudrates.
>> link serial availablemodes
<< link serial availablemodes=rs232|rs485f|uart|uart_idlelow
Request the availablemodes.