﻿<?xml version="1.0" encoding="utf-8"?>
<DeviceDescription xmlns="http://www.3s-software.com/schemas/DeviceDescription-1.0.xsd" xmlns:ts="http://www.3s-software.com/schemas/TargetSettings-0.1.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Types namespace="localTypes">
	<EnumType basetype="std:BYTE" name="LanIDType">
      <Enum identifier="LAN1">
        <Value>1</Value>
        <VisibleName name="local:LAN1">1</VisibleName>
      </Enum>
      <Enum identifier="LAN2">
        <Value>2</Value>
        <VisibleName name="local:LAN2">2</VisibleName>
      </Enum>
    </EnumType>
  </Types> 

  <Strings namespace="local">
    <Language lang="en">
      <String identifier="ModelName">ModbusTcpDevice</String>  
      <String identifier="DeviceDescription"></String>
      <String identifier="VendorName">HCFA</String>
      <String identifier="typedescription">HCFA modbus TCP device</String>
    </Language>
  </Strings>
  
  <Device hideInCatalogue="false">  
    <DeviceIdentification>
      <Type>32806</Type>
      <Id>16c7 0001</Id>  
      <Version>1.0.0.0</Version>   
    </DeviceIdentification>
    <DeviceInfo>
      <Name name="local:ModelName">ModbusTcpDevice</Name>  
      <Description name="local:DeviceDescription">HCFA modbus TCP device</Description>
      <Vendor name="local:VendorName">HCFA</Vendor>
      <OrderNumber>-</OrderNumber>  	 
    </DeviceInfo>
	
    <!--Child Connector Description,child connectors should always be defined as slot and the slot count must be 1--> 	  
    <Connector connectorId="1" moduleType="32806" interface="Common.PCI" role="child" explicit="false" hostpath="-1">
      <InterfaceName name="local:PCI">ModbusTcpDevice</InterfaceName>
      <Slot count="1" allowEmpty="false"></Slot>  
	  
	  <HostParameterSet> 
		  <Parameter ParameterId="41000" type="localTypes:LanIDType">
			<Attributes offlineaccess="readwrite" onlineaccess="read" download="true" functional="false" />
			<Default>1</Default>
			<Name name="local:Parameter.LanID">LanID</Name>
			<Description name="local:Parameter.LanID">Modbus tcp slave ip address is the port's ip which you select</Description>
		  </Parameter>
	  </HostParameterSet> 
	  
	  <DriverInfo needsBusCycle="false">
	    <RequiredLib libname="HCFAModbusLib" placeholderlib="HCFAModbusLib" vendor="HCFA" version="1.0.0.0">
	      <FBInstance basename="$(DeviceName)" fbname="MODBUSTCP_DeviceDiag"> 
		    <!--methodname为空时则调用功能块实例本身-->
		    <CyclicCall methodname="" task="#buscycletask" whentocall="BeforeReadInputs"/> 
		  </FBInstance>
	    </RequiredLib>
	  </DriverInfo>
    </Connector> 
  </Device>
 
</DeviceDescription>
