User Tools

Site Tools


ccgx:modbustcp_faq

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
ccgx:modbustcp_faq [2020-01-06 12:48] – [6. Error codes and trouble shooting] mvaderccgx:modbustcp_faq [2023-10-31 10:32] (current) jpasop
Line 1: Line 1:
-====== GX ModbusTCP Manual ======+====== GX Modbus-TCP Manual ======
  
 ==== 1. Introduction ==== ==== 1. Introduction ====
-ModbusTCP is a feature on our [[venus-os:start|GX devices]] eg [[https://www.victronenergy.com/panel-systems-remote-monitoring/colorcontrol|Color Control GX]], and also the [[https://www.victronenergy.com/panel-systems-remote-monitoring/venus-gx|Venus GX]].+Modbus-TCP is a feature on all our [[venus-os:start|GX devices]] eg [[https://www.victronenergy.com/panel-systems-remote-monitoring/cerbo-gx|Cerbo GX]], and [[https://www.victronenergy.com/panel-systems-remote-monitoring/venus-gx|Venus GX]].
  
-ModbusTCP is an industry standard protocol, that can be used to interface PLCs or other third party equipment with Victron products. Through the ModbusTCP interface you can read and write date to the chargers, battery monitors, inverter/chargers and other products connected to the GX device.+Modbus-TCP is an industry standard protocol, that can be used to interface PLCs or other third party equipment with Victron products. Through the Modbus-TCP interface you can read and write data to the chargers, battery monitors, inverter/chargers and other products connected to the GX device.
  
-Besides reading this GX ModbusTCP Manual, make sure to also read the ModbusTCP section in our  [[https://www.victronenergy.com/upload/documents/Whitepaper-Data-communication-with-Victron-Energy-products_EN.pdf|Data communication whitepaper]].+Besides reading this GX Modbus-TCP Manual, make sure to also read the Modbus-TCP section in our  [[https://www.victronenergy.com/upload/documents/Whitepaper-Data-communication-with-Victron-Energy-products_EN.pdf|Data communication whitepaper]].
  
-By default, ModbusTCP is disabled. To enable it, go into the settings menu, scroll down to 'Services', and then enable the ModbusTCP service.+By default, Modbus-TCP is disabled. To enable it, go into the settings menu, scroll down to 'Services', and then enable the Modbus-TCP service.
  
 ==== 2. Addressing, Unit-ID and Registers ==== ==== 2. Addressing, Unit-ID and Registers ====
  
 === 2.1 Definitions === === 2.1 Definitions ===
-The ModbusTCP protocol has two fields for addressing. There is the Unit-id, also referred to as Address, Station address or Slave-address in some PLC software. And the other field is the Register address.+The Modbus-TCP protocol has two fields for addressing. There is the Unit-id, also referred to as Address, Station address or Slave-address in some PLC software. And the other field is the Register address.
  
-  * The **Unit-ID** is the device-selector: it tells the GX Device which connected device (ie. which charger, inverter, or battery-monitor) you want to read, or write from. The GX Device then acts as a ModbusTCP gateway.+  * The **Unit-ID** is the device-selector: it tells the GX Device which connected device (ie. which charger, inverter, or battery-monitor) you want to read, or write from. The GX Device then acts as a Modbus-TCP gateway.
   * The **Register Address** then determines the parameter to read or write: ie. voltage, or current, and so forth.   * The **Register Address** then determines the parameter to read or write: ie. voltage, or current, and so forth.
  
Line 28: Line 28:
 For the overall system data, look for com.victronenergy.system in the excel sheet, and use Unit-ID 100. For the overall system data, look for com.victronenergy.system in the excel sheet, and use Unit-ID 100.
  
-Note that both Unit-ID 0 and Unit-ID 100 map to the same internal address. We recommend to use ID 100, since many ModbusTCP clients and PLCs do not work with ID 0.+Note that both Unit-ID 0 and Unit-ID 100 map to the same internal address. We recommend to use ID 100, since many Modbus-TCP clients and PLCs do not work with ID 0.
  
 === 2.3 Register addresses === === 2.3 Register addresses ===
Line 57: Line 57:
 (1): These are the auxiliary temperature sensors built-in to our GX devices, such as the Venus GX. For details, see [[venus-os:start|the GX devices datasheet]]. Battery temperatures as measured by an Inverter/charger, Charger or Solar Charger are available together with the rest of that device's data, not under com.victronenergy.temperature. (1): These are the auxiliary temperature sensors built-in to our GX devices, such as the Venus GX. For details, see [[venus-os:start|the GX devices datasheet]]. Battery temperatures as measured by an Inverter/charger, Charger or Solar Charger are available together with the rest of that device's data, not under com.victronenergy.temperature.
  
-==== 3. Supported ModbusTCP function codes ====+==== 3. Supported Modbus-TCP function codes ====
  
 The supported function codes are: The supported function codes are:
Line 69: Line 69:
 ==== 5. Mapping example ====  ==== 5. Mapping example ==== 
 The purpose of this example is to show how to interpret the information in the worksheets of the  The purpose of this example is to show how to interpret the information in the worksheets of the 
-excel sheet containing the modbustcp mapping. This excel sheet is available for download from our website on the [[https://www.victronenergy.com/panel-systems-remote-monitoring/color-control#whitepapers|Color Control page]].+excel sheet containing the Modbus-TCP mapping. This excel sheet is available for download from our website on the [[https://www.victronenergy.com/panel-systems-remote-monitoring/color-control#whitepapers|Color Control page]].
  
-To request the input voltage of a Multi or Quattro, connected to the VE.Bus sockets on the CCGX, use the following settings: Unit-ID 246, and set the data address of the first request register to 3. +To request the input voltage of a Multi or Quattro, connected to the VE.Bus sockets on the GX device, use the following settings: Unit-ID 246, and set the data address of the first request register to 3. 
  
-The ModbusTCP reply will contain 2302. Divide it by 10, as specified in cell E3, and then you have the voltage: 230.2 Volts AC.+The Modbus-TCP reply will contain 2302. Divide it by 10, as specified in cell E3, and then you have the voltage: 230.2 Volts AC.
  
 ==== 6. Error codes and trouble shooting ==== ==== 6. Error codes and trouble shooting ====
Line 83: Line 83:
 Besides double checking the mapping, there are two ways to see where the error lies. One is to check the last error as shown in the GX Device menus. And secondly you can look at the error code as is visible on (most but not all) PLCs. See the two sections below for details. Besides double checking the mapping, there are two ways to see where the error lies. One is to check the last error as shown in the GX Device menus. And secondly you can look at the error code as is visible on (most but not all) PLCs. See the two sections below for details.
  
-=== 6.2 Looking up the last ModbusTCP Error on the GX Device===+=== 6.2 Looking up the last Modbus-TCP Error on the GX Device===
  
-To see why a certain register is not available, use the Settings -> Services -> ModbusTCP menu. It shows the last error, and reason for that error.+To see why a certain register is not available, use the Settings -> Services -> Modbus-TCP menu. It shows the last error, and reason for that error.
  
-TODO ADD PICTURE+{{ :ccgx:modbus-tcp-error.png?nolink |}}
  
 === 6.3 Error codes === === 6.3 Error codes ===
Line 95: Line 95:
 ^Code^Name^Description^ ^Code^Name^Description^
 |0x01|IllegalFunction|The requested function is not supported.| |0x01|IllegalFunction|The requested function is not supported.|
-|0x02|IllegalDataAddress|The Unit-ID is available, but one or more of the requested register(s) does not exist.|+|0x02|IllegalDataAddress|The requested Unit-ID is available, but one or more of the requested register(s) does not exist.|
 |0x03|IllegalDataValue|The requested quantity of registers is invalid. See the modbus specs, http://www.modbus.org/specs.php, for the limits per function code.| |0x03|IllegalDataValue|The requested quantity of registers is invalid. See the modbus specs, http://www.modbus.org/specs.php, for the limits per function code.|
-|0x0A|GatewayPathUnavailable|Unit-ID is defined in the mapping list, but there is no device found on the mapped port. Double check the Unit-ID mapping list in the excel sheet, and make sure that the device is properly connected to the CCGX, switched on, and that its data is available on the CCGX display.|+|0x0A|GatewayPathUnavailable|The requested Unit-ID is defined in the mapping list, but there is no device found on the mapped port. Double check the Unit-ID mapping list in the excel sheet, and make sure that the device is properly connected to the GX device, switched on, and that its data is available on the GX device display.|
 |0x0B|GatewayTargetDeviceFailedToRespond|Requested Unit-ID not found in the mapping list. Double check the Unit-ID mapping list in the excel sheet.| |0x0B|GatewayTargetDeviceFailedToRespond|Requested Unit-ID not found in the mapping list. Double check the Unit-ID mapping list in the excel sheet.|
  
Line 103: Line 103:
 ==== 7. Support ==== ==== 7. Support ====
  
-The recommended method for report on ModbusTCP questions is to use the [[https://community.victronenergy.com/spaces/31/index.html|Modifications section on Victron Community]]. Its frequently visited by many people using ModbusTCP and other methods of integrating with Victron products.+The recommended method for support on Modbus-TCP questions is to use the [[https://community.victronenergy.com/spaces/31/index.html|Modifications section on Victron Community]]. Its frequently visited by many people using Modbus-TCP and other methods of integrating with Victron products.
  
 Direct company support is only offered on a limited basis. For such support, contact our Victron representative. Direct company support is only offered on a limited basis. For such support, contact our Victron representative.
Line 109: Line 109:
 ==== 8. FAQ ==== ==== 8. FAQ ====
  
-=== Q1: Which products can be interfaced via Modbus TCP? ===+=== Q1: Which products can be interfaced via Modbus-TCP? ===
 All products that can be connected to the [[https://www.victronenergy.com/panel-systems-remote-monitoring/color-control|Color Control GX]]. All products that can be connected to the [[https://www.victronenergy.com/panel-systems-remote-monitoring/color-control|Color Control GX]].
  
Line 124: Line 124:
 === Q5: In a parallel or three-phase system, how can I address a single unit? === === Q5: In a parallel or three-phase system, how can I address a single unit? ===
  
-You cannot interface with them individually if they are configured for parallel-working; or as a three-phase system. Neither is it necessary to address units individually as ModbusTCP provides system-totals as well as 'per phase' information.+You cannot interface with them individually if they are configured for parallel-working; or as a three-phase system. Neither is it necessary to address units individually as Modbus-TCP provides system-totals as well as 'per phase' information.
  
 === Q6: Will unit-id's change after a reboot or loss of power? === === Q6: Will unit-id's change after a reboot or loss of power? ===
Line 133: Line 133:
  
  
-If all unit-id's and register-addresses have been checked and re-checked, and still the connection doesn't work, you could try looking at the modbustcp log file on the [[venus-os:start|GX device]]. +If all unit-id's and register-addresses have been checked and re-checked, and still the connection doesn't work, you could try looking at the Modbus-TCP log file on the [[venus-os:start|GX device]]. 
  
 Follow these steps: Follow these steps:
Line 139: Line 139:
   - Login with SSH (use for example Putty in Windows - or simply type //ssh root@[ip address here]// on a Linux or Mac terminal console.   - Login with SSH (use for example Putty in Windows - or simply type //ssh root@[ip address here]// on a Linux or Mac terminal console.
   - List the latest log file:<code>   - List the latest log file:<code>
-cat /log/dbus-modbustcp/current | tai64nlocal+cat /var/log/dbus-modbustcp/current | tai64nlocal
 </code> </code>
  
Line 148: Line 148:
   2016-01-08 16:34:24.753921500  INFO 2016-01-08T16:34:24.753 [Server] Disconnected:  "141.138.140.60:41792"   2016-01-08 16:34:24.753921500  INFO 2016-01-08T16:34:24.753 [Server] Disconnected:  "141.138.140.60:41792"
  
-In most cases the problem will be found in either the unit's id address; or the register addresses. Double check the numbers shown in the output with the numbers as used in your modbustcp software or PLC.+In most cases the problem will be found in either the unit's id address; or the register addresses. Double check the numbers shown in the output with the numbers as used in your Modbus-TCP software or PLC.
  
-=== Q8: Does Modbus TCP support ESS? ===+=== Q8: Does Modbus-TCP support ESS? ===
  
 Yes. See the [[https://www.victronenergy.com/live/ess:ess_mode_2_and_3|ESS mode 2 and 3 manual]] for more details. Yes. See the [[https://www.victronenergy.com/live/ess:ess_mode_2_and_3|ESS mode 2 and 3 manual]] for more details.
  
  
ccgx/modbustcp_faq.1578311296.txt.gz · Last modified: 2020-01-06 12:48 by mvader

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki