Schneider Optics Modicon Quantum Ethernet manual Ethernet Developers Guide

Page 85

Ethernet Developers Guide

The receive state machine maintains a variable which is the number of bytes received. Initially the receive state machine is in the RX_HEADER state, and the number of bytes received is zero.

When OnTcpIpRead is called and the receive state is RX_HEADER OnTcpIpRead calls rx_msg with receive size equal to the header size. On return OnTcpIpRead examines the number of bytes received. If the number of bytes received is not equal to the header size, then receive machine remains in the RX_HEADER state, and OnTcpIpRead returns.

If upon return, the number bytes received is the same size as the header size, then the header has been received. OnTcpIpRead sets the number of bytes received to zero, and the receive size is obtained from the header. These two values will be used the next time rx_msg is called. OnTcpIpRead also obtains the transaction identifier and the protocol type from the header. If the transaction identifier matches the transmit request identifier and the protocol type is MODBUS, then OnTcpIpRead changes the receive state to RX_BODY. However if either transaction identifier does not match or the protocol is not MODBUS, then OnTcpIpRead changes the receive state to DUMP_BODY.

When OnTcpIpRead is called and the receive state is RX_BODY, OnTcpIpRead calls rx_msg with receive size equal to the value obtained from the header. On return OnTcpIpRead examines the number of bytes received. If the number of bytes received is not equal to the receive size, then the receive machine remains in the RX_HEADER state, and OnTcpIpRead returns.

If upon return the number of bytes received is the same as the receive size, then OnTcpIpRead has read the response to a transaction. OnTcpIpRead saves the results and invalidates the client area which causes the results to be display. OnTcpIpRead also changes the transmit state to WAIT_TO_TX, and resets the state receive state machine by setting the state to RX_HEADER and the number of bytes received to zero. It then returns.

When OnTcpIpRead is called and the receive state is DUMP_BODY, OnTcpIpRead calls rx_msg with receive size equal to the value obtained from the header. On return OnTcpIpRead examines the number of bytes received. If the number of bytes received is not equal to the receive size, then the receive machine remains in the RX_HEADER state, and OnTcpIpRead returns.

If upon return the number of bytes received is the same as the receive size, the OnTcpIpRead has completed reading the message. Since this message does not correspond to an transaction, the only processing OnTcIpRead performs is resetting the receive state machine.

840 USE 115 00 Version 1.0

75

Image 85
Contents USE 115 00 Version Modicon Quantum EthernetTraining USE 115 00 Vesion Modicon Quantum EthernetOctober Document Set Preface USE 115 00 Version Contents Chapter Maintenance Using the Network Options Ethernet TesterMstr Instruction Retrieving Data via the World Wide WebAppendix D Suppliers Glossary Index Appendix a SpecificationsContents Viii About This Book Document Scope Related Documentation Validity NoteBenefits of Quantum Design Introduction Ethernet Web Embedded Server ModulesType of Cable Network Part Number Models for Fiber Optic and Twisted Pair Cable SystemsRemovable Door Front Panel Components140 NOE 251 LED Display Color Indication When OnEthernet Address LabelsAddress Label Internet Protocol IP Network Address LabelLocate the global address label on Example Calculating the Derived IP Network AddressFront panel of the module 0 B 7 2 aFiber Optic Connectors Twisted Pair ConnectorTransmit Data Network Options Ethernet Tester Utility DisketteErrlog Meeting the Demands of Your Application Ethernet and Your ApplicationGuidelines for Designing Your Network CompatibilityUsing Switches DelaysSegregating TrafficVerifying the Default Configuration Installing and Configuring Module Before You BeginImproper Network Topologies Verifying that the Network Has Been Constructed ProperlyAre You Really Ready to Install? Check Installing the ModuleMounting the Module on the Backplane With connectors 990 XCA 656 Connecting the CableTwisted Pair Snap into placeAttaching the Cable Configuring the Module with Modsoft Changing the Default ConfigurationAssigning a Slot Number Selecting the Ethernet Framing TypeResetting the Module Assigning the Default Gateway Address and Subnet MaskAssigning the IP Network Address Configuring More Than One Ethernet Module Parameter Dialog for an Ethernet Web Embedded Server Module Configuring the Module with ConceptMstr Description Mstr Instruction IntroductionMstr Operation Code TCP/IP Ethernet Support Size CharacteristicsCompatibility Opcode BF hexRepresentation ContentInputs OutputsError Codes Mstr Function Error CodesMiddle Node Bottom NodeSs Hex value Meaning Hex Error Code MeaningHex Error Code Meaning 5016 An argument is valid Control Block Read and Write Mstr OperationsUtilization Information as described in the following tableStatistics information as described in the following table Get Local Statistics Mstr OperationGet Remote Statistics Mstr Operation Clear Local Statistics Mstr OperationClear Remote Statistics Mstr Operation Peer Cop Peer Cop Health Mstr OperationCommunications Health StatusStatus Index Type WordRead CTE Config Extension Table Mstr Operation Reset Option Module Mstr OperationModule information as described in the following table CTE Display Parameter Register ContentImplementation Registers. The registers display the following CTE dataWrite CTE Config Extension Table Mstr Operation Word Meaning 13 TCP/IP Ethernet StatisticsRetrieving Data via the World Wide Web Introduction Web Utility Home Accessing the Web Utility HomeQuantum Web Utility Web Utility for QuantumRetrieving Data via the World Wide Web Using the Network Options Ethernet Tester Introduction Establishing a Connection with an Ethernet Module Installing the Network Options Ethernet TesterMain Menu Get Statistics Box Getting and Clearing StatisticsSample Statistics MAC AddressUsing the Network Options Ethernet Tester Read Register Box Reading and Writing RegistersWrite Register Box Detecting Errors Maintenance Responding to ErrorsReady LED Active LEDLink LED Fault LEDKernel LED LED Display for Improperly Connected Twisted Pair Cable Collision LEDApplication LED Reading and Clearing the Error LogEBX, EBP, ESI, EDI, ESP, EFLAGS, EIP Default is Example Errlog 49To restart the controller, type Y Example Sample Error LogHot Swapping An Ethernet Module From the Device to Download menu, select Local Head Downloading a New Software ImageUSE 115 00 Version Power Dissipation Bus Current Required Operating Conditions SpecificationsCommunication Ports Storage ConditionsSpecifications References Ethernet Developers Guide IntroductionDevelopment Environment OverviewClass Descriptions CSampledoc Class CSampleView Class Accessing TCP/IPEvent Description Network Event Member Function Application Message FormatTransaction Processing TimersTransmit State Machine Exists the loop Receive State Machine Ethernet Developers Guide Displaying on the Screen Quantum Ethernet TCP/IP Modbus Application Protocol Includes the dstid and data fields Modbus Application Protocol PDUIs defined below Counts and data offsetsModbus Application Protocol Service Classes Modbus Application Protocol PDU Analysis Quantum Ethernet TCP/IP Modbus Application Protocol Broadcast/Multicast TCP/IP Specific IssuesTCP Port Number Reference Documents Quantum Ethernet TCP/IP Modbus Application Protocol Suppliers Suppliers Address GlossaryBps BridgeField Default gatewayFrame Framing typesInternet HubIP Address IO MapPacket OSI modelPort ProtocolSocket SwitchStack SubnetGlossary Index Index Network Options Ethernet Tester World Wide Web server Mstr