Moxa TC-SW04-M12-4P-T [25/43] None to view now setting none to view now setting

Moxa TC-SW04-M12-8P [25/43] None to view now setting none to view now setting
TC-6000 Series Expansion Modules Software Installation and Programming Guide
4-5
Root formula: Inaccuracy =
/( /)
(

)

The variables in this equation are described below:
TBR = The Target Baud Rate, i.e., any non-standard baudrate
Factor = 921,600/TBR (rounded down to the integer)
ENUM = 8 * (921600/Target baudrate - Factor) (Round up or down)
As an example, below we show you how to calculate the transmission inaccuracy at a target baudrate (TBR) of
500,000 bps:
Target (non-standard) Baud Rate = 500,000
Factor =
,
,
= 1.8, then round down to the nearest integer to get
1
.
ENUM = 8
,
,
1 = 6.7, round to the nearest integer to get
7
.
Inaccuracy =
500,000921600/(1 + 7/8)
500,000
100
= 1.696 = 1.7%
This result indicates that for a device configured at the non-standard rate of 500,000 bps, the actual modulation
rate will deviate around 2% from the configured baudrate.
TC-SP04-DB44-T: Configuring Serial Port Modes
Use the setinterface command to retrieve the parameters of the serial port configuration. The usage is
$:~# setinterface [device node] [interface option]. The device node is the tty device to be
configured. For the serial ports, Moxa uses a proprietary driver whose device nodes are identified with the
marker M. Serial ports 1 to 4 on card 1 are referred to as ttyM0 to ttyM3, and ttyM4 to ttyM7 refer to ports
1 to 4 on the second card and so on. The interface option is a number between 0 and 3 that will determine
what serial interface should be configured for the port in question. For example:
$:~# setinterface /dev/ttyM0 0
sets the first serial port on the first card for RS-232 communications. Refer to the examples below for details.
Moxa:~# setinterface
Usage: setinterface device-node [interface-no]
device-node - /dev/ttyM0 ~ /dev/ttyM15
interface-no - following:
none - to view now setting
0 - set to RS232 interface
1 - set to RS485-2WIRES interface
2 - set to RS422 interface
3 - set to RS485-4WIRES interface
Moxa:~#
Checking Current Serial Settings
To check the current interface setting, type the following. The system should display a response as below.
Moxa: ~# setinterface /dev/ttyM0
Now setting is RS485-2WIRES interface.
In the example above, port 1 on card 1 is configured as a 2-wire RS-485 interface. After entering the lines of
code below, port 1 gets reset as an RS-422 interface.
Moxa: ~# setinterface /dev/ttyM0 2
Moxa: ~# setinterface /dev/ttyM0

Содержание

Скачать