<?xml version = "1.0" encoding = "UTF-8"?>

<!--FDT communication schema for Modbus protocol V1.0-->
<!--This schema describes all Modbus services which are defined in the Modbus Application Protocol Specification V1.1a from 4 June 2004 -->
<!--Due to the ongoing standardisation process in the CIA Group to specify the encapsulation of the CanOpen protocol in Modbus -->
<!--it was abstained to describe the Modbus service 0x2B/0x0D  -->

<Schema name = "FDTModbusCommunicationSchema"
	xmlns = "urn:schemas-microsoft-com:xml-data"	 
	 xmlns:dt = "urn:schemas-microsoft-com:datatypes"
	xmlns:fdt = "x-schema:FDTDataTypesSchema.xml"
	xmlns:mb = "x-schema:FDTModbusAddressSchema.xml">

	<AttributeType name = "schemaVersion" dt:type = "number" default = "1.0"/>
	<AttributeType name = "communicationReference" dt:type = "uuid"/>
	
	
	<!--Modbus protocol parameters-->

	<!--ModbusException response-->
	<AttributeType name = "modbusService" dt:type = "enumeration" dt:values = "ReadCoils ReadDiscreteInputs ReadHoldingRegisters ReadInputRegisters WriteSingleCoil WriteSingleRegister ReadExceptionStatus Diagnostics GetCommEventCounter GetCommEventLog WriteMultipleCoils WriteMultipleRegisters ReportSlaveID ReadFileRecord WriteFileRecord MaskWriteRegister ReadWriteRegisters ReadFifoQueue EncapsulatedInterfaceTransport ReadDeviceIdentification PrivateModbus"/>
	<AttributeType name = "modbusExceptionCode" dt:type = "bin.hex" dt:minLength = "1"/>

	<!--Read/Write Data attributes-->	
	<AttributeType name = "outputAddress" dt:type = "ui2"/>
	<AttributeType name = "startAddress" dt:type = "ui2"/>
	<AttributeType name = "quantity" dt:type = "ui2"/>
	<AttributeType name = "multipleCoilValues" dt:type = "string" dt:minLength = "1" dt:maxLength = "2000"/>
	<AttributeType name = "discreteInputsStatus" dt:type = "string" dt:minLength = "1" dt:maxLength = "2000"/>
	<AttributeType name = "registerValues" dt:type = "bin.hex" dt:minLength = "2" dt:maxLength = "250"/>
	<AttributeType name = "singleCoilValue" dt:type = "boolean"/>
	<AttributeType name = "singleRegister" dt:type = "bin.hex" dt:maxLength = "2" dt:minLength = "2"/>
	<!-- Diagnostic services attributes-->
	<AttributeType name = "exceptionStatus" dt:type = "bin.hex" dt:maxLength = "1" dt:minLength = "1"/>
	<AttributeType name = "commStatus" dt:type = "bin.hex" dt:maxLength = "2" dt:minLength = "2"/>
	<AttributeType name = "diagnosticsSubFct" dt:type = "bin.hex" dt:maxLength = "2" dt:minLength = "2"/>
	<AttributeType name = "diagnosticsData" dt:type = "bin.hex" dt:maxLength = "250" dt:minLength = "2"/>
	<AttributeType name = "data" dt:type = "bin.hex"/>
	<AttributeType name = "eventCount" dt:type = "bin.hex" dt:maxLength = "2" dt:minLength = "2"/>
	<AttributeType name = "messageCount" dt:type = "bin.hex" dt:maxLength = "2" dt:minLength = "2"/>
	<AttributeType name = "events" dt:type = "bin.hex"/>
	<!-- Read/Write File Record attributes-->
	<AttributeType name = "referenceType" dt:type = "bin.hex" dt:maxLength = "1" dt:minLength = "1"/>
	<AttributeType name = "fileNumber" dt:type = "bin.hex" dt:maxLength = "2" dt:minLength = "2"/>
	<AttributeType name = "recordNumber" dt:type = "bin.hex" dt:maxLength = "2" dt:minLength = "2"/>
	<AttributeType name = "recordData" dt:type = "bin.hex" dt:minLength = "2"/>
	<!-- Mask Write Register attributes-->
	<AttributeType name = "referenceAddress" dt:type = "ui2"/>
	<AttributeType name = "andMask" dt:type = "bin.hex" dt:maxLength = "2" dt:minLength = "2"/>
	<AttributeType name = "orMask" dt:type = "bin.hex" dt:maxLength = "2" dt:minLength = "2"/>
	<!-- Read/Write Registers attributes-->
	<AttributeType name = "readStartAddress" dt:type = "ui2"/>
	<AttributeType name = "readRegisterValues" dt:type = "bin.hex" dt:minLength = "2" dt:maxLength = "250"/>
	<AttributeType name = "readQuantity" dt:type = "ui2"/>
	<AttributeType name = "writeStartAddress" dt:type = "ui2"/>
	<AttributeType name = "writeRegisterValues" dt:type = "bin.hex" dt:minLength = "2" dt:maxLength = "242"/>
	<!-- Read FIFO Queue attributes -->
	<AttributeType name = "fifoPointerAddress" dt:type = "ui2"/>
	<AttributeType name = "fifoRegisterValues" dt:type = "bin.hex" dt:minLength = "2" dt:maxLength = "62"/>
	<!-- Encapsulated Interface Transport attributes -->
	<AttributeType name = "meiType" dt:type = "bin.hex" dt:maxLength = "1" dt:minLength = "1"/>
	<AttributeType name = "meiData" dt:type = "bin.hex" dt:minLength = "1" dt:maxLength = "251"/>
	<!-- Device identification attributes-->
	<AttributeType name = "readDeviceIdCode" dt:type = "ui1"/>
	<AttributeType name = "objectId" dt:type = "bin.hex" dt:minLength = "1" dt:maxLength =" 1"/>
	<AttributeType name = "conformityLevel" dt:type = "bin.hex" dt:maxLength = "1" dt:minLength = "1"/>
	<AttributeType name = "moreFollows" dt:type = "boolean"/>
	<AttributeType name = "nextObjectId" dt:type = "bin.hex" dt:minLength = "1" dt:maxLength =" 1"/>
	<AttributeType name = "numberOfObjects" dt:type = "ui1"/>
	<AttributeType name = "objectValue" dt:type = "bin.hex" dt:minLength = "1" dt:maxLength = "244"/>
	<!-- Private Request attributes-->
	<AttributeType name = "privateRequest" dt:type = "bin.hex"/>
	<AttributeType name = "privateResponse" dt:type = "bin.hex"/>

	
	<ElementType name = "ConnectRequest" content = "eltOnly"  model = "closed">
    <attribute type="fdt:systemTag" required="yes"/>
		<group order = "one" maxOccurs="1" minOccurs="1">
			<element type = "mb:ModbusSerial"/>
			<element type = "mb:ModbusTCP"/>
		</group>
	</ElementType>

	<ElementType name = "ConnectResponse" content = "empty" model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
	</ElementType>

	<ElementType name = "DisconnectRequest" content = "empty" model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
	</ElementType>

	<ElementType name = "DisconnectResponse" content = "empty" model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
	</ElementType>
    
    <ElementType name="Abort" content="empty" model="closed">
        <attribute type="communicationReference" required="no"/>
    </ElementType>


	<!--Modbus Exception response-->

	<ElementType name = "ModbusExceptionRsp" content = "empty" model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
		<!--Applied Modbus service, which failed-->
		<attribute type = "modbusService" required = "yes"/>
		<!-- Modbus Exception code-->
		<attribute type = "modbusExceptionCode" required = "yes"/>
	</ElementType>


	
	<!--Definition of Modbus services-->
	
	
	<!-- 0x01 Read Coils -->
	
	<ElementType name = "ReadCoilsReq" content = "empty" model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
		<!-- Starting address: 0x0000 to 0xFFFF (2 bytes) -->
		<attribute type = "startAddress" required = "yes"/>
		<!--Quantity of coils: 0x0001 to 0x07D0 (2 bytes) -->
		<attribute type = "quantity" required = "yes"/>
	</ElementType>

	<ElementType name = "ReadCoilsRsp" content = "empty" model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
		<!-- Coil status: ASCII string with each coil state coded in one character ("1"==TRUE; "0"==FALSE) -->
		<attribute type = "multipleCoilValues" required = "yes"/>
	</ElementType>

	
	<!-- 0x02 Read Discrete Inputs -->
	
	<ElementType name = "ReadDiscreteInputsReq" content = "empty" model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
		<!-- Starting address: 0x0000 to 0xFFFF (2 bytes) -->
		<attribute type = "startAddress" required = "yes"/>
		<!-- Quantity of Inputs:  0x0001 to 0x07D0 (2 bytes)  -->
		<attribute type = "quantity" required = "yes"/>
	</ElementType>

	<ElementType name = "ReadDiscreteInputsRsp" content = "empty" model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
		<!-- Input status: ASCII string with each discrete input state coded in one character ("1"==TRUE; "0"==FALSE) -->
		<attribute type = "discreteInputsStatus" required = "yes"/>
	</ElementType>

	
	<!-- 0x03 Read Holding Registers -->
	
	<ElementType name = "ReadHoldingRegistersReq" content = "empty" model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
		<!-- Starting address:  0x0000 to 0xFFFF (2 bytes) -->
		<attribute type = "startAddress" required = "yes"/>
		<!-- Quantity of registers: 0x0001 to 0x007D (2 bytes) -->
		<attribute type = "quantity" required = "yes"/>
	</ElementType>

	<ElementType name = "ReadHoldingRegistersRsp" content = "empty" model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
		<!-- Register value: read holding register values -->
		<attribute type = "registerValues" required = "yes"/>
	</ElementType>

	
	<!-- 0x04 Read Input Registers -->
	
	<ElementType name = "ReadInputRegistersReq" content = "empty" model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
		<!-- Starting address: 0x0000 to 0xFFFF (2 bytes)-->
		<attribute type = "startAddress" required = "yes"/>
		<!-- Quantity of Input registers: 0x0001 to 0x007D (2 bytes) -->
		<attribute type = "quantity" required = "yes"/>
	</ElementType>

	<ElementType name = "ReadInputRegistersRsp" content = "empty" model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
		<!-- Input registers: read input register values -->
		<attribute type = "registerValues" required = "yes"/>
	</ElementType>

	
	<!-- 0x05 Write Single Coil -->
	
	<ElementType name = "WriteSingleCoilReq" content = "empty" model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
		<!-- Output address: 0x0000 to 0xFFFF (2 bytes) -->
		<attribute type = "outputAddress" required = "yes"/>
		<!-- Output value: boolean (1="true", 0=="false") -->
		<attribute type = "singleCoilValue" required = "yes"/>
	</ElementType>

	<ElementType name = "WriteSingleCoilRsp" content = "empty" model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
	</ElementType>

	
	<!-- 0x06 Write Single Register -->
	
	<ElementType name = "WriteSingleRegisterReq" content = "empty" model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
		<!-- Register address: 0x0000 to 0xFFFF (2 bytes)  -->
		<attribute type = "outputAddress" required = "yes"/>
		<!-- Register value: 0x0000 to 0xFFFF (2 bytes) -->
		<attribute type = "singleRegister" required = "yes"/>
	</ElementType>

	<ElementType name = "WriteSingleRegisterRsp" content = "empty" model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
	</ElementType>

	
	<!-- 0x07 Read Exception Status (serial line only!!) -->
	
	<ElementType name = "ReadExceptionStatusReq" content = "empty" model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
	</ElementType>

	<ElementType name = "ReadExceptionStatusRsp" content = "empty" model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
		<!-- Output data: 0x00 to 0xFF (1 byte) -->
		<attribute type = "exceptionStatus" required = "yes"/>
	</ElementType>
	

	<!-- 0x08 Diagnostics (serial line only!!) -->
	
	<ElementType name = "DiagnosticsReq" content = "empty" model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
		<!-- Sub-function -->
		<attribute type = "diagnosticsSubFct" required = "yes"/>
		<!-- Data: Nx2 bytes -->
		<attribute type = "diagnosticsData" required = "yes"/>
	</ElementType>

	<ElementType name = "DiagnosticsRsp" content = "empty" model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
		<!-- Sub-function -->
		<attribute type = "diagnosticsSubFct" required = "yes"/>
		<!-- Data: Nx2 bytes -->
		<attribute type = "diagnosticsData" required = "no"/>
	</ElementType>

	
	<!-- 0x0B Get Comm Event Counter (serial line only!!) -->
	
	<ElementType name = "GetCommEventCounterReq" content = "empty" model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
	</ElementType>

	<ElementType name = "GetCommEventCounterRsp" content = "empty" model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
		<!-- Status:  0x0000 to 0xFFFF (2 bytes) -->
		<attribute type = "commStatus" required = "yes"/>
		<!-- Event count: 0x0000 to 0xFFFF (2 bytes) -->
		<attribute type = "eventCount" required = "yes"/>
	</ElementType>

	
	<!-- 0x0C Get Comm Event Log (serial line only!!) -->
	
	<ElementType name = "GetCommEventLogReq" content = "empty" model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
	</ElementType>

	<ElementType name = "GetCommEventLogRsp" content = "empty" model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
		<!-- Status: 0x0000 to 0xFFFF (2 bytes) -->
		<attribute type = "commStatus" required = "yes"/>
		<!-- Event count: 0x0000 to 0xFFFF (2 bytes) -->
		<attribute type = "eventCount" required = "yes"/>
		<!-- Message count: 0x0000 to 0xFFFF (2 bytes) -->
		<attribute type = "messageCount" required = "yes"/>
		<!-- Events: (N-6) x 1 byte (2 bytes) -->
		<attribute type = "events" required = "no"/>
	</ElementType>

	
	<!-- 0x0F Write Multiple Coils -->
	
	<ElementType name = "WriteMultipleCoilsReq" content = "empty" model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
		<!-- Starting address: 0x0000 to 0xFFFF (2 bytes) -->
		<attribute type = "outputAddress" required = "yes"/>
		<!-- Outputs value: ASCII string with each coil state coded in one character ("1"==TRUE; "0"==FALSE) -->
		<attribute type = "multipleCoilValues" required = "yes"/>
	</ElementType>

	<ElementType name = "WriteMultipleCoilsRsp" content = "empty" model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
	</ElementType>

	
	<!-- 0x10 Write Multiple Registers -->
	
	<ElementType name = "WriteMultipleRegistersReq" content = "empty" model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
		<!-- Starting address: 0x0000 to 0xFFFF (2 bytes) -->
		<attribute type = "outputAddress" required = "yes"/>
		<!--Register value:  register values to write -->
		<attribute type = "registerValues" required = "yes"/>
	</ElementType>

	<ElementType name = "WriteMultipleRegistersRsp" content = "empty" model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
	</ElementType>

	
	<!-- 0x11 Report Slave ID (serial line only!!) -->
	
	<ElementType name = "ReportSlaveIDReq" content = "empty" model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
	</ElementType>

	<ElementType name = "ReportSlaveIDRsp" content = "empty" model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
		<!-- data: This attribute contains the Slave ID, the Run Indicator Status and -->
        <!-- the additional device specific data -->
        <!-- in the same format and order as defined in the Modbus specification -->
		<attribute type = "data" required = "yes"/>
	</ElementType>


	<!-- 0x14/0x06 Read File Record -->

	<!-- Definition of sub-request structure  -->

	<ElementType name = "ReadFileSubRequest" content = "empty" model = "closed">
		<!-- Sub-request x. reference type: must be 0x06  (1 byte) -->
		<attribute type = "referenceType" default="06" required = "yes"/>
		<!-- Sub-request x. File Number: 0x0000 to 0xFFFF (2 bytes) -->
		<attribute type = "fileNumber" required = "yes"/>
		<!-- Sub-request x. Record Number: 0x0000 to 0x270F (2 bytes) -->
		<attribute type = "recordNumber" required = "yes"/>
		<!-- Sub-request x. Register Length: N= 2 bytes (number of registers = record length) -->
		<attribute type = "quantity" required = "yes"/>
	</ElementType>

	<!-- Definition of main request structure  -->

	<ElementType name = "ReadFileRecordReq" content = "eltOnly"   model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
		<!-- Sub-request: see ReadFileSubRequest -->
		<element type= "ReadFileSubRequest" minOccurs="1" maxOccurs="*" />
	</ElementType>


	<!-- Definition of sub-response structure  -->

	<ElementType name = "ReadFileSubResponse" content = "empty" model = "closed">
		<!-- Sub-request x. Record Data: Nx2 bytes -->		
		<attribute type = "recordData" required = "yes"/>
	</ElementType>

	<!-- Definition of main response structure  -->

	<ElementType name = "ReadFileRecordRsp" content = "eltOnly" model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
		<!-- Sub-request: see ReadFileSubResponse -->
		<element type= "ReadFileSubResponse" minOccurs="1" maxOccurs="*" />
	</ElementType>


	<!-- 0x15/0x06 Write File Record -->

	<!-- Definition of sub-request structure  -->

	<ElementType name = "WriteFileSubRequest" content = "empty" model = "closed">
		<!-- Sub-request x. Reference Type: must be 0x06  (1 byte) -->
		<attribute type = "referenceType" default="06" required = "yes"/>	
		<!-- Sub-request x. File Number: 0x0000 to 0xFFFF (2 bytes) -->
		<attribute type = "fileNumber" required = "yes"/>
		<!-- Sub-request x. Record Number: 0x0000 to 0x270F (2 bytes) -->
		<attribute type = "recordNumber" required = "yes"/>
		<!-- Sub-request x. Record Data: Nx2 bytes -->		
		<attribute type = "recordData" required = "yes"/>
	</ElementType>

	<!-- Definition of main request structure  -->

	<ElementType name = "WriteFileRecordReq" content = "eltOnly"   model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
		<!-- Sub-request: see WriteFileSubRequest -->
		<element type= "WriteFileSubRequest" minOccurs="1" maxOccurs="*"/>
	</ElementType>


	<!-- Definition of main response structure  -->

	<ElementType name = "WriteFileRecordRsp" content = "empty" model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
	</ElementType>


	<!-- 0x16 Mask Write Register -->
	
	<ElementType name = "MaskWriteRegisterReq" content = "empty" model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
		<!-- Reference address: 0x0000 to 0xFFFF (2 bytes)  -->
		<attribute type = "referenceAddress" required = "yes"/>
		<!-- AND_Mask: 0x0000 to 0xFFFF (2 bytes) -->
		<attribute type = "andMask" required = "yes"/>
		<!-- OR_Mask: 0x0000 to 0xFFFF (2 bytes) -->
		<attribute type = "orMask" required = "yes"/>
	</ElementType>

	<ElementType name = "MaskWriteRegisterRsp" content = "empty" model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
	</ElementType>


	<!-- 0x17 Read/Write Registers -->
	
	<ElementType name = "ReadWriteRegistersReq" content = "empty" model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
		<!-- Read starting address: 0x0000 to 0xFFFF (2 bytes) -->
		<attribute type = "readStartAddress" required = "yes"/>
		<!-- Quantity to read: 0x0001 to 0x007D (2 bytes) -->
		<attribute type = "readQuantity" required = "yes"/>
		<!-- Write starting address: 0x0000 to 0xFFFF (2 bytes) -->
		<attribute type = "writeStartAddress" required = "yes"/>
		<!-- Write register values: register values to write -->
		<attribute type = "writeRegisterValues" required = "yes"/>
	</ElementType>

	<ElementType name = "ReadWriteRegistersRsp" content = "empty" model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
		<!-- Read register values: read register values -->
		<attribute type = "readRegisterValues" required = "yes"/>
	</ElementType>


	<!-- 0x17 Read Fifo Queue -->

	<ElementType name = "ReadFifoQueueReq" content = "empty" model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
		<!-- FIFO pointer address: 0x0000 to 0xFFFF (2 bytes) -->
		<attribute type = "fifoPointerAddress" required = "yes"/>
	</ElementType>

	<ElementType name = "ReadFifoQueueRsp" content = "empty" model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
		<!-- FIFO register values -->
		<attribute type = "fifoRegisterValues" required = "yes"/>
	</ElementType>


	<!-- 0x2B Encapsulated Interface Transport -->

	<ElementType name = "EncapsulatedInterfaceTransportReq" content = "empty" model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
		<!-- MEI type: (1 byte) -->
		<attribute type = "meiType" required = "yes"/>
		<!-- MEI type specific data: n bytes -->	
		<attribute type = "meiData" required = "yes"/>
	</ElementType>

	<ElementType name = "EncapsulatedInterfaceTransportRsp" content = "empty" model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
		<!-- MEI type: (1 byte) -->
		<attribute type = "meiType" required = "yes"/>
		<!-- MEI type specific data: n bytes -->	
		<attribute type = "meiData" required = "yes"/>
	</ElementType>


	<!-- 0x2B/0x0E Read Device Identification -->

	<!-- Definition of identification object structure -->

	<ElementType name = "IdentificationObject" content = "empty" model = "closed">
		<!-- Object ID:  (1 byte) -->	
		<attribute type = "objectId" required = "yes"/>
		<!-- Object Value -->	
		<attribute type = "objectValue" required = "yes"/>
	</ElementType>

	<!-- Definition of main request structure  -->

	<ElementType name = "ReadDeviceIdentificationReq" content = "empty" model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
		<!-- Read device ID code:  01 / 02/ 03 / 04 (1 byte) -->	
		<attribute type = "readDeviceIdCode" required = "yes"/>
		<!-- Object ID: first object to read  (1 byte) -->	
		<attribute type = "objectId" required = "yes"/>
	</ElementType>

	<!-- Definition of main response structure  -->

	<ElementType name = "ReadDeviceIdentificationRsp" content = "eltOnly" model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
		<!-- Read device ID code: 01 / 02/ 03 / 04 (1 byte) -->	
		<attribute type = "readDeviceIdCode" required = "yes"/>
		<!-- Conformity level: (1 byte) -->	
		<attribute type = "conformityLevel" required = "yes"/>
		<!-- More follows: boolean (1="true", 0=="false") -->	
		<attribute type = "moreFollows" required = "yes"/>
		<!-- Next object ID:  (1 byte)-->	
		<attribute type = "nextObjectId" required = "yes"/>
		<!-- Number of objects: number of identification objects returned in the response (1 byte)-->	
		<attribute type = "numberOfObjects" required = "yes"/>
		<!-- Identification object: see IdentificationObject -->	
		<element type= "IdentificationObject" minOccurs="1" maxOccurs="*"/>
	</ElementType>


	<!-- Private Modbus Request -->
	
	<ElementType name = "PrivateModbusReq" content = "empty" model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
		<!-- Private Modbus request coded as hexadecimal byte-array -->
		<attribute type = "privateRequest" required = "yes"/>
	</ElementType>

	<ElementType name = "PrivateModbusRsp" content = "empty" model = "closed">
		<attribute type = "communicationReference" required = "yes"/>
		<!-- Private Modbus response coded as hexadecimal byte-array -->
		<attribute type = "privateResponse" required = "yes"/>
	</ElementType>
    

	<!-- Unconfirmed Private Modbus Request -->

    <ElementType name = "UnconfirmedPrivateModbusReq" content = "empty" model = "closed">
        <attribute type = "communicationReference" required = "yes"/>
        <!-- Private Modbus request coded as hexadecimal byte-array -->
        <attribute type = "privateRequest" required = "yes"/>
    </ElementType>

    <ElementType name = "UnconfirmedPrivateModbusRsp" content = "empty" model = "closed">
        <attribute type = "communicationReference" required = "yes"/>
    </ElementType>




	<!-- Main FDT element -->

	<ElementType name = "FDT" content = "eltOnly" order = "one" model = "closed">
		<attribute type = "schemaVersion"/>
		<attribute type = "fdt:nodeId"/>
		<group order = "one" maxOccurs="1" minOccurs="1">
			<element type = "ConnectRequest" />
			<element type = "ConnectResponse" />
			<element type = "DisconnectRequest" />
			<element type = "DisconnectResponse" />
            <element type = "Abort" />
			<element type = "ModbusExceptionRsp"/>
			<element type = "ReadCoilsReq"/>
			<element type = "ReadCoilsRsp"/>
			<element type = "ReadDiscreteInputsReq"/>
			<element type = "ReadDiscreteInputsRsp"/>
			<element type = "ReadHoldingRegistersReq"/>
			<element type = "ReadHoldingRegistersRsp"/>
			<element type = "ReadInputRegistersReq"/>
			<element type = "ReadInputRegistersRsp"/>
			<element type = "WriteSingleCoilReq"/>
			<element type = "WriteSingleCoilRsp"/>
			<element type = "WriteSingleRegisterReq"/>
			<element type = "WriteSingleRegisterRsp"/>
			<element type = "ReadExceptionStatusReq"/>
			<element type = "ReadExceptionStatusRsp"/>
			<element type = "DiagnosticsReq"/>
			<element type = "DiagnosticsRsp"/>
			<element type = "GetCommEventCounterReq"/>
			<element type = "GetCommEventCounterRsp"/>
			<element type = "GetCommEventLogReq"/>
			<element type = "GetCommEventLogRsp"/>
			<element type = "WriteMultipleCoilsReq"/>
			<element type = "WriteMultipleCoilsRsp"/>
			<element type = "WriteMultipleRegistersReq"/>
			<element type = "WriteMultipleRegistersRsp"/>
			<element type = "ReportSlaveIDReq"/>
			<element type = "ReportSlaveIDRsp"/>
			<element type = "ReadFileRecordReq"/>
			<element type = "ReadFileRecordRsp"/>
			<element type = "WriteFileRecordReq"/>
			<element type = "WriteFileRecordRsp"/>
			<element type = "MaskWriteRegisterReq"/>
			<element type = "MaskWriteRegisterRsp"/>
			<element type = "ReadWriteRegistersReq"/>
			<element type = "ReadWriteRegistersRsp"/>
			<element type = "ReadFifoQueueReq"/>
			<element type = "ReadFifoQueueRsp"/>
			<element type = "EncapsulatedInterfaceTransportReq"/>
			<element type = "EncapsulatedInterfaceTransportRsp"/>
			<element type = "ReadDeviceIdentificationReq"/>
			<element type = "ReadDeviceIdentificationRsp"/>
			<element type = "PrivateModbusReq"/>
			<element type = "PrivateModbusRsp"/>
 			<element type = "UnconfirmedPrivateModbusReq"/>
			<element type = "UnconfirmedPrivateModbusRsp"/>               
			<element type = "fdt:CommunicationError"/> 
		</group>
	</ElementType>

</Schema>
