EhLib 5 Developer’s guide 官方开发手册
- 格式:doc
- 大小:664.00 KB
- 文档页数:51
exoSip开发者手册exoSip 开发者手册1 扩展的eXosip协议栈1.1 如何初始化libeXosip2当使用eXosip时,你的首要任务是初始化eXosip上下文和libosip库(语法分析器和状态机)。
这是在使用libeXosip2之前一定要完成的。
includeint i;TRACE_INITIALIZE (6, stdout);i=eXosip_init();if (i!=0)return -1;//在特定的socket上监听i = eXosip_listen_addr (IPPROTO_UDP, NULL, port, AF_INET,0);if (i!=0){eXosip_quit();fprintf (stderr, "could not initialize transport layer\n");return -1;}…初始化之后就可以发送消息或者等待eXosip事件的到来…在前面的代码中,您学习了如何:初始化osip trace(用- DENABLE_TRACE编译此代码)初始化eXosip(和osip)堆栈为信号打开一个套接字(只有UDP要初始eXosip2)现在你要处理eXosip事件。
下面是一些来获得eXosip_event从在eXosip2堆栈的代码。
eXosip_event_t *je;for (;;){je = eXosip_event_wait (0, 50);eXosip_lock();eXosip_automatic_action ();eXosip_unlock();if (je == NULL)break;if (je->type == EXOSIP_CALL_NEW){........}else if (je->type == EXOSIP_CALL_ACK){........}else if (je->type == EXOSIP_CALL_ANSWERED) {........}else .............eXosip_event_free(je);你将为每个SIP消息的发送收到一个事件,每个事件包含。
Rev. 0.4 11/14Copyright © 2014 by Silicon LaboratoriesC8051F53x/52xEVELOPMENT IT SER S UIDE1. Relevant DevicesThe C8051F530 Development Kit is intended as a development platform for microcontrollers in the C8051F53x/52x MCU family. Code developed on the C8051F530 can be easily ported to the other members of this MCU family.2. Kit ContentsThe C8051F530 Development Kit contains the following items:⏹ C8051F530A Target Board⏹ C8051Fxxx Development Kit Quick-Start Guide ⏹ AC to DC Power Adapter⏹ USB Debug Adapter (USB to Debug Interface)⏹ USB CableThe development kit target board contains two C8051F530 microcontrollers that can communicate through an LIN network. One of the C8051F530 (U2) can also be connected to a CP2102 USB to UART bridge and directly connected to two analog signals and a Voltage Reference Signal Input.3. Hardware Setup Using a USB Debug AdapterThe target board is connected to a PC running the Silicon Laboratories IDE via the USB Debug Adapter as shown in Figure 1.1. Connect the USB Debug Adapter to one of the DEBUG connectors on the target board (HDR1 or HDR2) with the 10-pin ribbon cable. The recommended connection is to the HDR2 (connected to U2) as this microcontroller can be connected to the CP2102 USB to UART bridge.2. Verify that shorting blocks are installed on J13 and J14 to supply power to the target devices.3. Connect one end of the USB cable to the USB connector on the USB Debug Adapter.4. Connect the other end of the USB cable to a USB Port on the PC.5. Connect the ac/dc power adapter to power jack P5 on the target board.D 1D 2H H D 4C8051F53x/52xNotes:e the Reset button in the IDE to reset the target when connected using a USB Debug Adapter.2. Remove power from the target board and the USB Debug Adapter before connecting or disconnecting theribbon cable from the target board. Connecting or disconnecting the cable when the devices have power can damage the device and/or the USB Debug Adapter.4. Software SetupSimplicity Studio greatly reduces development time and complexity with Silicon Labs EFM32 and 8051 MCU products by providing a high-powered IDE, tools for hardware configuration, and links to helpful resources, all in one place.Once Simplicity Studio is installed, the application itself can be used to install additional software and documentation components to aid in the development and evaluation process.Figure 2.Simplicity StudioThe following Simplicity Studio components are required for the C8051F530 Development Kit:⏹ 8051 Products Part Support ⏹ Simplicity Developer PlatformDownload and install Simplicity Studio from /8bit-software or /simplicity-studio .Once installed, run Simplicity Studio by selecting Start →Silicon Labs →Simplicity Studio →Simplicity Studio from the start menu or clicking the Simplicity Studio shortcut on the desktop. Follow the instructions to install the software and click Simplicity IDE to launch the IDE.The first time the project creation wizard runs, the Setup Environment wizard will guide the user through the process of configuring the build tools and SDK selection.C8051F53x/52xIn the Part Selection step of the wizard, select from the list of installed parts only the parts to be used during development. Choosing parts and families in this step affects the displayed or filtered parts in the later device selection menus. Choose the C8051F53x/52x family by checking the C8051F53x/52x check box. Modify the part selection at any time by accessing the Part Management dialog from the Window →Preferences →Simplicity Studio →Part Management menu item.Simplicity Studio can detect if certain toolchains are not activated. If the Licensing Helper is displayed after completing the Setup Environment wizard, follow the instructions to activate the toolchain.4.1. Running BlinkyEach project has its own source files, target configuration, SDK configuration, and build configurations such as the Debug and Release build configurations. The IDE can be used to manage multiple projects in a collection called a workspace. Workspace settings are applied globally to all projects within the workspace. This can include settings,such as key bindings, window preferences, and code style and formatting options. Project actions, such as build and debug, are context-sensitive. For example, the user must select a project in the Project Explorer view in order to build that project.To create a project based on the Blinky example, perform the following steps:1. Click the Software Examples tile from the Simplicity Studio home screen.2. In the Kit drop-down, select C8051F530A Development Kit ; in the Part drop-down, select C8051F530, and in the SDK drop-down, select the desired SDK. Click Next .3. Select Example , and click Next .4. Under C8051F530A Development Kit , select F52x-53x Blinky ; click Next , and click Finish .5. Click on the project in the Project Explorer , and click Build (the hammer icon in the top bar). Alternatively, go to Project →Build Project .6. Click Debug to download the project to the hardware and start a debug session.7. Press the Resume button to start the code running. The LED should blink.8. Press the Suspendbutton to stop the code.9. Press the Reset the devicebutton to reset the target MCU.10. Press the Disconnectbutton to return to the development perspective.4.2. Simplicity Studio HelpSimplicity Studio includes detailed help information and device documentation within the tool. The help containsdescriptions for each dialog window. To view the documentation for a dialog, click the question mark icon in the window:This will open a pane specific to the dialog with additional details.The documentation within the tool can also be viewed by going to Help →Help Contents or Help →Search .C8051F53x/52x4.3. CP210x USB to UART VCP Driver InstallationThe Target Board includes a Silicon Labs CP210x USB-to-UART Bridge Controller. Device drivers for the CP210x need to be installed before the PC software can communicate with the MCU through the UART interface.1. After opening Simplicity Studio for the first time, a dialog will prompt to install the CP210x drivers. Click Yes . The drivers can also be installed at any time by going to Help →Install Drivers →CP210x VCP USB Drivers .2. Accept the license agreement and follow the steps to install the driver on the system. The installer will let you know when your system is up to date. The driver files included in this installation have been certified by Microsoft.3. To complete the installation process, connect the included USB cable between the host computer and the USB connector (P4) on the Target Board. Windows will automatically finish the driver installation. Information windows will pop up from the taskbar to show the installation progress.4. If necessary, the driver files can be uninstalled by selecting Windows Driver Package—Silicon Laboratories...option in the Programs and Features window.4.4. Configuration Wizard 2The Configuration Wizard 2 is a code generation tool for all of the Silicon Laboratories devices. Code is generated through the use of dialog boxes for each of the device's peripherals.Figure 3.Configuration Wizard 2 UtilityThe Configuration Wizard 2 utility helps accelerate development by automatically generating initialization source code to configure and enable the on-chip resources needed by most design projects. In just a few steps, the wizard creates complete startup code for a specific Silicon Laboratories MCU. The program is configurable to provide the output in C or assembly language. For more information, refer to the Configuration Wizard documentation.Documentation and software is available on the kit CD and from the downloads web page: /mcudownloads .C8051F53x/52x 5. Target BoardThe C8051F52xA-53xA Development Kit includes a target board with two C8051F530A devices preinstalled for evaluation and preliminary software development. Numerous input/output (I/O) connections are provided to facilitate prototyping using the target board. Refer to Figure4 for the locations of the various I/O connectors.Table 1. Target Board Part SummaryPart DescriptionP5 Power connector (Accepts input from 7 to 15VDC unregulated power adapter.)PWR Red Power-on LED (D3)TB1 LINconnectorU55V Voltage RegulatorA SideJ2 28-pin Expansion I/O connector for U2HDR2 Debug connector for Debug Adapter Interface(D2)P1.3_A GreenLEDbuttonReset_A ResetbuttonP1.4_A PushR32Potentiometer for P1.2_AJ6, J8Connects R32 (potentiometer) to U2 and +5 VJ13Connects power to U2J11, J12Connects external crystal to U2 pins P0.7_A and P1.0_AJ3 Connects analog channel 1 to U2 P1.6_AJ4 Connects analog channel 2 to U2 P1.7_AJ5 Connects VREFIN to U2 P0.0_AconnectorTB2 AnaloginputHDR4 Connector block for serial port connection, Green LED, and push-buttonU3Silicon Laboratories CP2102 USB-to-UART BridgeP1 USB connector to serial interface (CP2102)USB ACTIVE Red USB Active LED (D4) (CP2102)T2 LINtransceiverU2 C8051F530A “A” SideC8051F53x/52x5.1. Target Board Shorting Blocks: Factory DefaultsThe C8051F530A target board comes from the factory with preinstalled shorting blocks on many headers. Figure 4shows the positions of the factory default shorting blocks.B SideJ1 26-pin Expansion I/O connector for U1HDR1Debug connector for Debug Adapter InterfaceP1.3_B Green LED (D1)Reset_B Reset button P1.4_B Push button J14Connects power to U1J9, J10Connects external crystal to U1 pins P0.7_B and P1.0_B HDR3Green LED and push-button connector blockT1 LIN transceiver U1C8051F530A “B” SideTable 1. Target Board Part SummaryPart DescriptionP1.4_BPWRUSB ACTIVE P1.3_AP1.3_B D2D1D4Pin 1C8051F53x/52x5.2. System Clock SourcesThe C8051F530A device installed on the target board features a calibrated programmable internal oscillator that is enabled as the system clock source on reset. After reset, the internal oscillator operates at a frequency of 191.4kHz (±0.5%) by default but may be configured by software to operate at other frequencies. Therefore, in many applications, an external oscillator is not required. However, if you wish to operate the C8051F530A device at a frequency not available with the internal oscillator, an external crystal may be used. Refer to the C8051F52x/ 52xA/53x/53xA data sheet for more information on configuring the system clock source.The target board is designed to facilitate the installation of external crystals. Install the crystals at the pads marked Y1 or Y2. Install a 10M resistor at R17 or R22, and install capacitors at C29 and C30 or C34 and C35 using values appropriate for the crystals selected. Headers J9, J10, J11, and J12 connect the external crystal pins to the general purpose I/O headers (J1 and J2). If the external crystal is in use, these headers should not be populated. Refer to the C8051F52x/52xA/53x/53xA data sheet for more information on the use of external oscillators.5.3. Switches and LEDsFour switches are provided on the target board.Switch RESET_A is connected to the RESET pin of the C8051F530A A-Side (U2).Switch RESET_B is connected to the RESET pin of the C8051F530A B-Side (U1).Pressing RESET_A or RESET_B puts the attached device into its hardware-reset state.Switches P1.4_A and P1.4_B are connected to the C8051F530A parts (U1 and U2) general purpose I/O (GPIO) pins through headers. Pressing P1.4_A or P1.4_B generates a logic low signal on the port pin of the respective microcontroller.Remove the shorting block from the header to disconnect P1.4_A or P1.4_B from the port pins. The port pin signals are also routed to pins on the J1 and J2 I/O connectors. See Table2 for the port pins and headers corresponding to each switch.Four LEDs are also provided on the target board. The red LED labeled PWR is used to indicate a power connection to the target board. The green LEDs labeled D1 and D2 are connected to the C8051F530A's GPIO pins through headers. Remove the shorting blocks from the headers to disconnect the LEDs from the port pins. The port pin signals are also routed to pins on the J1 and J2 I/O connectors. The red LED labeled USB ACTIVE is used to indicate that the CP2102 USB-to-UART bridge is properly connected to a PC and is ready for communication. See Table2 for the port pins and headers corresponding to each LED.A potentiometer (R32) is provided on the target board. Header J8 connects the potentiometer to +5V, and header J6 connects the potentiometer to the P1.2_A pin of the U2 A-Side C8051F530A microcontroller.Table 2. Target Board I/O DescriptionsDescription I/O HeaderReset_A U2-Reset noneReset_B U1-Reset noneP1.4_A U2-P1.4HDR4[3–4]P1.4_B U1-P1.4HDR3[3–4]Green LED D2U2-P1.3HDR4[1–2]Green LED D1U1-P1.3HDR3[1–2]Red LED D3PWR noneRed LED D4USB ACTIVE nonePotentiometer R32U2-P1.2J6, J8C8051F53x/52x5.4. Expansion I/O Connectors (J1, J2)The two Expansion I/O connectors J1 (26pins) and J2 (28pins) provide access to all signal pins of the C8051F530A devices. Pins for V DD, GND, 5V, Reset, Vbat, LIN, 3.3V, and VREFIN are also available. A small through-hole prototyping area is also provided.All I/O signals routed to connectors J1 and J2 are also routed to through-hole connection points between J1 and J2 and the prototyping area (see Figure4). Each connection point is labeled indicating the signal available at the connection point. Table3 lists the pin descriptions for J1 and J2.Table 3. Pin Descriptions for J1 and J2J1J2Pin #Description Pin #Description Pin #Description Pin #Description 1P0.0_B14P1.5_B1P0.0_A15P1.6_A 2P0.1_B15P1.6_B2P0.1_A16P1.7_A 3P0.2_B16P1.7_B3P0.2_A17+5V4P0.3_B17+5V4P0.3_A18RST/C2CLK_A 5P0.4_B18RST/C2CLK_B5P0.4_A19VBAT 6P0.5_B19VBAT6P0.5_A20LIN7P0.6_B20LIN7P0.6_A21VREFIN 8P0.7_B21NC8P0.7_A22VREGOUT_A 9P1.0_B22VREGOUT_B9P1.0_A23+3.3V 10P1.1_B23NC10P1.1_A24NC11P1.2_B24NC11P1.2_A25NC12P1.3_B25GND12P1.3_A26NC13P1.4_B26GND13P1.4_A27GND14P1.5_A28GND5.5. Target Board DEBUG Interface (HDR1, HDR2)The DEBUG connectors (HDR1 and HDR2) provide access to the DEBUG (C2) pins of the C8051F530A parts. They are used to connect the USB Debug Adapter to the target board for in-circuit debugging and Flash programming. Table4 shows the DEBUG pin definitions.Table 4. DEBUG Connector Pin DescriptionsPin #Description1+3VD(+3.3VDC)2, 3, 9GND (Ground)4C2D5RST (Reset)6P0.67C2CK8Not Connected10USB PowerC8051F53x/52x5.6. USB to Serial Connector (P1, HDR4)A USB-to-Serial bridge interface is provided. A B-type USB connector (P1), a CP2102, and related circuits are provided to facilitate the serial connection between a PC and the U2 A-Side C8051F530A microcontroller on the target board. The RX, TX, CTS, and RTS signals of the UART side of the Bridge (CP2102) may be connected to the microcontroller by installing shorting blocks on HDR4 as shown in Table5.Table 5. UART ConnectionsHDR3Connection Signals5–6P0.4_A to TX_A7–8P0.5_A to RX_A9–10P1.1_A to RTS_A11–12P1.2_A to CTS_AThe BUS-Powered CP2102 uses the 5V provided by the USB interface.5.7. Analog I/O (TB2, J3, J4, J5)The Analog connector block (TB2) and headers J3, J4, and J5 provide Analog inputs to the C8051F530A (U2) as shown in Table6. Headers J3, J4, and J5 connect the inputs from the Analog connector to the microcontroller pins.Table 6. Analog I/O ConnectionsTB2Signal Connection I/O Shorting Block Vrefin External Reference Input or Internal Reference Output P0.0_A J5CH1Analog Input 1P1.6_A_MC J3CH2Analog Input 1P1.7_A_MC J4GND Ground GND—5.8. Power Supply Options (P5, TB1, J13, J14)The target board provides two options of power supply. The first option is to use the provided 9V power supply attached to the P5 connector. The second option is to use an external 12V (7.5V minimum) connected to the TB1 terminal block (pins 1 and 3).Headers J13 and J14 connect the +5V power supply to the VREGIN pins on U1 and U2. These headers can be populated to supply power directly or depopulated to measure the operating current drawn by the corresponding C8051F530A device.C8051F53x/52x5.9. LIN Connectivity (TB1)The C8051F530A Target Board has two C8051F530A devices (U1 and U2) and two LIN transceivers (T1 and T2) to provide LIN connectivity on the target board. These devices can also be interfaced to another LIN bus using the TB1 terminal block.Table 7. LIN ConnectionsTB1Signal Connection+12V Supplies 12V (7.5V minimum) to the target board. This can be connected to the power supply of another LIN bus or any external supply.LIN Connects the 12V LIN bus signal to the T1 and T2 LIN transceivers.GND GroundC8051F53x/52x6. SchematicsF i g u r e 5.C 8051F 530A T a r g e t B o a r d S c h e m a t i c (1 o f 3)C8051F53x/52xF i g u r e 6.C 8051F 530A T a r g e t B o a r d S c h e m a t i c (2 o f 3)C8051F53x/52xF i g u r e 7.C 8051F 530A T a r g e t B o a r d S c h e m a t i c (3 o f 3)C8051F53x/52xD OCUMENT C HANGE L IST Revision 0.2 to Revision 0.3⏹Updated for C8051F530A TB.⏹Added "LIN Connectivity (TB1)‚" on page 10. Revision 0.3 to Revision 0.4⏹Updated "Software Setup‚" on page 2.DisclaimerSilicon Laboratories intends to provide customers with the latest, accurate, and in-depth documentation of all peripherals and modules available for system and software implementers using or intending to use the Silicon Laboratories products. Characterization data, available modules and peripherals, memory sizes and memory addresses refer to each specific device, and "Typical" parameters provided can and do vary in different applications. Application examples described herein are for illustrative purposes only. Silicon Laboratories reserves the right to make changes without further notice and limitation to product information, specifications, and descriptions herein, and does not give warranties as to the accuracy or completeness of the included information. Silicon Laboratories shall have no liability for the consequences of use of the information supplied herein. This document does not imply or express copyright licenses granted hereunder to design or fabricate any integrated circuits. The products must not be used within any Life Support System without the specific written consent of Silicon Laboratories. A "Life Support System" is any product or system intended to support or sustain life and/or health, which, if it fails, can be reasonably expected to result in significant personal injury or death. Silicon Laboratories products are generally not intended for military applications. Silicon Laboratories products shall under no circumstances be used in weapons of mass destruction including (but not limited to) nuclear, biological or chemical weapons, or missiles capable of delivering such weapons.Trademark InformationSilicon Laboratories Inc., Silicon Laboratories, Silicon Labs, SiLabs and the Silicon Labs logo, CMEMS®, EFM, EFM32, EFR, Energy Micro, Energy Micro logo and combinations thereof, "the world’s most energy friendly microcontrollers", Ember®, EZLink®, EZMac®, EZRadio®, EZRadioPRO®, DSPLL®, ISOmodem ®, Precision32®, ProSLIC®, SiPHY®, USBXpress® and others are trademarks or registered trademarks of Silicon Laboratories Inc. ARM, CORTEX, Cortex-M3 and THUMB are trademarks or registered trademarks of ARM Holdings. Keil is a registered trademark of ARM Limited. All other products or brand names mentioned herein are trademarks of their respective holders.Silicon Laboratories Inc.400 West Cesar Chavez Austin, TX 78701USAIoT Portfolio /IoTSW/HW/simplicityQuality/qualitySupport and Community。
嵌入式系统原理与应用实验栗华编着山东大学信息科学与工程学院二零一四年三月目录第一章实验硬件平台1.1北京博创UP-TECH三合一实验箱简介本实验指导书所依赖的硬件平台为北京博创兴盛科技有限公司生产的一种ARM9/Xscale经典三核心教学科研平台(型号:UP-TECHS2410/S2440/P270),本平台兼容PXA270核心CPU及S3C2410、S2440核心CPU的全部功能,是北京博创多年来嵌入式教学产品开发经验的结晶。
这里选配的是S3C2440核心板。
图1-1UP-CUP三合一实验箱外观应用案例:※支持Linux、WinCE、Vxworks、μC/OS-Ⅱ4套操作系统;※核心板可更换,同时拥有ARM9(S3C2410和S3C2440)和XScale(PXA270);※中国电子学会嵌入式工程师认证考试和师资培训指定平台;硬件资源:软件资源结构说明图1-2UP-TECH三合一实验箱实物结构图1-2UP-TECH三合一实验箱框图结构图1-3UP-TECH三合一实验箱框图结构版图1.2跳线设置参考说明:◆PCB上所有“EXPORT”丝印字符表示168Pin扩展槽◆JP1401RESET-SEL:设置复位电路,位置JTAG20插座下方。
1-2:ICE的ICE-TRST复位信号可以控制系统复位信号RESET。
2-3:ICE的ICE-TRST复位信号不可以控制系统复位信号RESET。
◆JP1402JTAGSEL:选择JTAG电路,位置JTAG20插座下方。
1-2:使能板载的UP-LINKJTAG电路。
2-3:使用外部的JTAG电缆或者ARMICE仿真器。
◆JP1103TXD1-SEL◆JP1104RXD1-SEL:UART1选择扩展槽或者RS232的DB9插座。
1-2:UART1连接RS232-1,从DB9串口插座输出。
2-3:UART1连接到扩展槽。
◆JP1101TXD2-SEL◆JP1102RXD2-SEL:UART2选择跳线,分别为RS485、IrDA、扩展槽1-2:UART2连接到RS485总线上。
OBT-BSP-Rtems 应用开发手册V 2.0珠海欧比特宇航科技股份有限公司2011年6月26日目录1RTEMS概况 (1)2OBT-BSP-RTEMS说明 (2)2.1PROMCOREL文件 (4)2.2BOOT_CARD函数 (5)2.3BSP_START函数 (6)3RTEMS开发环境的搭建 (7)3.1RCC简介 (7)3.2RCC的安装 (7)3.3RCC的目录结构 (8)4RTEMS LIB开发 (9)4.1目录结构 (9)4.2硬件相关源代码 (11)4.3编译RTEMS LIB库 (11)5RTEMS应用程序开发 (12)5.1示例程序源码分析 (12)5.2编译RTEMS应用程序 (19)5.3在S698平台上运行RTEMS应用程序 (19)1RTEMS概况RTEMS (Real-Time Executive for Multiprocessor Systems)是一个支持多处理器系统的高性能实时嵌入式操作系统,主要应用于嵌入式军事应用领域。
它主要有以下特点:具备多任务处理能力;适用于同类或异类多处理器系统;事件驱动、基于优先级的抢占式调度;可选的单调速率调度机制;任务间通讯和同步;优先级继承;中断响应管理;动态内存分配;高级用户配置。
RTEMS 由ADA和C共同实现,它支持Intel X86、Motorola MC68K、MIPS、PowerPC、SPARC等主流处理器。
RTEMS完全支持个人微处理器家族或特殊功能硬件的特性,允许系统开发人员高度自由的定制和扩展它的特征。
易移植性是RTEMS开发中最主要的因素,它对硬件的依赖性小,实时应用可以很容易的移植到任何其它的处理器上。
采用RTEMS的实时系统,其功能升级完全不受特定的微处理器结构约束。
RTEMS支持多处理器系统,包括同类处理器和异类处理器。
它的内核能自动补偿处理器之间的结构差异(字节交换等),这使得一个处理器与其不同类的处理器交互变得简单,而不需要重新为其设计系统。
DKBLEUSER GUIDE Monday, 19 May 2014Version 1.0VERSION HISTORYTABLE OF CONTENTS1Design Overview (5)1.1PIO Connections in the Carriers (7)1.2Important Notes about the Differences between the Module Carriers (7)1.2.1Why the External Flash Chip Doesn’t Work With BLE121LR Carrier? (9)1.2.2Minimizing the Current Consumption (9)1.3Sensors, display and USB to UART converter (9)2Getting Started With DKBLE (10)2.1Using the On-Board Debugger to Program the Carriers (10)2.2Using the On-Board Debugger to Program External BLE Devices (11)2.3Using the Analog Comparator of BLExxx modules (11)3Measuring Current Consumption (12)4Schematics and Assembly Drawing (14)5WEEE Compliance (20)6Contact Information (20)1 Design OverviewBLE Development Kit, DKBLE, is targeted for engineers evaluating Bluetooth Smart modules BLE112, BLE113 and BLE121LR. DKBLE is platform containing various switchable peripherals for creating and testing several different applications utilizing Bluegiga Bluetooth Smart modules. The modules are assembled on a carriers boards and DKBLE contains a header type of interface for plugging in the module carriers. Thus each module can be tested and compared with each other on the same platform. DKBLE contains:To measure the DC current drawn from the battery, connect current meter here.To measure the DC current drawn from the USB, connect current meter here.To measure the DC current drawn by the module alone, connect current meter here.To measure the peak current drawn by the module alone, connect oscilloscope here.Interface for the module carrier boards.Plug the carrier board to this connector.Signal test points. All the signals and interfaces of this boardare exposed here. The silk screen describes the functions of this board. To see which module IO is connected to particular function, see the silk screen of the module carrier.Output of the on-board cc-debugger.To program an external BLExxx device,connect the debug interface of the device here.To program the module carrier, switch to ”MODULE”To program an external BLExxx device,switch to ”OUTPUT”Select power from the battery or from the USB.UART, USB and CC-Debugger interfaces.The board can be powered from any of these USB lines.Potentiometer to test the internal ADC of BLExxx modules.Switches to connect and enable / disconnect and disable the onboard peripherals.Reset the module carrier.Module peak current measurement on/off. To save in current consumption turn off when not used.Push buttons to the IO’s of the moduleP h y s i c a l D i m e n s i o n s o 1L R0 Figure 3: BLE121LR module carrier1.1 PIO Connections in the Carriers*) Connect using a shorting link in the carrierTable 1: PIO connections in the carriers1.2 Important Notes about the Differences between the Module CarriersIn BLE121LR the PIOs P1_0 and P1_1 are reserved for the internal front end control of the module. Also P1_7 is reserved for this purpose and in case of BLE121LR it can only be used as an output controlling the external DCDC. Thus in BLE121LR P1_7 is named as DCDC CNTRL.The important differences between the carriers are shown in the Figure 4 (BLE112 and BLE113 carriers) and Figure 5 (BLE121LR carrier).1.2.1 Why the External Flash Chip Doesn’t Work With BLE121LR Carrier?The external flash chip is powered with one of the IO’s of the module. In BLE121LR Carrier the Flash supply is connected to an IO with 4 mA current driving capability where as in BLE112 and BLE113 Carrier it is connected to an IO with 20 mA current driving capability. Thus BLE121LR carrier is not able to power the flash and using the flash with BLE121LR carrier is not possible in DKBLE.1.2.2 Minimizing the Current ConsumptionIn all Carriers pin P1_4 is externally pulled down by the pull-down resistor in DKBLE. The purpose of this resistor is to avoid leakage when using the display. Note that any PIO’s configured as peripherals do not have internal pull-down or pull-up capability and thus, when left floating, they will require external pull-down resistor.For this reason port P1 can’t be configured to have internal pull-ups (the default settingof the module) but the port P1 must be pulled low in the HW configuration file.In BLE121LR carrier also pin P0_7 is externally pulled down by the pull-down resistor in DKBLE.For these reasons both ports P1 and P2 must be pulled low in the HW configuration file. The PIO used for the display RS (Register Select) signal has an external pull-down resistor in DKBLE (Note that P1_0 and P1_1 require external pull-up or pull-down when configured as input).For these reasons the PIO used for the RS signal must be driven low when the notwriting to the display.1.3 Sensors, display and USB to UART converterTable 2: Sensors, display, external flash and USB to UART converter in DKBLE2 Getting Started With DKBLEBy default the modules delivered with the DKBLE have demonstration FW which prints the temperature to the display and starts automatically advertising. Several example applications are provided with the SDK package downloadable in the Bluegiga web pages.To get started with the example applications navigate to→Products → Bluetooth 4.0 ModulesSelect the module of your choice and then navigate toDocument ation and Software → Software Releases → Bluetooth Smart Software and SDKDownload and install the package. After successful installation the tools can be found from the start menu.Figure 6: Bluegiga tools and examples in the Windows start menu2.1 Using the On-Board Debugger to Program the CarriersTo program the module in the carrier, connect the debugger with USB to a PC as shown in the Figure 7. Launch the BLE SW Update Tool. Browse to select the project file for the right module carrier, and then click “update”. After successful programming, the background of the BLE SW Update Tool turns into green (Figure 8).”module”“reset debugger”Figure 7: Using the on-board debugger to program the carrierFigure 8: Using the BLE Update Tool2.2 Using the On-Board Debugger to Program External BLE DevicesFigure 9: Using the on-board debugger to program external BLE devices2.3 Using the Analog Comparator of BLExxx modulesSwitch power to ”USB” and the debugger to ”OUTPUT ”Connect the ribbon cable from the “DEBUGGER OUTPUT” to the programming port of the target deviceFigure 10: Measuring the current consumptionThe peak current consumption of the module is measured over 3 ohm resistor using an instrumentation amplifier with a gain of 10. The instrumentation amplifier is powered from USB 5V line and the DC bias is from the 3V3 LDO. Because the amplifier is powered from the USB VBUS, it can’t be use d unless USB is connected. If USB is not connected then the instrumentation amplifier must be turned off and by-passed using the switch labeled “CURRENT MEAS OFF<->ON to avoid excessive leakage current into the input of the amplifier.NOTE: Peak current measurement is not possible when the external DCDC is used3RA=10-+RefFigure 11: TX current measurement amplifierTo measure the peak TX current consumption of the module, connect a coaxial cable to the BNC connector in the board and to an oscilloscope. Set the oscilloscope ∙Coupling: DC∙Vertical scale 500 mV/DIV ∙Horizontal scale: 200 µs/DIV ∙Level: 2.5 V ∙Offset: -2.0 V∙Trigger: Normal, falling edgeThe instrumentation amplifier inverts the signal. The current consumption is calculated byΩ-=303.3Vo V I NOTE: Because of the limited common mode input range of the instrumentation amplifier the peakcurrent can only be measured when powering the module from USB.4 Schematics and Assembly DrawingFigure 12: BLE113 Evaluation Board Schematic (1/6)Silicon LabsPage 14 of 20Silicon LabsPage 15 of 20Figure 13: BLE113 Evaluation Board Schematic (2/6)Figure 14: BLE113 Development Board Schematic (3/6)Silicon LabsPage 16 of 20Silicon LabsPage 17 of 20Figure 15: BLE113 Development Board Schematic (4/6)Figure 16: BLE113 Development Board Schematic (5/6)Silicon LabsPage 18 of 20Silicon LabsPage 19 of 20Figure 17: BLE113 Development Board Schematic (6/6)Silicon Laboratories Inc.400 West Cesar Chavez Austin, TX 78701USASimplicity StudioOne-click access to MCU and wireless tools, documentation, software, source code libraries & more. Available for Windows, Mac and Linux!IoT Portfolio /IoTSW/HW/simplicityQuality/qualitySupport and CommunityDisclaimerSilicon Laboratories intends to provide customers with the latest, accurate, and in-depth documentation of all peripherals and modules available for system and software implementers using or intending to use the Silicon Laboratories products. Characterization data, available modules and peripherals, memory sizes and memory addresses refer to each specific device, and "Typical" parameters provided can and do vary in different applications. Application examples described herein are for illustrative purposes only. Silicon Laboratories reserves the right to make changes without further notice and limitation to product information, specifications, and descriptions herein, and does not give warranties as to the accuracy or completeness of the included information. Silicon Laboratories shall have no liability for the consequences of use of the information supplied herein. This document does not imply or express copyright licenses granted hereunder to design or fabricate any integrated circuits. The products are not designed or authorized to be used within any Life Support System without the specific written consent of Silicon Laboratories. A "Life Support System" is any product or system intended to support or sustain life and/or health, which, if it fails, can be reasonably expected to result in significant personal injury or death. Silicon Laboratories products are not designed or authorized for military applications. Silicon Laboratories products shall under no circumstances be used in weapons of mass destruction including (but not limited to) nuclear, biological or chemical weapons, or missiles capable of delivering such weapons.Trademark InformationSilicon Laboratories Inc.® , Silicon Laboratories®, Silicon Labs®, SiLabs® and the Silicon Labs logo®, Bluegiga®, Bluegiga Logo®, Clockbuilder®, CMEMS®, DSPLL®, EFM®, EFM32®, EFR, Ember®, Energy Micro, Energy Micro logo and combinations thereof, "the world’s most energy friendly microcontrollers", Ember®, EZLink®, EZRadio®, EZRadioPRO®, Gecko®, ISOmodem®, Precision32®, ProSLIC®, Simplicity Studio®, SiPHY®, Telegesis, the Telegesis Logo®, USBXpress® and others are trademarks or registered trademarks of Silicon Laborato-ries Inc. ARM, CORTEX, Cortex-M3 and THUMB are trademarks or registered trademarks of ARM Holdings. Keil is a registered trademark of ARM Limited. All other products or brand names mentioned herein are trademarks of their respective holders.。
/CN/view/zh/109485822C o p y r i g h t S i e m e n s A G C o p y r i g h t y e a r A l l r i g h t s r e s e r v e dContentsSINAMICS G110 G120系列驱动产品文档列表............................................................ 1 1. 概括 ............................................................................................................................. 3 2. 样本列表 ..................................................................................................................... 3 3. 手册列表 ..................................................................................................................... 3 4. 常问问题 ..................................................................................................................... 7 5. 操作入门 ................................................................................................................... 38 6. 视频列表 ................................................................................................................... 41 7. 软件列表 ................................................................................................................... 45 8. GSD 列表 .................................................................................................................... 47 9.附录网址 (47)C o p y r i g h t S i e m e n s A G C o p y r i g h t y e a r A l l r i g h t s r e s e r v e d1. 概括本文主要总结了SINAMICS G110,G120驱动产品的文档列表,供客户方便查找。
EC系列小型可编程控制器应用问答集锦资料版本归档时间2007-05-18BOM编码艾默生网络能源有限公司为客户提供全方位的技术支持,用户可与就近的艾默生网络能源有限公司办事处或客户服务中心联系,也可直接与公司总部联系。
艾默生网络能源有限公司版权所有,保留一切权利。
内容如有改动,恕不另行通知。
艾默生网络能源有限公司地址:深圳市南山区科技工业园科发路一号邮编:518057公司网址:技术服务热线:800-8206510手机及未开通800地区:客户服务投诉热线:0E-mail前言目标读者本书适用于自动化技术人员,帮助他们解决在使用艾默生可编程控制器(以下简称PLC)中出现的问题,为广大艾默生PLC用户编程、系统设计和系统调试提供参考。
手册内容该手册通过问答的形式帮助用户解决在使用艾默生PLC时可能出现的产品应用问题、与周边设备连接问题、行业应用问题等。
回答中涉及的例子程序,发布在艾默生网络能源有限公司主页上。
阅读本手册的同时也可以参考阅读以下手册:■《EC系列小型可编程控制器编程手册》■《EC10 系列可编程控制器用户手册》■《EC20 系列可编程控制器用户手册》■《ControStar 编程软件用户手册》目录第一章硬件相关问题 ..................................................................... 错误!未定义书签。
PLC输出点控制交流接触器,应注意些什么?............................................ 错误!未定义书签。
EC系列小型PLC的输出触点容量是多少? .............................................. 错误!未定义书签。
PLC出现误动作怎么办? ............................................................. 错误!未定义书签。
Library of Components – EhLib 5Developer’s guideEhLib Team2012Edition: 1.53(Changes and additions arehighlighted in red color)Introduction (4)Installation (7)Unpacking archive (7)Installing packages. (8)Installing help files. (9)Using TDBGridEh component (10)Brief description of TDBGridEh, TDataLink and TDataSet. (10)Working with TDBGridEh at design-time. (10)Panel of detail information for record – RowDetailPanel. (11)RowPanel mode (12)Working with datain grouping mode. (12)TDBGridEh and vertical scrollbar. (15)Customizing scrollbars. (15)Using DBGridEh for sorting and filtering data in the DataSet. (15)Customizing grid title. (19)Customizing grid footer. (19)Customizing grid cells. (20)Hints and Tooltips (23)Customizing in place editor in grid cell. (23)Automatically fits the width of the grid columns to the width of the grid client area. (24)3D and flat look. (24)Using properties of TDBGridEh.IndicatorTitle. (24)Using global properties for TDBGridEh. (25)Import/Export TDBGridEh data to/from various formats. (28)Other features. (28)Converting existing TDBGrid component to TDBGridEh. (29)Using TPrintDBGridEh component (30)Rich text before and after grid (30)Features that current version of TPrintDBGridEh is not supported. (30)FAQ List: (30)Using TDBSumList component (31)Common understanding of TDBSumList. (31)How it works and why SumList sometimes calculate aggregation values incorrectly. (31)Using data-aware edit controls (32)Common understanding of edit controls. (32)Working with edit buttons. (32)Using TDBDateTimeEditEh control. (32)Using TDBNumberEditEh control. (33)Using TDBComboBoxEh control. (33)Using TDBLookupComboboxEh control. (33)Using SpecRow in columns of DBGridEh component and in DBLookupComboBoxEh component. (34)Using TPropStorageEh and TPropStorageManagerEh components (35)Introduction in technology of interaction between MemTable and DataDriver. (36)TMemTableEh component. (37)Two working mode of TMemTableEh component. (37)ViewScroll (37)Master/detail relations. (37)Storing records in tree mode (TreeView). (37)Working with AutoIncrement fields (38)Using indexes. (39)Using sha red array of records by several TMemTableEh’s (39)TRefObjectField field type (39)Using maintained aggregates (39)Records sorting. (39)Creation/removing table data in memory in the ‘stand-alone’ mode (40)Working with MemTableEh in the 'with datadriver' mode. (40)Cached updates. (41)Marking and Returning to Records. (41)Searching in TMemTableEh (42)Quick access to the record values. (44)Internal objects of TMemTableEh component (45)Workig with TMemTableEh at design-time. (45)TDataDriverEh component. (46)TSQLDataDriverEh component. (47)TSQLDataDriverEh or TXXXDataDriverEh, which one is best to use. (50)Working with TSQLDataDriverEh and TXXXDataDriverEh at design-time. (50)Feedbacks and bug reports (51)IntroductionThe Library contains components and classes for Borland Delphi versions 5, 6, 7, 8 & 2005 and Borland C++ Builder versions 5 & 6, Borland Developer Studio 2006, CodeGear Delphi 2007, RAD Studio 2009, Embarcadero RAD Studio 2010, RAD Studio XE & RAD Studio XE2. The Library is intended to increase capacity of the client’s part of the database application by improving interaction between application and users.TDBGridEh component Using TDBGridEhIt provides all functionality of TDBGrid and adds several new features as follows: - Allows to select records, columns and rectangle areas.- Provides special titles that can cover several or all columns.- Can have a footer that is able to show sum/count/other field values.- Allows to resize column automatically to fit grid width equal to client width.- Has an ability to change row height and title height.- Allows automatic broken of a single line long title and data rows to a multiline.- Allows title to act as button and, optionally show a sort marker.- Allows to mark titles by sortmarking sings automatically and sort data in DataSet.- Allows to truncate long text with ellipsis in cells.- Allows lookup list to show several fields.- Have an ability to make an incremental search in lookup fields.- Can have frozen nonscrollable columns.- Allows to show DateTime picker for TDateField and TDateTimeField.- Allows to show bitmaps from TImageList depending on field value.- Allows to hide and track horizontal or vertical scrollbars.- Allows to hide columns.- Allows to show 3D frame for frozen, footer and data rows.- Allows to draw memo fields.- Can show multiline inplace editor.- Can have a proportional scrolling for DadaSets independently of dataset’s sequencing.- Allows to show checkboxes automatically for Boolean fields. Allows to show checkboxes for other type of fields.- Has procedures to save and restore layout (visible columns, columns order, columns width, sortmarkers, row height) in/from registry or ini file.- Allows to show hint (ToolTips) for text that don't fit in the cell.- Allows to export data to Text, Csv, HTML, RTF, XLS and internal formats.- Allows to import data from Text and internal formats.- Can sort data in various datasets.- Can filter data in various datasets.TDBLookupComboboxEh component Using edit controlsIt provides all functionality of TDBLookupCombobox and adds several new features as follows: - Can have flat style.- Allows to assign values as to KeyValue property and as to display Text property.- Allows to hold KeyValue and Text that will not affect to each others values.Drop down list can:- Show titles,- Have sizing grip,- Automatically set width as sum of DisplayWidth of the list fields (Width = -1),- Automatically drops when the user pressed the key.- Can have specified width.Edit button can:- Show DropDown and Ellipsis or Bitmap image.Have additional events: OnKeyValueChanged and OnButtonClick.TDBSumList component Using TDBSumListIt is intended for calculating sums and amount of records in a TDataSet with dynamic changes. Component keeps a list of TDBSum objects, which contains types of group operations (goSum or goCount) and name of fields which values need some calculation. (goCount name of field is unnecessary).TPrintDBGridEh component Using TPrintDBGridEh TPrintDBGridEh provides properties and routines for preview and print of TDBGridEh component with several features:- Ability to expand rows vertically until all text is printed.- Ability to scale grid to fit it to the page width.- Ability to print/preview title for grid.- Ability to print/preview page header and page footer where you can specify macros for current page, current date, current time and/or static text.- Automatically print/preview multi-selected area of TDBGridEh if it’s area is not empty.- Ability to print/preview rich text before and after grid.TPreviewBox componentTPreviewBox lets you to create a customizable runtime preview.TPrinterPreview objectTPrinterPreview lets you to record printable data in buffer for following output them on screen and to printer. TPrinterPreview have all functions and properties as in TPrinter object. You can use TPrinterPreview object similarly to TPrinter except some details. In TPrinterPrinter.Canvas.Handle and Printer.Handle is the same but in TPrinterPreview PrinterPreview.Canvas.Handle represents the metafile in that is recored the data and PrinterPreview.Handle represents Printer.Handle. It means that you have to use PrinterPreview.Canvas.Handle for drawing operation (like DrawText, DrawTexteEx, e.t.c.) and use PrinterPreview.Handle for such functions as returning information about printer facilities (GetDeviceCaps, e.t.c.). Global function PrinterPreview returns default PrinterPreview object and shows data in the default preview form.TDBEditEh component Using edit controlsrepresents a single or multi-line edit control that can display and edit data of field in a dataset or can work as non data-aware edit control.TDBDateTimeEditEh component Using edit controlsrepresents a single-line date or time edit control that can display and edit data of TDateTime fields in dataset or can work as a non data-aware edit control.TDBComboBoxEh component Using edit controlsrepresents a single or multi-line edit control that combines an edit box with a scrollable list and can display and edit a field in a dataset or can works as non data-aware combo edit control. TDBNumberEditEh component Using edit controlsrepresents a single-line number edit control that can display and edit a numeric field in a dataset or can work as non data-aware edit control.TPropStorageEh, TIniPropStorageManEh, TRegPropStorageManEh componentsUsing TPropStorageEhThese components realize a technology of storing component properties to/from such storages as INI files, Registry etc.TMemTableEh componentIt is a dataset that holds all data in memory and can get data from TDataDriverEh and return changed records back to the TDataDriverEh.TDataDriverEh componentDeliver records from the server to the TMemTableEh.Deliver changed records from TMemTableEh back to the server.TDataSetDriverEh componentIt is a DataDriver that deliver records in TMemTableEh from other DataSet and deliver changed records from TMemTableEh back to the DataSet.TSQLDataDriverEh componentIt is a DataDriver that have properties for keeping five SQL expressions and parameters for querying data, removing, insertions, updating and refreshing records. TSQLDataDriverEh by itself can’t request data from server, but it can prepare parameters of the request and have a global event that programmer can write for transferring SQL expression to/from the server. TBDEDataDriverEh componentIt is a DataDriver that interacts with the DB server using BDE connection. TIBXDataDriverEh componentIt is a DataDriver that interacts with the DB server using IBX connection. TDBXDataDriverEh componentIt is a DataDriver that interacts with the DB server using DBX connection. TADODataDriverEh componentIt is a DataDriver that interacts with the DB server using ADO connection.InstallationBelow it will be described how to install EhLib under Delphi 6.Uninstall previous or evaluation version of EhLib from Delphi 6 IDE.Remove or copy this files to other directory this files to prevent crossing this and new version of EhLib (Including EhLib.bpl, EhLib.dcp, EhLibXX.bpl, EhLibXX.dcp files).Unpacking archiveUnpack EhLib archive.After unpacking you will have next list of directories:Directories of 'EhLib - source include' version:Directories of 'Ehlib - without source' version or 'Ehlib- Evaluation version':Create, if need, new directory "EhLib" in your Delphi_X directory. (For instance:C:\Delphi6\EhLib).If you have EhLib - source include version then copy to this directory files from Common and Delphi6 directory of EhLib archive.If you have EhLib - without source version or evaluation version EhLib then copy to this directory files from Delphi6 directory of EhLib archive.By default EhLib contains resource for English language. If you need other languages you can replace original resource files (which already present in C:\Delphi6\EhLib) by the files that is placed in corresponding language directory.If you don't find found directory for necessary language then you need to take files from any existing language directory and change it as you need.Installing packages.Automatic installing:Run Installer\EhLibInstaller.exe program from EhLib archive to install library in Delphi/C++ Builder IDE automatically. In time of installation the program creates folder, copies files, compile required packages and registers packages in the IDE.Manual installing:Run Delphi and use "File\Open..." menu item of Delphi IDE to open the EhLib runtime package C:\Delphi6\EhLib\EhLib60.dpk. In "Package..." window click "Compile" button to compile and build bpl file.By default Delphi place compiled EhLib60.BPL file to the <Delphi path>\Projects\Bpl directory and this directory already present in the search PATH. But if you overwrite default BPL directory then you need to put the compiled EhLib60.BPL file into directory that is accessible through the search PATH (i.e. DOS "PATH" environment variable; for example, in the Windows\System directory).After compiling run-time package you must install design-time package DclEhLib60.BPL into the IDE.Use "File\Open..." menu item to open design-time package DclEhLib60.dpk. In "Package..." window click "Compile" button to compile the package and then click "Install" button to register EhLib components on the component palette.EhLib components have to appear on 'EhLib' page of components palette.Instalation note for users who had EhLib 1.X or 2.X:Note that Delphi IDE does not move components to the new default place on components palette when you install new version of same component(s). So if you already have EhLib installed, then after installation new version does not move EhLib components to the 'EhLib' page. To force Delphi IDE to move components to the default place on components palette do next:Open menu: Component->Configure Palette.Select '[All]' line in Pages listbox.Click 'Default Pages' button.Add, (if need) EhLib directory ("C:\Delphi6\EhLib") in Tools->Environment Options->Library-> Library Path.Troubleshooting.Installing help files.Copy EhLib.hlp and t files from HLP directory of EhLib archive to the Delphi 6 HELP subdirectory.Run Delphi IDE.Select Help|Customize menu to start the OpenHelp application.Add the t file to the Contents page, add the EhLib.hlp file to the Index and Link pages. Select "File->Save Project" menu.Close OpenHelp application.To check that EhLib help files have been installed correctly, drop DBGridEh component on the form and press F1. Delphi IDE have to open help window with information about TDBGridEh component.If you want to install help files under several Delphi versions simultaneously (or under C++ Builder and Delphi simultaneously) then you have to create a copy of EhLib.hlp and t for every version of Delphi or C++ Builder with individual files name (For instance for Delphi 6 copy files EhLib.hlp t to EhLibD6.hlp and t respectively).Next - need to edit file t. This file contain several ":Include" clause at first lines. Comment (using semicolon sign) lines that don’t contain DELPHI6.OHL word):BASE EhLib.hlp:TITLE EhLib library;:Include bcb4.cfg;:Include bcb5.ohl;:Include delphi4.cfg;:Include DELPHI5.OHL:Include DELPHI6.OHL.Copy EhLibD6.hlp and t to Delphi 6 HELP subdirectory and install help files as described above.Using TDBGridEh componentBrief description of TDBGridEh, TDataLink and TDataSet.All below texts are equally pertained in both TDBGridEh component and TDBGrid component.A TDBGridEh control lets you to view and to edit records in a dataset as a tabular grid format. TDBGridEh does not store data in itself, it only show data from dataset via TDataLink object. Every database control have internal TDataLink object to interact with dataset. You can connect TDBGridEh to dataset using DataSource property. If you already have used TStringGrid component you can see that data shows in TStringGrid and in TDBGridEh very similarly, but mechanism that uses to show data in TStringGrid and in TDBGridEh are very different. In TStringGrid count of rows is equal to rows in array of strings, while in TDBGridEh (and TDBGrid) count of rows always not more than count of visible rows and although vertical scrollbar can display thumb position regarding the count of record in dataset, In reality, it take information not from grid but directly from dataset. TDataSet doesn't allow us to work with data as with array of data i.e. we can not quickly get value of the field from certain record. Some types of datasets have not even such notion as record number (in such datasets we can only know what we are at the beginning of dataset or at the end of it or somewhere between them. In that case DBGrid shows vertical scrollbar only in three positions). But to have possibility to draw several records simultaneously, TDataLink object allows having buffer of records (record buffer window) for quick random access. DBGrid uses this possibility of datalink and it sets size of record buffer window equal to count of visible rows in the grid. We can not control what record must be first in this buffer, DataLink itself scrolls record buffer window when we navigate through the dataset. And it controls the scrolling of record buffer window so that the active record is always in the record buffer window. It is a reason why the active record changes position when users change thumb position of vertical scrollbar using mouse.Working with TDBGridEh at design-time.TDBGridEh contains rows and columns. Every row is a record in TDataSet. Every column is a field in TDataSet. Columns can be dynamic or static. Dynamic columns are recreated every time when the state of DataSet is changed. State of DataSet can be changed in several cases. It ischanged when, for example, DataSet is reopened. When column isrecreated, values of column properties are reset to their defaultvalues. It is useful to use dynamic columns when the list of fields ofDataSet is not known in advance. In the mode of static columns griditself never recreates columns. At design-time to create staticcolumns you need to double-click on the grid. The Columns Editorwindow will be open. Press “Add all fields” in this window. Grid will create static column for every DataSet field.To customize properties of column you need to select its name in the The Columns Editor window. You can also select column in Object Inspector by clicking column title in the grid. Ifgrid is connected to DataSource andDataSource is placed on the sameForm as grid, then icon ofDataSource will be shown in thebottom right corner of the Grid. Youcan click on the DataSource icon toselect DataSource in ObjectInspector. In same manner grid canshow DataSet. If a DataSet is aTMemTableEh then grid also canshow TDataDriver and DataSet which is connected to DataDriver as a ProviderDataSet.Panel of detail information for record – RowDetailPanel.Subproperties of RowDetailPanel property allow you to create and customize the panel ofdetailed information for grid rows.Panel if detailed information is aspecial area inside grid where youcan put any control fromComponent Palette on it. At design-time a panel is always opened underthe current record. At run-timepanel is hidden, and there is a ‘+’sign at the beginning part of everyrow. You can click ‘+’ sign to openpanel. At once time panel can beopened only for one row. You canalso open panel using keycombination Ctrl-Down or key ‘+’.Use Ctrl-Up to return from panel togrid row. Use ‘*’ key to show orhide panel depending on currentstate.Subproperties of RowDatailPanel propery:Active: Boolean; this propery allows activating panel of detailed information.Width: Integer;width of panelHeight: Integer; height of panelActiveControl: TWinControl; use this property to define control which will be focused when panel is opening.BevelEdges: TBevelEdges, BevelInner: TBevelCut, BevelOuter: TBevelCut, BevelKind: TBevelKind, BevelWidth: TBevelWidth,BorderStyle: TBorderStyl e: Use these properties to control border style ofpanel.Color: TColor; Color of panelParentColor: Boolean Property defines if it is need to use color of grid as a color of panel.PublicVisible: Boolean This property defines if panel is visible. You can set this property at run-time for reading and writing.Use event OnCheckRowHaveDetailPanel to control of panel showing in grid. You can set parameter RowHaveDetailPanel to allow or forbid panel for required record.Use events OnRowDetailPanelHide and OnRowDetailPanelShow to execute special action after panel is hidden or before panel is openened.RowPanel mode.Grid can work in special mode when every cell of grid can be placed under each other and canhave individual height. SetRowPanel.Active to Truevalue to activate this mode.At design-time you canplace cell, vertical andhorizontal size. At run-timethe possibility to changeposition of cell depends onthe presencedghColumnMove value inOptionsEh property.Possibility to changevertical size of cell dependson RowSizingAllowed property.When user change cell width, the grid also changes width of adjoined cells which are placed under or above of changing cell and if the right border of these cells match. By analogy when user changes cell height, grid changes height of cells in left or right part of grid if low borders march. Press and hold Shift key to change the size of only single cell.To change cell height of cell you need to move mouse cursor to the low border of the title cell. Mouse cursor will change its image from arrow to two arrows with up and down direction. At this moment press right mouse button and change size.To change position of cell you need to press right mouse button on the title cell and drag it to the required place.Additional subproperies of the RowPanel property:NavKeysNavigationType: TGridRowPanelNavKeysNavigationTypeEh defines the order of navigation over cells in the grid when keys Up, Down, Left, Right are pressed.rpntRowToRowEh - (by default) Keys Up, Down move current cell to next or previouse record of dataset. Keys Left, Rigth worksas Tab and Shift-Tab.rpntCellToCellEh - Keys Up, Down move current cell to under or above last position from the current cell. Keys Left, Rigth move current cell to left or right position from the current cell.TabNavigationType: TGridRowPanelTabNavigationTypeEh defines an order of going through cells of the grid by Tab keyrpntUpToDownPriorityEh Go, at first, from top to bottom, than from left to right. rpntLeftToRightPriorityEh Go, at first, from left to right, than from top to bottom.Working with data in grouping mode.Grid allows to group data in memory using columns as a grouping criterions.You can create and changegrouping at design-time and atrun-time.The grouping works only whengrid is connected to dataset ofTMemTableEh type.When grid group data it also sortdata in MemTableEh to havecorrespondence of data in the gtidand in the MemTable. The Gridtrack data in the MemTable andmoves records in correspondinggroups when data are changed.Use subproperties ofGrid.DataGrouping property tocontrol grouping. UseGrid.DataGrouping.GroupLevelsproperty to create structure ofgrouping. GroupLevels is acollection ofTDBGridEhDataGroupLevelEh.Every item of collection corresponds one level of grouping. The key property of the item of collection is the ColumnName property of String type. This property keeps name of the column of field for which the records will be group. Use property to get the name of the column at run-time. Use Font and Color properties of structure s’items to control the format of the grouping records. Set Grid.DataGrouping.Active to True to activate the grouping. Set GroupPanelVisible property to True to show the current active structure of the grouping. Special panel will be shown with active items of grouping at the top part of the gird. The element of the grouping collection is active when its ColumnName property holds a name of a column. After activation of grouping panel, you can make and change the grouping structure using drag-n-drop operations. Drag the column title to the grouping panel to group data by this column. In time of forming the tree of grouping, grid creates the new group record when the value of the field of column Column.Field is changed. You can change key value of grouping in the event TDBGridEhDataGroupLevelEh.OnGetKeyValue or TColumnsEh.OnGroupGetKeyValue. Take current value of the key value from the field GroupLevel.Column.Field.Value. Write the changed value to the KeyValue parameter of the event procedure.For example, next event will form tree of grouping that will have only two grouping records ‘Big’ and ‘Small’ for numeric field that have record values that bigger or smaller them 100.procedure TForm1.gridFishColumns6GroupGetKeyValue(Sender: TCustomDBGridEh;Column: TColumnEh; var KeyValue: Variant);beginif Column.Field.AsFloat > 100 thenKeyValue := 'Big'elseKeyValue := 'Small';end;Grid uses key value to form string that will be shown in the grouping row. If you changed key value of the grouping, then you likely need to change algorithm that convert key value to display value for display. Write OnGetKeyValueAsText event to do it. Write Grid.OnDataGroupGetRowText and GroupLevels.OnGetGroupRowText to rewrite the algorithm of forming the text that is shown in the grouping row.Use property Grid.DataGrouping.GroupDataTree to access the items of grouping tree. The property have the TGridGroupDataTreeEh type and is inherited form TTreeListEh. The itmes of TTreeListEh class form the tree-type structure of groups and references to DataSet records for the lowest levels of grouping. Use properties FlatVisibleCount and FlatVisibleItem[Index] to access items as a flat list. The flat list FlatVisibleItem contain only items which are in the scope of the expanded nodes. Amount of items in flat array corresponds amount of rows in the grid. Every item of array is a reference to the instance of TGroupDataTreeNodeEh class and defines a node in the grouping tree. Basic properties of this class are:Count: Integer; Amount of nodes in the group. Nodes can be over groups of lower level or references to dataset records.DataGroup: TGridDataGroupLevelEh Reference to item of grouping structure. Not empty if the node is a node of group.DataSetRecordViewNo: Integer. Number of record in MemTableEh. Not empty if the node is a node of the dataset record.Expanded: Boolean. Noe is expanded.Items[Index: Integer]: TGroupDataTreeNodeEh. List of nodes of the lower level.KeyValue: Variant;Level: Integer The number of node level;NodeType: TGroupDataTreeNodeTypeEh. Type of the node. The Node of a group level or a record level.Parent.Указатель на родительскую ветку верхнего уровня.Use Items property of Grid.DataGrouping.GroupDataTree to access the grouping tree as a tree-type structure. Every item of this list is a reference to a tree node of grouping of highest level. Grid.DataGrouping property has next subproperties:Active: Boolean– Set this property to active grouping in the grid.DefaultStateExpanded: Boolean– Define Expanded state for every new group node.GroupLevels: TGridDataGroupLevelsEh– Collection of the grouping structure. Use this property to define template of grouping.GroupPanelVisible: Boolean– Set this property to True to show panel of grouping in the top part of the grid. When the panel is visible you can form the structure of grouping by dragging the title of the column onto this panel.Font: TFont– Defines default Font of grouping records.Color: TColor - Defines default Color of grouping records.Write Grid.OnActiveGroupingStructChanged to take action when the structure of grouping is changed.Grid calls OnDataGroupGetRowParams before drawing of a group record.In the event you can change Text, Color,Font and add Image from ImageList onthe left of the text.When the event is calling the DataSet ispositioned on the first record in thegroup. So you can access field values of Dataset inside the event.The event has next type and declaration: TDBGridEhDataGroupGetGroupRowParamsEvent = procedure ( Sender: TCustomDBGridEh; GroupDataTreeNode: TGroupDataTreeNodeEh; Params: TGroupRowParamsEh) of object;TGroupRowParamsEh type has next properties:property Color: TColor; // Color of the cell backgroundproperty Font: TFont; // Font of the text。