Moxa TC-SW04-M12-4P-T [26/43] Tc cp02 db t can bus interface

Moxa TC-SW04-M12-8P [26/43] Tc cp02 db t can bus interface
TC-6000 Series Expansion Modules Software Installation and Programming Guide
4-6
Now setting is RS422 interface.
ATTENTION
Serial interfaces
will shift device node identifiers depending upon the location and number of cards
mounted in the platform
. E.g. i
f there are originally two cards mounted in the machine, and card number 1 is
removed, then the second card’s
number will change from /dev/ttyM4 to /dev/ttyM7 to /dev/ttyM0
and
/dev/ttyM
3.
If a user wants to configure the machine for fixed serial interface device node identifiers, you can create a UDEV
rule in
/etc/udev/rules.d/. For help with this, you may consult the UDEV manual files, another Linux
manual, or Moxa technical support for more details.
The system default for TC-SP04-DB44-T interfaces is RS-232. By editing the device manager’s rule scripts, it is
possible to set all serial ports to one of the serial protocols (RS-485 or RS-422) instead. The following steps
describe how to do so.
1. Edit Moxa’s custom rules file for the device manager, which can be found at
/etc/udev/rules.d/96-moxa.rules. Add the following command to 96-moxa.rules:
RUN+="/bin/setinterface /dev/ttyM%n 0”
# Set the device, TC-SP04-DB44-T, 0x1393:0x1042 default as 232 mode interface
DRIVERS=="mxser", ATTRS{vendor}=="0x1393", ATTRS{device}=="0x1042",
RUN+="/bin/setinterface /dev/ttyM%n 0"
"96-moxa.rules"
ATTENTION
The
VendorID for the TC-SP04-DB44-T is 0x1393, and the DeviceID is 0x1042.
2. To change the default serial interface mode, edit the setinterface command you have just added to the
Moxa rules file (
/etc/udev/rules.d/96-moxa.rules). This will cause the Linux kernel to automatically
set the TC-6000 series module to your preferred interface at every reboot.
For RS-232, use
RUN+="/bin/setinterface /dev/ttyM%n 0"
For RS-485 2-wire, use
RUN+="/bin/setinterface /dev/ttyM%n 1"
For RS-422, use
RUN+="/bin/setinterface /dev/ttyM%n 2"
For RS-485 4-wire, use
RUN+="/bin/setinterface /dev/ttyM%n 3"
3. When finished, you must un-mount the writable file system and reboot your computer
Moxa:~# umount /
Moxa:~# reboot
4. Once the computer restarts, confirm that the interfaces have been reset to your preferred interface settings.
Moxa:~# setinterface /dev/ttyM0
Now setting is RS485-2WIRES interface.
TC-CP02-DB-T: CAN Bus Interface
The TC-CP02-DB-T module provides TC-6000 series computers with a CAN bus interface. CAN is a broadcast
serial bus standard for connecting electronic control units (ECUs). Each node is able to send and receive
messages, but not simultaneously: a message (consisting primarily of an IDusually chosen to identify the
message-type/senderand up to eight message bytes) is transmitted serially onto the bus, one bit after
another. This signal-pattern codes the message (in NRZ) and is sensed by all nodes.
The Moxa TC-CP02-DB-T module provides the CAN bus interface for industrial CAN communication. TC-6000
series computer provide the SocketCAN interface for industrial CAN communication. The SocketCAN concept

Содержание

Скачать