Schneider Optics Modicon Quantum Ethernet manual Displaying on the Screen

Page 86

Ethernet Developers Guide

The member function rx_msg calls the window socket recv function to read data. The recv function either returns a non negative number that is the number of bytes read or it returns an error. If the number bytes read is zero, then the connection no longer exits, and rx_msg closes the socket, and sets the transmit state to IDLE. If the recv function returns the error indicating that no receive data is available, then rx_msg just returns. For any other recv function error, rx_msg closes the socket, and sets the transmit state to IDLE.

B.12 Displaying on the Screen

CSample_View m_display member indicates the display type. The different types of the displays and the CSample_View member functions for showing the display are as follows.

1.Displaying the connection state. The different connection states displayed are IDLE, RESOLVING NAME, and CONNECTING. ConnPaint member function displays the connection state.

2.GetStatsPaint member function displays the results of a get statistics request.

3.ClearStatsPaint member function displays the results of a clear statisitics request.

4.ReadRegPaint member function displays the results of a read register request.

5.WriteRegPaint member function displays the results of a write register request.

MFC architectual framework calls CSample_View OnDraw member function to process the window WM_PAINT message. OnDraw examines m_display member variable and calls the corresponding member function described in the previous paragraph. Whenever CSample_View needs to display a result, it calls Cview Invalidate function which causes a WM_PAINT message.

CSample_View is derived from MFC CScrollView class. This class handles the scroll logic. To perform the scroll logic, CScrollView requires the size of the document. It is informed of the document size via its SetScrollSizes member function.

CSample_View UpdateScrollSizes member function based on the display type calculates the document size, and then calls SetScrollSizes. CSample_View calls UpdateScrollSizes when the display type changes or when the user changes the window size.

76

840 USE 115 00 Version 1.0

Image 86
Contents Modicon Quantum Ethernet USE 115 00 VersionTraining October Modicon Quantum EthernetUSE 115 00 Vesion Document Set Preface USE 115 00 Version Contents Mstr Instruction Using the Network Options Ethernet TesterChapter Maintenance Retrieving Data via the World Wide WebAppendix a Specifications Appendix D Suppliers Glossary IndexContents Viii About This Book Document Scope Validity Note Related DocumentationIntroduction Ethernet Web Embedded Server Modules Benefits of Quantum DesignModels for Fiber Optic and Twisted Pair Cable Systems Type of Cable Network Part NumberFront Panel Components Removable Door140 NOE 251 Color Indication When On LED DisplayAddress Label Address LabelsEthernet Internet Protocol IP Network Address LabelFront panel of the module Example Calculating the Derived IP Network AddressLocate the global address label on 0 B 7 2 aTransmit Data Twisted Pair ConnectorFiber Optic Connectors Errlog Utility DisketteNetwork Options Ethernet Tester Ethernet and Your Application Meeting the Demands of Your ApplicationCompatibility Guidelines for Designing Your NetworkSegregating DelaysUsing Switches TrafficInstalling and Configuring Module Before You Begin Verifying the Default ConfigurationVerifying that the Network Has Been Constructed Properly Improper Network TopologiesMounting the Module on the Backplane Installing the ModuleAre You Really Ready to Install? Check Twisted Pair Connecting the CableWith connectors 990 XCA 656 Snap into placeAttaching the Cable Changing the Default Configuration Configuring the Module with ModsoftSelecting the Ethernet Framing Type Assigning a Slot NumberAssigning the IP Network Address Assigning the Default Gateway Address and Subnet MaskResetting the Module Configuring More Than One Ethernet Module Configuring the Module with Concept Parameter Dialog for an Ethernet Web Embedded Server ModuleMstr Operation Code TCP/IP Ethernet Support Mstr Instruction IntroductionMstr Description Compatibility CharacteristicsSize Opcode BF hexInputs ContentRepresentation OutputsMiddle Node Mstr Function Error CodesError Codes Bottom NodeHex Error Code Meaning Ss Hex value MeaningHex Error Code Meaning 5016 An argument is valid Utilization Read and Write Mstr OperationsControl Block Information as described in the following tableGet Local Statistics Mstr Operation Statistics information as described in the following tableClear Local Statistics Mstr Operation Get Remote Statistics Mstr OperationClear Remote Statistics Mstr Operation Communications Peer Cop Health Mstr OperationPeer Cop Health StatusType Word Status IndexModule information as described in the following table Reset Option Module Mstr OperationRead CTE Config Extension Table Mstr Operation Implementation Parameter Register ContentCTE Display Registers. The registers display the following CTE dataWrite CTE Config Extension Table Mstr Operation 13 TCP/IP Ethernet Statistics Word MeaningRetrieving Data via the World Wide Web Introduction Accessing the Web Utility Home Web Utility HomeWeb Utility for Quantum Quantum Web UtilityRetrieving Data via the World Wide Web Using the Network Options Ethernet Tester Introduction Installing the Network Options Ethernet Tester Establishing a Connection with an Ethernet ModuleMain Menu Getting and Clearing Statistics Get Statistics BoxMAC Address Sample StatisticsUsing the Network Options Ethernet Tester Reading and Writing Registers Read Register BoxWrite Register Box Maintenance Responding to Errors Detecting ErrorsActive LED Ready LEDKernel LED Fault LEDLink LED Collision LED LED Display for Improperly Connected Twisted Pair CableReading and Clearing the Error Log Application LEDDefault is Example Errlog 49 EBX, EBP, ESI, EDI, ESP, EFLAGS, EIPExample Sample Error Log To restart the controller, type YHot Swapping An Ethernet Module Downloading a New Software Image From the Device to Download menu, select Local HeadUSE 115 00 Version Communication Ports SpecificationsPower Dissipation Bus Current Required Operating Conditions Storage ConditionsSpecifications Ethernet Developers Guide Introduction ReferencesOverview Development EnvironmentClass Descriptions CSampledoc Class Event Description Accessing TCP/IPCSampleView Class Application Message Format Network Event Member FunctionTimers Transaction ProcessingTransmit State Machine Exists the loop Receive State Machine Ethernet Developers Guide Displaying on the Screen Quantum Ethernet TCP/IP Modbus Application Protocol Is defined below Modbus Application Protocol PDUIncludes the dstid and data fields Counts and data offsetsModbus Application Protocol Service Classes Modbus Application Protocol PDU Analysis Quantum Ethernet TCP/IP Modbus Application Protocol TCP Port Number TCP/IP Specific IssuesBroadcast/Multicast Reference Documents Quantum Ethernet TCP/IP Modbus Application Protocol Suppliers Suppliers Bps GlossaryAddress BridgeFrame Default gatewayField Framing typesIP Address HubInternet IO MapPort OSI modelPacket ProtocolStack SwitchSocket SubnetGlossary Index Index Mstr Network Options Ethernet Tester World Wide Web server