Home

User Manual - powerbridge.de

image

Contents

1. no security attrs PEN_EXISTING TDRV002 device always open existing OO 20M W G e no overlapped I O NULL if hDevice INVALID HANDLE VALUE ErrorHandler Could not open device process error See Also CloseHandle Win32 documentation CreateFile TDRV002 SW 65 Windows Device Driver Page 10 of 16 TENSE TECHNOLOGIES 4 1 2 Closing a TDRV002 Device The CloseHandle function closes an open TDRV002 handle BOOL CloseHandle HANDLE hDevice Parameters hDevice Identifies an open TDRV002 handle Return Value If the function succeeds the return value is nonzero If the function fails the return value is zero To get extended error information call GetLastError Example HANDLE hDevice if CloseHandle hDevice ErrorHandler Could not close device process error See Also CreateFile Win32 documentation CloseHandle TDRV002 SW 65 Windows Device Driver Page 11 of 16 TENSE TECHNOLOGIES 4 1 3 TDRV002 Device I O Control Functions The DeviceloConitrol function sends a control code directly to a specified device driver causing the corresponding device to perform the specified operation BOOL DeviceloControl HANDLE hDevice handle to device of interest DWORD dwloControlCode control code of operation to perform LPVOID lpInBuffer pointer to buffer to supply
2. TENSES The Embedded I O Company TECHNOLOGIES TDRV002 SW 65 Windows Device Driver Multiple Channel Serial Interface Version 2 0 x User Manual Version 2 0 2 November 2011 TEWS TECHNOLOGIES GmbH Am Bahnhof 7 25469 Halstenbek Germany Phone 49 0 4101 40580 Fax 49 0 4101 4058 19 e mail info tews com www tews com TDRV002 SW 65 Windows Device Driver Multiple Channel Serial Interface Supported Modules TENSE TECHNOLOGIES This document contains information which is proprietary to TEWS TECHNOLOGIES GmbH Any reproduction without written permission is forbidden TEWS TECHNOLOGIES GmbH has made any effort to ensure that this manual is accurate and To complete However TEWS TECHNOLOGIES GmbH TPMC375 reserves the right to change the product described TPMC376 in this document at any time without notice TPMC377 TEWS TECHNOLOGIES GmbH is not liable for any TPMC460 damage arising out of the application or use of the TPMC461 device described herein TPMC462 TPMC463 2004 2011 by TEWS TECHNOLOGIES GmbH TPMC465 TPMC466 TPMC467 TPMC470 TCP460 TCP461 TCP462 TCP463 TCP465 TCP466 TCP467 TCP469 TCP470 Issue Date 1 0 0 December 2 2004 1 1 0 File list extended April 5 2005 1 2 0 New modules support of programmable transceivers May 15 2006 1 2 1 File list extended August 25 2006 1 2 2 Files moved to subdirectory June 23 2008 2 0 0 Support for Windows 7 added March 9 2011 2 0 1 Default Configuration
3. of the data stored into the buffer pointed to by oOutBuffer A valid pointer is required lpOverlapped Pointer to an overlapped structure Overlapped access is not supported Return Value If the function succeeds the return value is nonzero If the function fails the return value is zero To get extended error information call GetLastError See Also Win32 documentation DeviceloControl TDRV002 SW 65 Windows Device Driver Page 13 of 16 TENSE TECHNOLOGIES 4 1 3 1 IOCTL_TDRV002_CONF_TRANS This function is used for TDRV002 supported modules with programmable I O interfaces The new configuration value is passed in an unsigned char buffer pointed to by p nBuffer to the driver The buffer must be always an unsigned char type The argument n nBufferSize specifies the size sizeof UCHAR of the configuration buffer The configuration value is an ORed value of the following bits For a description of the bits please refer to the Hardware User Manual Channel Setup of the module Bit No Name in HW User Manual 0 RS485 RS232 1 HDPLX 2 RENA 3 RTERM 4 TTERM 5 SLEW LIMIT 6 SHDN 7 Auto RS485 Operation Example include lt windows h gt include lt winioctl h gt include tdrv002 h HANDLE hDevice BOOLEAN success ULONG NumBytes UCHAR IntfConfig IntfConfig 0x00 RS232 success DevicelIoControl hDevice TDRVOO2 handle IOCTL_TDRVO02_CONF_TRANS control
4. code amp IntfConfig sizeof IntfConfig NULL 0 amp NumBytes NULL not overlapped TDRV002 SW 65 Windows Device Driver Page 14 of 16 TEWS amp TECHNOLOGIES if success printf Output port successfully written n else ErrorHandler Device I O control error process error Error Codes ERROR_INVALID_ PARAMETER This function is not supported for the module type All other returned error codes are system error conditions See Also Win32 documentation DeviceloControl TDRV002 Hardware User Manual TDRV002 SW 65 Windows Device Driver Page 15 of 16 TENSE TECHNOLOGIES 5 Known Problems 5 1 Order of Serial Ports only Windows 7 The order of the Serial Ports shown in the Devices Manager may not match channel numbering on the board Also the advising of COM Port numbers may not match to the local channel numbers and also not match to the order shown in the device manager Fixing COM Port assignment can be done as described in chapter 3 2 Advanced Port Settings The local channel number is shown as Path by the device properties Stopping and restarting devices by the Device Manager or system restarts will not touch the port assignment 5 2 COM Port Assignment on Higher Port Numbers If the COM Port assignment does not start with first unused COM Port or the assignment shows gaps in the COM Port assignment e g the four COM ports of a TPMC466 are assigned
5. driver and Windows 2000 setup will show a New hardware found dialog box again 6 The Upgrade Device Driver Wizard dialog box will appear on your screen Click Next button to continue 7 Inthe following dialog box choose Search for a suitable driver for my device Click Next button to continue 8 Insert the TDRV002 SW 65 driver disk select the matching drive of the distribution media in the dialog box Click Next button to continue 9 Now the driver wizard should find a suitable device driver on the distribution media Click Next button to continue 10 Complete the upgrade device driver and click Finish to make all the changes take effect After successful installation the TDRV002 device driver will start immediately and create devices TDRV002_1 TDRVO002_2 for all recognized modules supported by the TDRV002 SW 65 device driver It may be necessary to restart the system after installation 2 1 2 Windows XP Windows 7 This section describes how to install the TDRV002 SW 65 Device Driver on a Windows XP 32bit or Windows 7 32bit or 64bit operating system Depending on the operating system type execute the installer binary for either 32bit or 64bit systems This will install all required driver files using an installation wizard Copy needed files tdrv002 h to desired target directory After successful installation a device is created for each channel found TDRV002_1 TDRV002_2 2 2 Confirm
6. input data DWORD ninBufferSize size of input buffer LPVOID lpOutBuffer pointer to buffer to receive output data DWORD nOutBufferSize size of output buffer LPDWORD lpBytesReturned A pointer to variable to receive output byte count LPOVERLAPPED pOverlapped pointer to overlapped structure for asynchronous operation Parameters hDevice Handle to the TDRV002 that is to perform the operation dwloControlCode Specifies the control code for the operation This value identifies the specific operation to be performed The following values are defined in tdrv002 h Value Meaning IOCTL_TDRV002_CONF_TRANS Setup programmable interfaces other Other functions for serial drivers are supported by this driver Please refer to the Microsoft documentation for serial drivers See below for more detailed information on each control code To use these TDRV002 specific control codes the header file tdrv002 h must be included in the application lpInBuffer Pointer to a buffer that contains the data required to perform the operation ninBufferSize Specifies the size of the buffer pointed to by p nBuffer lpOutBuffer Pointer to a buffer that receives the operation s output data nOutBufferSize Specifies the size of the buffer in bytes pointed to by oOutBuffer TDRV002 SW 65 Windows Device Driver Page 12 of 16 TENSE TECHNOLOGIES lpBytesReturned Pointer to a variable that receives the size in bytes
7. the basic settings of the port can be changed Basic settings are Bits per second baud rate Data bits number of data 5 6 7 8 Parity parity mode None Even Odd Space Mark Stop bits number of stopbits 1 1 5 2 Flow control flow control mode None Xon Xoff Hardware 3 2 Advanced Port Settings The advanced port settings can be opened by pressing the Advanced Button at the Basic Port Settings page This site allows modification of the buffer trigger levels for Receive Buffer and Transmit Buffer Increasing a value means that system load is decreased but the risk of an overrun for receive or a gap in transmission stream is increased The TDRV002 devices are using a 64 byte internal FIFO but the property page supports just 16 character FIFOs Therefore the trigger levels are scaled by the driver with a factor of 4 e g a trigger setting of 8 means we are using a trigger level of 32 8 4 Disabling the FIFOs is not recommended this will increase the possibility of data loss and will also increases system load The site also allows advising COM Port numbers This may be useful for applications that only allow the use of some special port numbers TDRV002 SW 65 Windows Device Driver Page 7 of 16 TEWS amp TECHNOLOGIES 4 Device Driver Programming The Microsoft Win32 application programming interface API also includes a set of functions that
8. ECURITY_ATTRIBUTES pSecurityAtiributes DWORD _ dwCreationDistribution DWORD dwFlagsAndAttributes HANDLE ATemplateFile Parameters lpFileName This parameter points to a null terminated string which specifies the name of the TDRV002 to open The pFileName string should be of the form COMx to open the device x dwDesiredAccess This parameter specifies the type of access to the TDRV002 For the TDRV002 this parameter must be set to read write access GENERIC_READ GENERIC_WRITE dwShareMode Set of bit flags that specify how the object can be shared Set to 0 lpSecurityAttributes This argument is a pointer to a security structure Set to NULL for TDRV002 devices dwCreationDistribution Specifies the action to take on existing files and which action to take when files do not exist TDRV002 devices must be always opened OPEN_ EXISTING dwFlagsAndaAttributes Specifies the file attributes and flags for the file This value must be set to 0 for TDRV002 devices hTemplateFile This value must be NULL for TDRV002 devices TDRV002 SW 65 Windows Device Driver Page 9 of 16 TENSE TECHNOLOGIES Return Value If the function succeeds the return value is an open handle to the specified TDRV002 device If the function fails the return value is INVALID_HANDLE_VALUE To get extended error information call GetLastError Example HANDLE hDevice hDevice CreateFile W COM5 ENERIC_READ GENERIC_WRITE
9. OCTL TDRVO0S CONE TRANS 14 5 KNOWN PROBLEMS wricsiscccucsntcctucvnstecncsnnceaucetucstucsnnneanssentsaucsninegncsenestucsuansducsentednarens 16 5 1 Order of Serial Ports Only Windows 7 ccceseeceenseeeeeeeneeeeeenneaeeeensaeeeenneaeseenneeeeeenneneeeenees 16 5 2 COM Port Assignment on Higher Port Numbers ccssccsseeeeeseeeeeeeeesnaeenseeeeeeeeeseeeseseeeenseeeeeees 16 5 3 Settings in HyperTerminal ccccceececceeeseeceeeeeeeeeeeeeeeesceesnseeeeeneeeneaesasaaeseseaeeeeeeeseaesaseeeenseeeenees 16 TDRV002 SW 65 Windows Device Driver Page 3 of 16 TENSE TECHNOLOGIES 1 Introduction The TDRV002 SW 65 Windows device driver is a kernel mode driver which allows the operation of the supported hardware modules on an Intel or Intel compatible Windows operating system Supported Windows versions are Windows 2000 Windows XP Windows XP Embedded Windows 7 32bit and 64bit VVVV The standard file input and output I O functions CreateFile CloseHandle ReadFile ReadFileEx WriteFile WriteFileEx and DeviceloControl provide the basic interface for opening and closing a communications resource handle and for performing read and write operations The TDRV002 device driver is fully compatible to the standard Windows serial device driver serial sys The TDRV002 SW 65 device driver supports the modules listed below TPMC371 8 Channel Serial Interface PMC Conduction Cooled TPMC372 4 Channel Serial Interf
10. ace PMC Conduction Cooled TPMC375 8 Channel Serial Interface PMC Conduction Cooled TPMC376 4 Channel Serial Interface PMC Conduction Cooled TPMC377 4 Channel Isolated Serial Interface PMC Conduction Cooled TPMC460 16 Channel Serial Interface PMC TPMC461 8 Channel Serial Interface PMC TPMC462 4 Channel Serial Interface PMC TPMC463 4 Channel Serial Interface PMC TPMC465 8 Channel Serial Interface PMC TPMC466 4 Channel Serial Interface PMC TPMC467 4 Channel Serial Interface PMC TPMC470 4 Channel Isolated Serial Interface PMC TCP460 16 Channel Serial Interface CompactPCl TCP461 8 Channel Serial Interface CompactPCl TCP462 4 Channel Serial Interface CompactPCl TCP463 4 Channel Serial Interface CompactPCl TCP465 8 Channel Serial Interface CompactPCl TCP466 4 Channel Serial Interface CompactPCl TCP467 4 Channel Serial Interface CompactPCl TCP469 8 Channel Isolated Serial Interface CompactPCl TCP470 4 Channel Isolated Serial Interface CompactPCl TDRV002 SW 65 Windows Device Driver Page 4 of 16 TENSE TECHNOLOGIES 2 installation Following files are located in directory TDRV002 SW 65 on the distribution media i386 Directory containing driver files for 32bit Windows versions amd64 Directory containing driver files for 64bit Windows versions installer_32bit exe Installation tool for 32bit systems Windows XP or later installer_64bit exe Installation tool for 64bit systems Windows XP or later lt drivername gt amd64 cat Driv
11. er CAT File 64 bit lt drivername gt i386 cat Driver CAT File 32 bit lt drivername gt inf Windows installation script tdrv002 h Header file with IOCTL codes and structure definitions example tdrv002exa c Example application TDRV002 SW 65 2 0 2 pdf This document Release txt Information about the Device Driver Release ChangeLog txt Release history 2 1 Software Installation 2 1 1 Windows 2000 This section describes how to install the TDRV002 Device Driver on a Windows 2000 operating system After installing the hardware module s and boot up your system Windows 2000 setup will show a New hardware found dialog box 1 TDRV002 SW The Upgrade Device Driver Wizard dialog box will appear on your screen Click Next button to continue In the following dialog box choose Search for a suitable driver for my device Click Next button to continue Insert the TDRV002 SW 65 driver disk select the matching drive of the distribution media in the dialog box Click Next button to continue Now the driver wizard should find a suitable device driver on the distribution media Click Next button to continue Complete the upgrade device driver and click Finish to make all the changes take effect The driver will create the TDRV002 devices 65 Windows Device Driver Page 5 of 16 TENSE TECHNOLOGIES Now the bus driver for TEWS TECHNOLOGIES serial modules is installed The system will now ask for the serial device
12. in Property Page March 29 2011 Chapter Known Problems added 2 0 2 Chapter Known Problems modified November 17 2011 TDRV002 SW 65 Windows Device Driver Page 2 of 16 TENSE TECHNOLOGIES Table of Contents 1 INTRODUCTION yi voccieiiicceenciewiwesevencuencuereuecuewcueweuewcwewewewsuewevewewsweveweusweveweweweweweuewevewouew 4 s INSTALLATION E 5 2 1 Software Installation osc e sesigeggeeegeht gege 5 2 11 WIAA VC 5 2 1 2 Windows XP WiNdOWS 7 6 2 2 Confirming Driver Installation c scceseeeeseeeseeeeeseeeeeeeeeseaeseseeeenseeeseeeseseaesasneeeeeeeeseesaseeeeneeeeees 6 3 DEFAULT CONFIGURATION ss siscisissscssnnsisasnsencnesnsuntsesinenssentecniaxsesnttacetecntecsieatieeseeniens 7 3 1 Basic Port Getttnge eege EECH 7 3 2 Advanced Port SCteinGS roiie ainena cece rss cece nace ctue EES neeeeceetens 7 4 DEVICE DRIVER PROGRAMMING ccccceceeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeseeeeeeeseeeeeeeeeeeeeess 8 4 1 TDRV002 Files and UO FUNCtiOnsS scccceecesecesseeeeseeeeneeeeseaesesaeeenseeeeeaeseseaesaseeeseeneesseesaseeeeneeaeees 9 4 1 1 Opening a TDRV002 Device cece cee ceee eee eeceeeeeeeaeeeeeeeeeaeeeceaeeeeaaeseeeeeseeeeesaeeesaaesseneeeed 9 4 1 2 Closing a TDRVO02 Device 00 eececccecceeeeneeceeeee cae eeeaaeeeeaeeceaeeecaaeeesaaeseceeeseaeeesaeeeeaaeeeenees 11 4 1 3 TDRVO002 Device I O Control FUNCTIONS 0 0 0 ccccccccecceceeseeeeeseeeeeeeseneeeeeseneeeeesensaeeeseneaeess 12 4 1 3 1
13. ing Driver Installation To confirm that the driver has been properly loaded perform the following steps 1 Open the Windows Device Manager a For Windows 2000 XP open the Control Panel from My Computer and click the System icon and choose the Hardware tab and then click the Device Manager button b For Windows 7 open the Control Panel from My Computer and then click the Device Manager entry 2 Click the in front of Embedded I O The enumerator device TEWS TECHNOLOGIES TDRV002 Family Serial Port Enumerator should appear 3 Click the in front of Ports COM amp LPT The serial port devices TEWS TECHNOLOGIES TDRV002 Family Serial Port Device COMxx should appear TDRV002 SW 65 Windows Device Driver Page 6 of 16 TEWS amp TECHNOLOGIES 3 Default Configuration The default configuration of the port can be modified by using the property page of the port device The property page can be opened from the device manager A right click to the port device will open a menu where Properties can be selected The property page will open The tab Port Settings will show the default settings of the port All settings will only be used on device startup Therefore it is necessary to restart the device after modifying any of the settings below Restart the device using the device manager or simply restart the system 3 1 Basic Port Settings Using this page
14. provide special communication services like reading and setting communication parameter transmitting immediate characters setting timeouts and so on All of these standard Win32 communication functions are described in detail in the Windows Platform SDK Documentation Windows base services Communication For details refer to the Win32 Programmers Reference of your used programming tools C Visual Basic etc The Windows name of the first port is Device tdrv002_0 of the second port Device tdrv002_1 and so on The DOS device name for TDRV002 devices is COM1 COM2 COM3 and so on If there are other serial devices in the system the prefix starts with a higher number see Windows name The mapping between Windows device names and DOS device names for TDRV002 devices can be retrieved from the Advanced Port Settings TDRV002 SW 65 Windows Device Driver Page 8 of 16 TEWS amp TECHNOLOGIES 4 1 TDRV002 Files and UO Functions The following section does not contain a full description of the Win32 functions for interaction with the TDRV002 device driver Only the required parameters are described in detail 4 1 1 Opening a TDRV002 Device Before you can perform any I O the TDRV002 device must be opened by invoking the CreateFile function CreateFile returns a handle that can be used to access the TDRV002 device HANDLE CreateFile LPCTSTR_ pFileName DWORD dwDesiredAccess DWORD dwShareMode LPS
15. to COM7 up to COM10 instead of COM3 up to COM6 as expected this may be caused by problems when uninstalling devices and drivers This assignment can be corrected in two steps 1 Check and remove hidden and no more needed COM devices if any are found Therefore it may be necessary to enable hidden devices shown in the device manager This can be enabled by setting the following Environment Variables Devmgr_show_details 1 Devmgr_show_nonpresent_devices 1 2 Use the COM port assignment as described in the 3 2 Advanced Port Settings to assign the correct COM Port name 5 3 Settings in HyperTerminal The driver does not support changing settings with HyperTerminal Other terminal applications will work fine TDRV002 SW 65 Windows Device Driver Page 16 of 16

Download Pdf Manuals

image

Related Search

Related Contents

  取扱説明書  Canada - Buyandsell.gc.ca  サカつくシュート!  Cables Direct 5m Cat5e  SQL*Plus User`s Guide and Reference, Release 9.2  WSO100 Ultrasonic Wind / Weather Station User`s Manual  

Copyright © All rights reserved.
Failed to retrieve file