AnaGate CAN X2 User Manual Analytica GmbH A.
AnaGate CAN X2: User Manual Analytica GmbH by A. Schmidt This document was generated with DocBook at 2014-10-31 12:48:28. PDF-Datei (dtsch.): AnaGate-CAN-X2-1.0.pdf PDF-Datei (engl.): AnaGate-CAN-X2-1.0-EN.pdf Publication date 12. Februar 2014 Copyright © 2007-2014 Analytica GmbH Abstract This manual describes the interfaces and modes of operation of a AnaGate CAN X2. All rights reserved. All the information in this manual was compiled with the greatest of care. However, no warranty can be given for it.
Table of Contents Introduction ........................................................................................... vii 1. Description ........................................................................................... 1 1.1. Features ..................................................................................... 1 1.2. Specification ................................................................................ 2 1.3. Scope of delivery .................................................
List of Figures 1.1. Top view AnaGate CAN X2 ................................................................... 3 2.1. HTTP interface, AnaGate CAN X2 .......................................................... 6 2.2. HTTP interface, network settings .......................................................... 7 2.3. HTTP interface, CAN settings ................................................................ 8 2.4. HTTP interface, CAN settings ..............................................................
List of Tables 1.1. 1.2. 1.3. A.1. Technical data, AnaGate CAN X2 .......................................................... 2 Pin layout, CAN plug, upper connector strip ........................................... 4 Pin layout, CAN plug, lower connector strip ............................................ 4 Using AnaGate hardware with firewall ..................................................
List of Examples 3.1. Settings.ini .......................................................................................
Introduction This document describes the features and objectives of the CAN-Ethernet gateway AnaGate CAN X2. This device is part of a product line, whose single devices only differ in the number of CAN interfaces and/or the device case. In this manual the term AnaGate CAN Gateway is uniformly used, if no specific model is addressed or it is not necessary to differentiate.
Chapter 1. Description The AnaGate CAN Gateway connects a PC, an embedded PC or an other general device to one or more CAN busses via the TCP/IP network protocol. It basically works as a CAN master with no own CAN identifier on the bus. For this reason the AnaGate CAN X2 provides an ethernet interface and two independent electrically isolated CAN interface. Controlling and configuration of an AnaGate CAN Gateway is made through TCP/IP. The application protocol itself is described in detail (see [TCP-2010]).
Description 1.2. Specification Technical aspect Measurements CAN bus Analogue IO LAN interface Voltage supply Ambient temperature Specfication DIN rail casing 100mm x 125 mm x 50mm Weight approx. 110g Baud rate 50, 100, 125, 250, 500, 800 or 1000 kbps, software configuration CAN controller 2x FPGA (similar to SJA1000) CAN interface 2x ISO 11898-2, galvanic decoupled Interface 2x DB9 plug incl.
Description 1.4. Interfaces and plugs 1.4.1. AnaGate CAN X2 Figure 1.1. Top view AnaGate CAN X2 The upper connector strip of the AnaGate CAN X2 features the following connectors and LEDs (from left to right): LAN Via the RJ45 socket the AnaGate CAN Gateway is connected with the Ethernet. The device can be connected to a network component like a hub or a switch. For a direct connection to a PC a crossover network cable has to be used.
Description Pin Description 1 GND 2 CAN_L 3 not connected 4 CAN_H Table 1.2. Pin layout, CAN plug, upper connector strip ACT LED This green LED lights up when the AnaGate CAN Gateway is processing incoming and outgoing CAN messages. ERR LED This red LED lights up if the error state is in warning state which is set if at least one of the error counters equals or exceeds the error warning limit of 96.
Description ACT LED This green LED lights up when the AnaGate CAN Gateway is processing incoming and outgoing CAN messages. ERR LED This red LED lights up if the error state is in warning state which is set if at least one of the error counters equals or exceeds the error warning limit of 96.
Chapter 2. Configuration 2.1. Initial installation First the AnaGate CAN Gateway must be supplied via the power plug with a tension from 9 to 24 V. Insert the included LAN cable into the plug labelled LAN and connect it either to a hub or switch. If connecting directly to a PC use a crossover LAN cable (not in scope of delivery) instead of the included LAN cable. 2.1.1.
Configuration can be e.g. used. If neccessary the settings of the network interface on the configuration pc has to be changed temporarily. 2.2. Network settings On the page IP Settings the following settings can be changed. DHCP Here you can switch between static IP and dynamic (via DHCP) addresses. If DHCP is being used, the remaining fields are ignored, because this information is retrieved from the DHCP server. In this case, a DHCP server must be available and accessible in the network.
Configuration The inputs will be taken over immediately after clicking the button Save settings and saved permanently on the AnaGate CAN Gateway . A restart of the device is not necessary for activation of the settings. Note Maybe the ARP cache of the PC has to be deleted to find the device with the changed IP address. 2.3. CAN settings On the page CAN Settings the global settings for all existing CAN interfaces are displayed and can be changed individually. Figure 2.3.
Configuration offline The CAN controller is not active on the CAN bus (offline). normal Normal operating mode. The default setting of CAN baud rate is used. listen In listen mode the CAN passive. CAN messages are no messages can be sent error). The default setting rate is used. loopback In loopback mode every sent CAN message is mirrowed back by the CAN controller (no ACK, no errors). The default setting of CAN baud rate is used.
Configuration Figure 2.4. HTTP interface, CAN settings Reception timer interval This value specifies the frequency which is used to examine if new CAN telegrams are available in the internal driver buffer. The more frequently this examination is done, the shorter is the latency of the re-transmission of the CAN data via ethernet. On the other hand, its maximum message throughput is decreased. The interval is defined in micro seconds, default value is 3000.
Configuration Figure 2.5. HTTP interface, Status TCP Receive Number of via TCP/UDP received CAN messages (CAN firmware) TCP Transmit Number of via TCP/UDP transmitted CAN messages (CAN firmware) CAN Receive Number of received CAN messages (CAN bus, CAN driver) CAN Transmit Number of transmitted CAN messages (CAN bus, CAN driver) CAN Discard • Timeout sending CAN telegram (1s) This indicates that no active partner is connected to the CAN bus (no ACK received).
Configuration of timeouts during transmission or of overloading the CAN bus concerning the current used baud rate. CAN Receive Error Register Rx-Err-Count of the CAN-Transceiver CAN Transmit Error Register Tx-Err-Count of the CAN-Transceiver Network Error TCP/UPD transmit error (CAN firmware) After clicking the button Clear all saved diagnosis entries are deleted on the device. To reset the system counters the device must be switched off. 2.6.
Configuration Figure 2.6. HTTP interface, Lua settings Browse... Opens a file upload dialog to select a Lua script file. Upload Uploads the selected script file to the device. Clear Clears the current script file selection. Boot script Script file executed on system startup. Via the button Delete the boot script can be deactivated. Only one boot script is allowed. Running script Displays the currently executing script file. Via the button Stop the execution can be cancelled.
Configuration To start the execution of a script click on the button Start. Via button Delete a script can be deleted on the device and via Boot a script can be defined as boot script. script output area In this text area the standard output (stdout) of the currently executing script is displayed. Via the button Clear this text area can be cleared. error output area In this text area the standard error output (stderr) of the currently executing script is displayed.
Configuration Warning For thermical reasons the maximum power dissipation of the output stage PV must not exceed 0.5W each channel (PV= (input voltage UV UOUT)*ILOAD). Maximum current is 250mA. Warning The outputs are not short-circuit-safe! 2.8. Factory reset In order to restore the default factory settings, hold the RESET for approx. 10 seconds. If the device is reset successfully, the yellow LED blinks until the RESET is released.
Configuration • Digit 0: 10x flashing (200ms delay between each flash) • Dot: 1x very fast flash Between two single digits a delay of 1 seconds is made, and between the IP address and subnet mask two fast flashes are pulsed out. Figure 2.7.
Chapter 3. Fields of application If the AnaGate CAN Gateway is connected to the CAN bus, mind the following facts: • CAN_L: This line has to be connected to the CAN_Low line of the CAN bus. • CAN_H: This line has to be connected to the CAN_High line of the CAN bus. • GND: This line can be connected optionally to GND of the other bus devices. 3.1. Gateway mode In gateway mode the CAN messages are transferred transparently over TCP/IP between the CAN network and the host platform (e.g.
Fields of application • Self-created batch files which are executed via the included Lua interpreter with integrated AnaGate software API. 3.2. Bridge mode In the bridge mode two arbitrary CAN networks can be interconnected by two AnaGate CAN Gateways. The CAN messages are exchanged transparently over TCP/ IP between the two devices in both directions. It is possible to mix different AnaGate CAN Gateway models in bridge mode.
Fields of application • The baudrate of the partner device. The baudrate of the parter device is independant of the own baudrate and has to be configured separatly. So, it is possible to interconnect networks with different baudrates. • The internal termination resistor is to be set on/off for the CAN port of the parter device. On destination devices, which can not software-configure the CAN bus termination (like the AnaGste CAN X2/X4/X8), this setting is ignored.
Fields of application To interconnect the two CAN interface on a single device, the own IP address or 127.0.0.1 has to be used. In this case the specified remote baud rate and termination is used on the interconnected interface. 3.3. CANopen Conformance Test Tool The CANopen Conformance Test Tool (CCT) is a software tool, which is created and supported by the CAN in Automation (CiA). It is used by the CiA to certificate CANopen devices.
Appendix A. FAQ - Frequently asked questions Here is a list of frequently asked questions. A.1. Common questions Q: No network connection (1) A: Please check the physical connection to the device first. In general the AnaGate has to be connected directly to a personal computer or to an active network component (hub, switch). If the AnaGate device is connected to a personal computer a cross-wired network cable must be used to connect the device, otherwise the included network cable is to be used.
FAQ - Frequently asked questions Q: No network connection after changing the network address A: After changing the network address of the AnaGate device via web interface the device is not longer reachable. The used internet browser displays only an empty web page, additional error messages are not available. Please check if your anti-virus software has blocked the new network address. After changing the network address you are redirected to the new network address in the browser.
FAQ - Frequently asked questions Device Port number AnaGate I2C X7 5100, 5200, 5300, 5500, 5600, 5700 AnaGate CAN 5001 AnaGate CAN USB 5001 AnaGate CAN uno 5001 AnaGate CAN duo 5001, 5101 AnaGate CAN quattro 5001, 5101, 5201, 5301 AnaGate CAN X1 5001 AnaGate CAN X2, AnaGate CAN-FD X2 5001, 5101 AnaGate CAN X4, AnaGate CAN-FD X4 5001, 5101, 5201, 5301 AnaGate CAN X8 5001, 5101, 5201, 5301, 5401, 5501, 5601, 5701 AnaGate SPI 5002 AnaGate Renesas 5008 AnaGate Universal Programmer UP/U
FAQ - Frequently asked questions Note it may work with lower baud rates without termination, but it is recommended to use a termination. Q: Receiving a NAK when sending a CAN telegram. A: If no CAN partner is connected to the AnaGate CAN (aka the CAN network), it is not possible to send CAN telegrams. The AnaGate CAN gets a NAK from the CAN controller. These NAK errors are sent to the AnaGate client via a data confirmation telegram.
Appendix B. Technical support The AnaGate hardware series, software tools and all existing programming interfaces are developed and supported by Analytica GmbH. Technical support can be requested as follows: Internet The AnaGate web site [http://www.anagate.de/en/index.html] of Analytica GmbH contains information and software downloads for AnaGate Library users: • Product updates featuring bug fixes or new features are available here free of charge.
Abbreviations I2C Inter-Integrated Circuit SCL Serial Clock Line SDA Serial DAta Line SPI Serial Peripheral Interface CLK Clock MISO Master In Slave Out SS Slave Select MOSI Master Out Slave In TRST Test Reset SRST Slave Reset JTAG Joint Test Action Group TDI Test Data Input TDO Test Data Output TMS Test Mode Select Input TCK Test Clock DHCP Dynamic Host Configuration Protocol 26 © 2007-2014 Analytica GmbH
Bibliography Books [LuaRef2006-EN] Roberto Ierusalimschy, Luiz Henrique Figueiredo, and Waldemar Celes. Copyright © 2006 R. Ierusalimschy, L. H. de Figueiredo, W. Celes. ISBN 85-903798-3-3. Lua.org. Lua 5.1 Reference Manual. [LuaProg2006-EN] Roberto Ierusalimschy. Copyright © 2006 Roberto Ierusalimschy, Rio de Janeiro. ISBN 85-903798-2-5. Lua.org. Programming in Lua (second edition). [LuaProg2013-EN] Roberto Ierusalimschy. Copyright © 2013 Roberto Ierusalimschy, Rio de Janeiro. ISBN 85-903798-5-X. Lua.org.