ZLG CANSwitch-AF2S2 User manual

Product User Manual
CANSwitch-AF2S2 User Manual
High-Performance Dual-CAN to Fiber Optic Switch
User Manual
UM01010101 V1.03 Date: 2019/03/26
Category
Contents
Keywords
Dual CAN, dual optical, hardware switch, converter, hub
Description
CANSwitch-AF2S2 is a high-performance dual-channel
CAN-to-fiber switch based on ZLG Electronics'
advanced CAN bus technologies and operating system
technologies. It has two conversion modes: Hub and
Converter.
©2021 Guangzhou ZLG Electronics Technology Co.,Ltd.

CANSwitch-AF2S2
High-Performance Dual-CAN to Fiber Switch User Manual
©2021 Guangzhou ZLG Electronics Technology Co.,Ltd.
i
User Manual
Revision History
Version
Date
Description
V1.00
December 27, 2015
Created
V1.01
August 11, 2017
Changed the company name and sales network information
V1.02
March 14, 2019
Updated the document header and footer and "Sales and Service
Network" content and added the "Disclaimer" content
V1.03
March 26, 2019
Updated product images

CANSwitch-AF2S2
High-Performance Dual-CAN to Fiber Switch User Manual
©2021 Guangzhou ZLG Electronics Technology Co.,Ltd.
1
User Manual
Contents
1. Functions .....................................................................................................1
1.1 Overview.................................................................................................................1
1.1.1 Powerful hardware.......................................................................................2
1.1.2 Perfect functions\ .........................................................................................2
1.2 Product specification ..............................................................................................3
1.2.1 Fiber interface..............................................................................................3
1.2.2 CAN interface...............................................................................................3
1.2.3 Power Interface............................................................................................4
1.2.4 Configure the interface.................................................................................4
1.2.5 Software features.........................................................................................4
1.2.6 EMC characteristics.....................................................................................4
1.2.7 Electrical Parameters...................................................................................4
1.3 Mechanical dimensions..........................................................................................5
2. Product hardware interface description........................................................6
2.1 Appearance drawing...............................................................................................6
2.2 Power Interface ......................................................................................................7
2.3 RS232 configuration interface................................................................................7
2.4 Reset button, default restoration button and function switch.................................7
2.5 Fiber interface.........................................................................................................8
2.6 CAN port.................................................................................................................8
2.7 LED indicator..........................................................................................................9
3. Quick use in hub mode (Hub mode) ..........................................................10
3.1 Device configuration method................................................................................10
3.2 System block diagram..........................................................................................10
3.3 Configure the device ............................................................................................11
3.4 CANTest software operation.................................................................................14
3.5 Test Result............................................................................................................16
4. Quick use in converter mode (Converter mode) ........................................20
4.1 Device configuration method................................................................................20
4.2 IP address operation ............................................................................................20
4.2.1 Default settings of the device IP address ..................................................20
4.2.2 The user obtains the device IP address.....................................................20
4.2.3 PC and device network segment detection ...............................................21
4.2.4Add the IP address of the machine (use theWindows7 operating system as
an example).........................................................................................................22
4.2.5 Modify the local IP address........................................................................25
4.3 TCP Server mode.................................................................................................25
4.3.1 System block diagram................................................................................25
4.3.2 Configuring the CANSwitch-AF2S2 device................................................27
4.3.3 TCP&UDP software operation...................................................................27
4.3.4 CANTest software operation......................................................................30

CANSwitch-AF2S2
High-Performance Dual-CAN to Fiber Switch User Manual
©2021 Guangzhou ZLG Electronics Technology Co.,Ltd.
2
User Manual
4.3.5 Test Result..................................................................................................31
4.4 TCP Client mode ..................................................................................................34
4.4.1 System block diagram................................................................................34
4.4.2 Configuring the CANSwitch-AF2S2 device................................................36
4.4.3 TCP&UDP software operation...................................................................36
4.4.4 CANTest software operation......................................................................38
4.4.5 Test Result..................................................................................................40
4.5 UDP mode............................................................................................................43
4.5.1 System block diagram................................................................................43
4.5.2 Configuring the CANSwitch-AF2S2 device................................................45
4.5.3 TCP&UDP software operation...................................................................45
4.5.4 CANTest software operation......................................................................47
4.5.5 Test Result..................................................................................................49
5. ZNetCom software configuration................................................................53
5.1 Install configuration software................................................................................53
5.2 Obtaining device configurations...........................................................................55
5.3 Modify device configurations................................................................................60
5.4 Configuration parameter description....................................................................61
5.4.1 Configuration Instructions in Hub Mode (Hub Mode)................................61
5.4.2 Configuration Instructions in Converter Mode (Converter Mode)..............63
5.5 Save restored settings..........................................................................................73
5.5.1 Save settings..............................................................................................73
5.5.2 Restore settings.........................................................................................73
5.6 Upgrade firmware.................................................................................................74
6. Disclaimer..................................................................................................77

CANSwitch-AF2S2
High-Performance Dual-CAN to Fiber Switch User Manual
©2021 Guangzhou ZLG Electronics Technology Co.,Ltd.
1
User Manual
1. Functions
1.1 Overview
CANSwitch-AF2S2 is a high-performance industrial-grade optical fiber and CAN-bus
data conversion device developed by Guangzhou ZLG Electronics Co., Ltd. It integrates
two CAN-bus interfaces and two 100M fiber interfaces, and provides sophisticated and
stable TCP/IP protocol stack and hard switch.It helps you easily interconnect CAN-bus
network and optical fiber network, and further expand the scope of CAN-bus network. It
can also be configured in hub mode for device cascading.
Compared with twisted pair and coaxial cable, the low transmission loss of optical
fiber greatly increases the transmission distance. In addition, the optical cable also has
the characteristics of not radiating energy, non-conducting, and non-inductive.Moreover,
there is no influence of crosstalk and mutual interference of optical signals in the optical
cable, it has excellent anti-EMI and EMC characteristics, and there is no safety problem
caused by inductive coupling in the cable.
CANSwitch-AF2S2 is an industrial grade product and works in the temperature range
of -40℃to +85℃. It has two optical fiber interfaces, and the highest baud rate of 2-way
CAN-bus interface communication is 1 Mbps. CANSwitch-AF2S2 has two modes: in the
hub mode, it can realize cascading and automatic networking without configuration, as
shown in Figure 1.1; in the converter mode, it has TCP Server, TCP Client, UDP, and other
working modes. Each CAN port supports six IP segments to set a maximum of 200 TCP
or UDP connections. By using the configuration software, you can flexibly set
configuration parameters. Figure 1.2 shows a typical application.
Figure 1.1 Typical application in Hub mode

CANSwitch-AF2S2
High-Performance Dual-CAN to Fiber Switch User Manual
©2021 Guangzhou ZLG Electronics Technology Co.,Ltd.
2
User Manual
Figure 1.2 Typical application in Converter mode
1.1.1 Powerful Hardware
Adopt TI Cortex-A8 800MHz high-performance processor;
100M fiber interface, hardware switch supported;
Two CAN ports, 2.5 kV DC withstand voltage isolation;
CAN port baud rate 5k-1,000kbps can be set arbitrarily;
Embedded hardware watchdog;
The rated power supply voltage range is 9-36 V DC ;
The limit power supply voltage range is 7.5-40 V DC ;
Operating temperature: -40°C to +85°C;
Humidity: 5%-95% RH, no condensation;
Rugged metal housing, SECC metal (1.1 mm);
Specifically designed for industrial and military environments.
1.1.2 Perfect Functions
In Hub mode:
Cascading is supported.A maximum of 32 levels can be cascaded;
Each CAN port can be set to a different baud rate;
Two-way transparent transmission of CAN data and optical fiber data (for the
format, see Appendix A);
Support the acceptance and filtering of CAN ports. You can select the ID range to
be received, so as to filter unwanted CAN frames;
Each CAN port can be configured into different working modes, which can be
flexibly used in various fields;
Each CAN port opens a diagnostic port, and the host computer can obtain the
error status of the corresponding CAN port by connecting this port;
You can use the Windows platform configuration software to configure operating
parameters. The parameters can be imported and exported;

CANSwitch-AF2S2
High-Performance Dual-CAN to Fiber Switch User Manual
©2021 Guangzhou ZLG Electronics Technology Co.,Ltd.
3
User Manual
Provide Windows configuration software function library for free, including
easy-to-useAPI function library, which helps you write configuration software;
Support local system firmware upgrade.
In Converter mode:
Static or dynamic IP acquisition;
Heartbeat and timeout disconnection;
The working port is fixed, and the destination IP address and port can be set;
After the network is disconnected, the connection resources are automatically
restored, and the TCP connection is established reliably;
TCP supports a maximum of 200 connections, which can satisfy six groups of
users and manage one CAN port;
In UDP mode, each CAN port supports six groups of target IP segments. Multiple
users can manage a CAN device at the same time;
Supported protocols include ETHERNET, ARP, IP, ICMP, UDP, DHCP, DNS, and
TCP;
Compatible with SOCKET working methods (TCP Server, TCP Client, UDP, etc.).
The writing of the host computer communication software follows the standard
SOCKET rules;
Each CAN port can be set to a different baud rate;
Two-way transparent transmission of CAN data and optical fiber data (for the
format, see Appendix A);
Flexible CAN port data framing settings meet various subcontracting needs;
Support the acceptance and filtering of CAN ports. You can select the ID range to
be received, so as to filter unwanted CAN frames;
Each CAN port can be configured into different working modes, which can be
flexibly used in various fields;
Each CAN port opens a diagnostic port, and the host computer can obtain the
error status of the corresponding CAN port by connecting this port;
You can use the Windows platform configuration software to configure operating
parameters. The parameters can be imported and exported;
Provide Windows platform configuration software function library for free,
including easy-to-use API function library, which helps users write their own
configuration software;
Support local system firmware upgrade.
1.2 Product Specifications
1.2.1 Fiber Interfaces
Number of fiber ports: 2;
Interface type: SC;
Fiber type: single mode;
Operating wavelength: 1,310 nm;
Operating rate: 100 Mbps.
1.2.2 CAN Interfaces

CANSwitch-AF2S2
High-Performance Dual-CAN to Fiber Switch User Manual
©2021 Guangzhou ZLG Electronics Technology Co.,Ltd.
4
User Manual
Number of CAN ports: 2;
Interface type: 2EDG, 90°, terminal, 2.5 kV electromagnetic isolation;
Signal cable: CAN0H, CAN0L, CAN1H, CAN1L;
Shielded wire: FGND;
Terminal resistance wiring: R-, R+;
Baud rate: 5Kbps-1000Kbps.
1.2.3 Power Interfaces
Round hole socket: positive inside and negative outside;
Terminal: OPEN2.
1.2.4 Configuring the Interfaces
RS232 interface;
1.2.5 Software Features
Supported TCP/IP protocols: ETHERNET, ARP, IP, ICMP, UDP, TCP, DHCP,
DNS.
Tool software: ZNetCom configuration software (version 2.95 or later), CANtest
test tool, TCP/UDP test tool.
Configuration method: Windows configuration software ZNetCom.
1.2.6 EMC Characteristics
Electrostatic Discharge Immunity (ESD)
Contact discharge: +8KV Class A
Air discharge: +15KV Class A
Electrical fast transient (EFT) burst immunity
Power port: +2 kV Class A
Signal port: +1 kV Class A
Surge (impact) immunity
Power port (DC terminal): +1 kV Class A
Power port (adapter): +2 kV Class A
Signal port: +1 kV Class A
1.2.7 Electrical Parameters
Unless otherwise specified, the parameters listed in Table 1.1 refer to the values at
Tamb=25°C.
Table 1.1 Electrical parameters
Parameter Name
Symbol
Rating
Unit
Power voltage
VCC
+9~36V
V
Power consumption
PM
3350
mW
Operating ambient temperature
Tamb
-40℃~85℃
℃
Storage temperature
Tstg
-40℃~85℃
℃

CANSwitch-AF2S2
High-Performance Dual-CAN to Fiber Switch User Manual
©2021 Guangzhou ZLG Electronics Technology Co.,Ltd.
5
User Manual
1.3 Mechanical Dimensions
To install CANSwitch-AF2S2, see the appearance and mechanical dimensions (unit:
mm) provided in Figure 1.3. The figure specifies the length, width, height, and part of the
mechanical structure of the product.
Figure 1.3 CANSwitch-AF2S2 installation mechanical dimensions

CANSwitch-AF2S2
High-Performance Dual-CAN to Fiber Switch User Manual
©2021 Guangzhou ZLG Electronics Technology Co.,Ltd.
6
User Manual
2. Hardware Interfaces
This chapter describes the hardware interfaces of CANSwitch-AF2S2.
2.1 Appearance Drawing
Figure 2.1 shows the front appearance of the product. Figure 2.2 and Figure 2.3 show
the side appearance.
Figure 2.1 CANSwitch-AF2S2 front appearance
Figure 2.2 CANSwitch-AF2S2 side appearance 1
Figure 2.3 CANSwitch-AF2S2 side appearance 2

CANSwitch-AF2S2
High-Performance Dual-CAN to Fiber Switch User Manual
©2021 Guangzhou ZLG Electronics Technology Co.,Ltd.
7
User Manual
2.2 Power Interfaces
CANSwitch-AF2S2 uses a 9-36 V DC power supply that is easily available at the
industrial site, and is equipped with two wiring ports. One is a round hole socket and the
other is a terminal block. Both interfaces support positive and negative connections, with
no need to confirm the positive and negative poles. Figure 2.4 shows its interface.
Figure 2.4 Power Interface
2.3 RS232 Configuration Interface
As shown in Figure 2.5, this interface is specially used to configure the
CANSwitch-AF2S2 device.
Figure 2.5 Configuring ports
2.4 Reset Button, Default Restoration Button, and Function Switch
As shown in Figure 2.6, RESET is used to reset the device manually. Press it for 1
second to reset the device; DEF is used to restore factory settings. Press it for 5-10
seconds and then the system SYS is off (the SYS indicator is green). The device will
automatically reset factory settings. The CANSwitch-AF2S2 device has two functions:
Hub (hub) and Converter (converter). When the function switch is set to the corresponding
function, press the RESET key once for the function to take effect.
Figure 2.6 Reset button, default restoration button and function switch

CANSwitch-AF2S2
High-Performance Dual-CAN to Fiber Switch User Manual
©2021 Guangzhou ZLG Electronics Technology Co.,Ltd.
8
User Manual
Tip: After default settings are restored, all current configurations will be lost. Operate
with caution.
2.5 Fiber Interface
Figure 2.7 shows the appearance of the optical fiber (SC) interface of
CANSwitch-AF2S2, with four indicators. The Link indicator is green, indicating whether
the optical fiber network is physically connected. If it is connected to the optical fiber
network, the Link indicator is always on; the Active indicator is yellow, indicating whether
there is data transmission. If the optical fiber network has data transmission, the Active
indicator flashes.
Figure 2.7 Optical fiber interface and indicators
2.6 CAN Port
The CANSwitch-AF2S2 device has two CAN ports. Figure 2.8 shows its appearance.
It has two indicators: CAN0 and CAN1. When a device is connected, when there is data
communication; Table 2.1 describes the pin definition.
Figure 2.8 CAN interface and indicators
Table 2.1 Definition of CANSwitch-AF2S2 CAN port pins
Signal
Introduction
CANL
CANL signal terminal of CAN
FGND
Terminals for connecting the CAN channel to
the shielding layer
CANH
CANH signal terminal of CAN
R-
120-ohm termination resistor of CAN.
Connecting the wire to R+ means enabling
the internal termination resistor
R+
120-ohm termination resistor for CAN.
Connecting the wire to R- means enabling
the internal termination resistor
Tip: The terminal resistance can be configured if R- and R+ are short-circuited with wires.

CANSwitch-AF2S2
High-Performance Dual-CAN to Fiber Switch User Manual
©2021 Guangzhou ZLG Electronics Technology Co.,Ltd.
9
User Manual
2.7 LED Indicators
The CANSwitch-AF2S2 device has six indicators, PWR, SYS, Fiber0, Fiber1, CAN0,
and CAN1, as shown in Figure 2.9.
Figure 2.9 Indicators
Table 2.2 describes the indicators.
Table 2.2 Description of LED indicators
LED
Description
PWR
The power indicator is always on after power on
SYS
System running indicator. When the device is
not ready to start or fails, the red indicator is
steady on; when it is running properly, the green
indicator flashes
Fiber0/Fiber1
Active
LAN working indicator flashes when data is sent
and received
Fiber0/Fiber1
Link
LAN working indicator is steady on when the
optical fiber network is physically connected
CAN0/CAN1
Green indicator on or flashing: Data is sent or
received on the CAN port
Green indicator off: No data is sent or received
on the CAN port
Red indicator on: An error occurred on the CAN
port
Red indicator off: No error has occurred on the
CAN port, or the error has been cleared

CANSwitch-AF2S2
High-Performance Dual-CAN to Fiber Switch User Manual
©2021 Guangzhou ZLG Electronics Technology Co.,Ltd.
10
User Manual
3. Quick Use in Hub Mode (Hub Mode)
Devices in hub mode can implement automatic networking, and devices can be
cascaded in hub mode. This document uses three CANSwitch-AF2S2 devices for
cascading. As long as the device is configured, the CAN bus will be forwarded to the
corresponding CAN port as required. You can network independently without using
switches and other equipment.
3.1 Device Configuration Method
Turn the switch to Hub and press the reset button. After the device beeps twice, it
enters Hub mode. For details, see Section 2.4.
The CANSwitch-AF2S2 supports using the serial port to configure the device, as
shown in Figure 3.1. The device can be configured as long as the dedicated RS232
configuration port is connected to the PC.
Figure 3.1 Dedicated configuration port
3.2 System Block Diagram
This document uses three devices for cascading and meets the following design
requirements. The CAN signal sent by user equipment 1 and user equipment 2 can be
received by user equipment 3, user equipment 6 and user equipment 7; the CAN signal
sent by user equipment 3 can be received by user equipment 4 and user equipment 5; the
CAN signals sent by user equipment 4 and user equipment 5 can be received by all the
equipment; the CAN signal sent by user equipment 6 can be received by user equipment
1, the user equipment 2, the user equipment 3 and the user equipment 7; the CAN signal
sent by user equipment 7 can be received by user equipment 1, user equipment 2, user
equipment 3 and user equipment 6. Figure 3.2 shows the overall system block diagram.

CANSwitch-AF2S2
High-Performance Dual-CAN to Fiber Switch User Manual
©2021 Guangzhou ZLG Electronics Technology Co.,Ltd.
11
User Manual
Figure 3.2 System block diagram in Hub mode
3.3 Configuring the Device
Search devices. The CANSwitch supports searching by serial port. When searching
by serial port, the COM port should be selected correctly. See Figure 3.3.
Figure 3.3 Searching for devices
Note: For details about how to configure the device, see 错误!未找到引用源。.

CANSwitch-AF2S2
High-Performance Dual-CAN to Fiber Switch User Manual
©2021 Guangzhou ZLG Electronics Technology Co.,Ltd.
12
User Manual
Configure the three CANSwitch devices, as shown in Figure 3.4, Figure 3.5, and
Figure 3.6.
Figure 3.4 Configuration of the first CANSwitch
Be sure to submit the configuration
modifications
The default password is 88888
A total of three devices are used for
networking. Select 3 as the number of
networking devices (a maximum of 32 devices
are supported for cascading); this device is the
first networking device, so select 1 as the
device number
The baud rate should be 500K, which should
be consistent with the CAN device connected
to the CAN0 port.
The data of CAN0 port can only be forwarded
to CAN1 port of device 1, CAN0 port of
device 3 and CAN1 port of device 3
The baud rate should be 500K, which should
be consistent with the CAN device connected
to the CAN1 port.
The data of CAN1 port can only be forwarded
to CAN0 port of device 2 and CAN1 port of
device 2

CANSwitch-AF2S2
High-Performance Dual-CAN to Fiber Switch User Manual
©2021 Guangzhou ZLG Electronics Technology Co.,Ltd.
13
User Manual
Figure 3.5 Configuration of the second CANSwitch
A total of three devices are used for
networking. Select 3 as the number of
networking devices (a maximum of 32 devices
are supported for cascading); this device is the
second networking device, so select 2 as the
device number
Be sure to submit the configuration
modifications
The default password is 88888
The baud rate should be 500K, which should
be consistent with the CAN device connected
to the CAN0 port.
The data of CAN0 port can only be forwarded
to all CAN buses
The baud rate should be 500K, which should
be consistent with the CAN device connected
to the CAN1 port.
The data of CAN1 port can only be forwarded
to all CAN buses

CANSwitch-AF2S2
High-Performance Dual-CAN to Fiber Switch User Manual
©2021 Guangzhou ZLG Electronics Technology Co.,Ltd.
14
User Manual
When the configuration is successful, it will beep twice. For details about how to use
the ZNetCom software, refer to Section 5 ZNetCom software configuration.
3.4 CANTest Software Operation
We need a device equipped with a CAN port to demonstrate how the
CANSwitch-AF2S2 device realizes bidirectional transparent conversion of CAN network
data and optical fiber data. Here, select the USBCAN interface card, which is convenient
Figure 3.6 Configuration of the third CANSwitch
Be sure to submit the configuration
modifications
The default password is 88888
A total of three devices are used for
networking. Select 3 as the number of
networking devices (a maximum of 32 devices
are supported for cascading); this device is the
third networking device, so select 3 as the
device number
The baud rate should be 500K, which should
be consistent with the CAN device connected
to the CAN0 port.
The baud rate should be 500K, which should
be consistent with the CAN device connected
to the CAN1 port.
The data of CAN0 port can only be forwarded
to CAN0 port and CAN1 port of device 1;
CAN1 port of device 3
The data of CAN1 port can only be forwarded
to CAN0 port and CAN1 port of device 1;
CAN0 port of device 3

CANSwitch-AF2S2
High-Performance Dual-CAN to Fiber Switch User Manual
©2021 Guangzhou ZLG Electronics Technology Co.,Ltd.
15
User Manual
to use. Its related information is available at http://www.zlg.cn.
Note: For details about how to use the CANTest software, see ZLG Electronics CAN Test Software
and Interface Function User Manual.
First, connect the CANSwitch-AF2S2 device to the PC by using an optical cable, and
connect the CANSwitch-AF2S2 device to the USBCAN interface card by using a twisted
pair cable (CANH is connected, and CANL is connected. Configure a 120-ohm terminal
resistance). Then, connect the USBCAN interface card with the PC by using a USB cable.
Finally, connect power to the USBCAN interface card and the CANSwitch-AF2S2 device.
Run the CANtest software on the PC (as shown in Figure 3.7). The CANtest test software
is available on http://www.zlg.cn/ (installation required).
Figure 3.7 Software used to test communication
After starting CANtest, select a device type. Here we use USBCAN-EU as an
example. First, we select USBCAN-EU, as shown in Figure 3.8. Then, select the "Open
Device" menu in the "Device Operation" main menu to display the device's parameter
setting interface. Pay attention to the baud rate. Click OK and start CAN, as shown in
Figure 3.9.
Figure 3.8 Selecting a device type

CANSwitch-AF2S2
High-Performance Dual-CAN to Fiber Switch User Manual
©2021 Guangzhou ZLG Electronics Technology Co.,Ltd.
16
User Manual
Figure 3.9 Setting device parameters
If the device is connected properly, there will be no prompt. If the connection is
abnormal, an error message appears.
Figure 3.10 Starting USBCAN-E-U successfully
On the tab page of any CANtest software, click the "Send" button. You can then
receive the data you just sent on the tab page of another CANtest software.
3.5 Test Result
Open all six CAN cards, as shown in Figure 3.11.
Table of contents
Other ZLG Switch manuals
Popular Switch manuals by other brands

Buhler
Buhler NT 61-Z0-Atex Installation and operation instructions for

EtherWAN
EtherWAN EX77964 installation guide

Roland
Roland v-1hd owner's manual

Linksys
Linksys FENSK05 - EtherFast Network Starter user guide

PROCET
PROCET EN-S4P Quick installation guide

Cisco
Cisco Nexus 92348GC-X NX-OS Hardware installation guide