Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
<component_template config_version="1.0" schema_version="1.0">
  <description>template_Adam_4051</description> 											# This is the general description respectivly the name of the Template.
  <vendor>azeti</vendor> 
  <version>2</version> 
  <class>multi-sensor</class>
    <sensors>
        <sensor sensor_id="DI00"> 															# This is the name of the sensor as it will be shown in the Dashboard.
        .
		.
		.
		 </sensor>
		.
		.
		.
	<devices>
		<device device_id="ADAM-4051">														# Name of the device.				
      		<modbus_device pdu_addressing="false">											# Wheter or not, PDU addressing is turned on or off. Respectively if the register starts from 0 (true) or 1 (false).
                <modbus_rtu>																# What ModBus type we are using. Possible options are ModBusRTU and ModBusTCP.
                    <daemon_id>0</daemon_id>												# This is the serial interface to be used, configurable in the SiteController.cfg (See Link below).
                    <data_bits>8</data_bits>												# Databits used by the device (default is 8).
                    <stop_bits>1</stop_bits>												# Stopbits used by the device (default is 1).
                    <baud_rate>9600</baud_rate>												# Baudrate used by the device.
                    <parity>none</parity>													# Parity used by the device.
                    <slave_address>1</slave_address>										# Slave address used by the device.
                </modbus_rtu>
            </modbus_device>
            <sensor_gateways>
                <sensor_gateway sensor_gateway_id="ADAM-4051" publish_strategy="on_change">	# Here we define the name of the gateway, so the sensor knows which one to use.
                    <modbus>																# In some cases, it is required to use multiple gateways. Exmaple below.
                        <modbus_register>
                            <register_address>1</register_address>							# This is the the first register address of the device.
                            <register_count>16</register_count>								# Here we tell the system, how many registers the device has. In this case 16, because the Adam has 16 inputs.
                            <block_type>coils</block_type>									# Here we define what kind of type these registers are (Ex. coils, holding registers, input registers).
                        </modbus_register>
                        <scheduling>
                            <polling_interval>200</polling_interval>						# Here we define how often the registers should be polled. The value 200, is equal to 0.2 seconds.
                            <error_handling>
                                <retry retry_algorithm="linear"/>
                            </error_handling>
                        </scheduling>
                    </modbus>
                </sensor_gateway>
            </sensor_gateways>	
		</device> 
    </devices>
</component_template>

Example of a ModBusTCP configuration - IFM AY1020

Here we have an example of a ModBusTCP configuration, using a IFM AY1020 IO-Link Master

Code Block
<component_template config_version="1.0" schema_version="1.0">
  <description>template_AY1020</description> 											# This is the general description respectivly the name of the Template.
  <vendor>azeti</vendor> 
  <version>2</version> 
  <class>multi-sensor</class>
    <sensors>
        <sensor sensor_id="AY1020-Port1-Bit0"> 															# This is the name of the sensor as it will be shown in the Dashboard.
        .
		.
		.
		 </sensor>
		.
		.
		.
	<devices>
		<device device_id="AY1020-IOLink-Master">											# Name of the device.
    		<modbus_device pdu_addressing="true">
      			<modbus_tcp>																# Definition of the ModBus typ we are using.
        			<address>192.168.118.64</address>										# IP address of the ModBus device.
          			<port>502</port>														# Port of the device (default ist 502).
          			<slave_address>1</slave_address>										# Slave address of the device.
        		</modbus_tcp>
      		</modbus_device>
      	<sensor_gateways>
      		<sensor_gateway publish_strategy="always" sensor_gateway_id="gw_AY1020-Port1">	# Here we define the name of the gateway, so the sensor knows which one to use.
        		<modbus>
          			<modbus_register>
            			<register_address>1000</register_address>							# This is the the first register address of the device.
              			<register_count>3</register_count>									# Here we tell the system, how many registers the device has.
              			<block_type>holding_registers</block_type>							# Here we define what kind of type these registers are (Ex. coils, holding registers, input registers).
              			<timeout>1000.0</timeout>											# Timeout value (1000 equals 1 second).
            		</modbus_register>
            		<scheduling>
            			<polling_interval>1000</polling_interval>							# Here we define how often the registers should be polled. The value 1000, is equal to 1 second.
              			<error_handling>
              			<retry retry_algorithm="linear"/>
                			<fixed_timeout>1000</fixed_timeout>
              			</error_handling>
            		</scheduling>
          		</modbus>
        	</sensor_gateway>
        <sensor_gateway publish_strategy="always" sensor_gateway_id="gw_AY1020-Port2">
        		<modbus>
          			<modbus_register>
            			<register_address>1000</register_address>
              			<register_count>3</register_count>
              			<block_type>holding_registers</block_type>
              			<timeout>1000.0</timeout>
            		</modbus_register>
            		<scheduling>
            			<polling_interval>1000</polling_interval>
              			<error_handling>
              			<retry retry_algorithm="linear"/>
                			<fixed_timeout>1000</fixed_timeout>
              			</error_handling>
            		</scheduling>
          		</modbus>
        	</sensor_gateway>
        	.
			.
        	.
            </sensor_gateways>	
		</device> 
    </devices>
</component_template>

Example of a ModBusTCP configuration - B&R X20BC0087

Here we have an example of a ModBusTCP configuration, using a B&R X20BC0087 ModBusTCP device.

...