Page 1
Product User Manual Category Contents Keywords Dual CAN, dual optical, hardware switch, converter, hub CANSwitch-AF2S2 is a high-performance dual-channel CAN-to-fiber switch based on ZLG Electronics' Description advanced CAN bus technologies and operating system technologies. It has two conversion modes: Hub and Converter.
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.
High-Performance Dual-CAN to Fiber Switch User Manual 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.
High-Performance Dual-CAN to Fiber Switch User Manual 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.
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.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.
CANSwitch-AF2S2 High-Performance Dual-CAN to Fiber Switch User Manual 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...
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.
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...
Page 19
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.
Page 21
The first CAN bus sends data, the second, fifth, and sixth CAN buses receive data, and the third and fourth CAN buses do not receive data, which conforms to the configuration of the first CANSwitch-AF2S2. See Figure 3.12. Figure 3.12 First CAN bus sending data...
Page 22
Figure 3.13 Second CAN bus sending data The third and fourth CAN buses send data, and all other CAN buses can receive data, which conforms with the configuration of the second CANSwitch-AF2S2. See Figure 3.14. Figure 3.14 Third and fourth CAN buses sending data...
The ZNetCom software is the configuration software of CANSwitch-AF2S2 device running on Windows. No matter what the current IP address of the CANSwitch-AF2S2 device is, you can obtain the current IP address of the CANSwitch-AF2S2 device by using ZNetCom software and configure it. The procedure for obtaining CANSwitch-AF2S2 device IP address using ZnetCom software is as follows: Connect the hardware.
4.2.3 PC and Device Network Segment Detection Before using the PC to communicate with the CANSwitch-AF2S2 device, make sure that your PC and the CANSwitch-AF2S2 device are on the same network segment. The CANE device is set with a default IP address (192.168.0.178) and network mask (255.255.255.0) when it leaves the factory.
Figure 4.4 Checking whether the IP address of the CANSwitch-AF2S2 device and the PC are on the same network segment The following describes how to set your PC and CANSwitch-AF2S2 device to the same network segment. If you are using Windows 2000/XP/7/8/10, there are two methods. One is to add the local IP address, and the other is to change the local IP address.
4.3 TCP Server Mode 4.3.1 System Block Diagram In TCP Server mode, CANSwitch-AF2S2 will not actively connect with other devices. It always waits for the connection of the client (TCP Client), and can perform two-way data communication after establishing a TCP connection with the client. Figure 4.11 shows the communication establishment process.
CANSwitch-AF2S2 High-Performance Dual-CAN to Fiber Switch User Manual User Manual 4.3.2 Configuring the CANSwitch-AF2S2 Device Figure 4.12 shows the configuration in TCP Server mode. Be sure to submit the configuration modifications The default password is 88888 The IP address configuration should be...
After starting the device properly, the page appear, as shown in Figure 4.21. Figure 4.21 Starting the device For details about how to use the CANTest software, see the ZLG Electronics CAN Test Software and Interface Function User Manual. 4.3.5 Test Result Send a CAN frame whose ID is 00000000 and data is 0001020304050607 by using the CANTest software over USBCAN.
CANSwitch-AF2S2 High-Performance Dual-CAN to Fiber Switch User Manual User Manual 4.4.2 Configuring the CANSwitch-AF2S2 Device Figure 4.29 shows the configuration in TCP CLIENT mode. Be sure to submit the configuration modifications The default password is 88888 The IP address configuration should be...
High-Performance Dual-CAN to Fiber Switch User Manual User Manual Figure 4.37 Device started For details about how to use the CANTest software, see the ZLG Electronics CAN Test Software and Interface Function User Manual. 4.4.5 Test Result Send a CAN frame whose ID is 00000000 and data is 0001020304050607 by using the CANTest software over USBCAN.
Page 48
Tip: In this mode, the CANSwitch-AF2S2 uses "working port (see Table 5.2)" to receive UDP packets sent by user equipment; the data received by the CAN port of the CANSwitch-AF2S2 device will be sent to the "destination port (see Table 5.2)" of six groups of valid "destination IP (see Table 5.2)".
CANSwitch-AF2S2 High-Performance Dual-CAN to Fiber Switch User Manual User Manual 4.5.2 Configuring the CANSwitch-AF2S2 Device Figure 4.45 shows the configuration in UDP mode. Be sure to submit the configuration modifications The default password is 88888 The IP address configuration should be...
Page 50
Figure 4.47 Opening the TCP&UDP test tool Select UDP mode in Type, enter the IP address and the working port number of CANSwitch-AF2S2, and local port, and click Create. See Figure 4.48. Figure 4.48 Creating a connection Click Connect to connect the CANSwitch-AF2S2 device. See Figure 4.49.
High-Performance Dual-CAN to Fiber Switch User Manual User Manual Figure 4.54 Device started For details about how to use the CANTest software, see the ZLG Electronics CAN Test Software and Interface Function User Manual. 4.5.5 Test Result Send a CAN frame whose ID is 00000000 and data is 0001020304050607 by using the CANTest software over USBCAN, as shown in Figure 4.55.
5. ZNetCom Software Configuration The ZNetCom software is dedicated configuration software for CANSwitch-AF2S2 device running on Windows. You can obtain the IP address of the CANSwitch-AF2S2 device, view and change the device configuration parameters, and upgrade the device firmware by using the ZNetCom software.
5.2 Obtaining Device Configurations Before obtaining the configuration information, check whether the RS232 configuration serial port has been connected to the computer or the CANSwitch-AF2S2 device and the PC network card have been connected with a network cable (a fiber-to-Ethernet switch needs to be added)..
Page 60
Click in the toolbar. A dialog box appears for communication link selection. The CANSwitch-AF2S2 allows you to configure the device over optical fiber or serial ports . Which method you choose depends on how you connect the device to the PC. If you use the LAN port to connect to the PC, choose optical fiber;...
Page 61
ZNetCom software, as shown in Figure 5.9. Device list Figure 5.9 Obtaining CANSwitch-AF2S2 device configuration properties Double-click the device item in the device list; or after selecting the device item, click in the toolbar or in the property bar. The "Get Device Information" dialog box appears, as shown in Figure 5.10.
Page 62
Figure 5.10 Obtaining configuration data When the "Get Device Information" dialog box disappears, you can view the CANSwitch-AF2S2 device configurations as shown in Figure 5.11 and Figure 5.12 in the property column. Figure 5.11 CANSwitch-AF2S2 device configuration hub (Hub) mode...
User Manual 5.3 Modifying Device Configurations When you modify the CANSwitch-AF2S2 device configurations by using the ZNetCom software, the device configuration password (the default value is "88888") is required. After you modify the device configurations in the property column, enter the device configuration password in the current password, click to complete the device configuration modification.
High-Performance Dual-CAN to Fiber Switch User Manual User Manual 5.4 Configuration Parameter Description 5.4.1 Configuration in Hub Mode (Hub Mode) Table 5.1 describes the default settings of the CANSwitch-AF2S2 device in hub mode. Table 5.1 Description of "Property column" items in hub mode Category...
A to Z, 0 to 9. Modifying this value is very CANSwitch-AF2S2 name useful users identify multiple CANSwitch-AF2S2 devices on the same network. Before changing other items, you must enter Current the correct password. The password contains a “88888” password...
Page 68
Device IP 192.168.0.178 by a network device (such as a PC and address CANSwitch-AF2S2). It is unique on the same network. address The subnet mask is very important to the informati network. Within the same network, the IP address and subnet mask are the same value.
Page 69
Static acquisition means that you directly informati enters the "IP address", "Subnet mask", and "Gateway". Dynamic acquisition means that operation the CANSwitch-AF2S2 module uses the DHCP How to get an Static acquisition protocol to obtain the IP address, subnet mask IP address...
Page 70
UDP. When TCP is used, a connection is established before data can be transferred. TCP Sever mode is to wait for client connection; 2. TCP Client is the CANSwitch-AF2S2 device actively connecting to the destination IP and port. Among the two CANSwitch-AF2S2s, one How TCP...
Page 74
When the CANSwitch-AF2S2 works in TCP Sever, each CAN port can have a maximum of 200 TCP connections by default without configuration;...
Page 75
CANSwitch-AF2S2 device. Only the network data sent through this Destination port can be received by the CANSwitch-AF2S2 8001/8002 port 1 device, and the data frame received by the CAN port of the CANSwitch-AF2S2 device will also be sent to this port through the optical fiber.
User Manual 5.5 Saving Restored Settings To help you modify the configurations of the CANSwitch-AF2S2 device in batches, the ZNetCom software allows you to import/export configurations. The Import/Export function button is located on the property column, as shown in Figure 5.14.
CANSwitch-AF2S2 series devices support local firmware upgrade. When you upgrade the CANSwitch-AF2S2 device by using the ZNetCom software, the PC and the CANSwitch-AF2S2 device must be on the same network segment (refer to 4.2 PC and device network segment detection ). The firmware upgrade procedure is as follows: In the device list column of ZNetCom software, select the device to be upgraded in the list item, and right-click the mouse.
ZLG Electronics does not guarantee the applicability of this document at any time. ZLG Electronics shall reserve the right to update this manual without prior notice. To get the latest version, please visit the official website of ZLG Electronics regularly or contact ZLG Electronics. Thank you!
Page 84
附录B Data conversion format of TCP notification port in CAN port state 某路CAN对应的TCP通知端口被连接后,如果此路CAN发生错误, 通知端口将向主机定时发出状态警告,TCP包数据段格式如下: CMD Time1 Time2 Time3 Time4 55h 固定格式。包头AAh 00h,包尾55h 状态码 Time1 Time2 Time3 Time4 错误计数(32bit),高字节在前,即Time1为高字节 Status description (all are CANSwitch-AF2S2 devices) Time error count Notification value value period (seconds) Fiber send buffer about to overflow Fiber send buffer overflowed 0.5s...
Need help?
Do you have a question about the CANSwitch-AF2S2 and is the answer not in the manual?
Questions and answers