Home

FTD2XX.DLL Dynamic Library USER MANUAL

image

Contents

1. LED 13 UE UIC eae a ec geared Lu LEE de esate I d 14 FAAS etDataCMAraClenSteS c aer tette tot ct iad atte tie rect me ation 14 iT fos COMMON 15 FI G Modo midiku residence all ER I LU iA DEDI A ELLE 16 csi ses HERO UE DERE HEU HE REUS 16 e onu c uM iu LLL E 17 ET GCL QU CUS 0065 il nel LA LLL ML 17 GOAS umu ROSE 17 io cde mter a tese eed ues cu e Det ninawa mitha Qa 18 EE DSP VEE e MR 19 FT Gredte DO VICGIIM OSU e 19 FT GetDevicelnfolist tp ee ins 19 FT O G tD8VI6e feDetal uu Le te au e 20 21 Mc Reo M T 21 PU SelBIIM006 coo eir sanan aqna tac LED Sue leet Nae cs gnc aca hee 22 2 E R PEA E AE E A AE AE TE E EE A EA E EE AE TE 22 woe REN 24 SUPPORT INFORMATION v 22 tetur teer na met oth uum 25 tet x ua uum aasan 25 ENGINEERING PROBLEM RE OR Tee eea a y uu uyo kuu 26 5 IPSES S r l Via Suor L tto 10 20020 Cesate MI ITAL
2. 0 1 pi j K UMEN info ipses com 14 QDIPSES scientific electronics 1 I FTD2XX Dynamic ub user wana gt 5 5 scientific electronics Syntax FT STATUS FT SetDataCharacteristics FT HANDLE ftHandle UCHAR uWordLength UCHAR uStopBits UCHAR uParity Parameters ftHandle Handle of the device uWordLength Number of bits per word It must set as FT_B TS_8 in the case of 8 bit chosen or as FT BITS 7 in the case of 7 bits chosen uStopBits Number of stop bits It must setas FT STOP BITS 1 when one stop bit is requested oras FT STOP BITS 2 when two stop bits are requested uParity Number of parity bits It must set as FT PARITY NONE no parity bit or as FT PARITY ODD parity bit is odd or as FT PARITY EVEN parity bit is even or as FT PARITY MARK always high parity bit or as FT PARITY SPACE always low parity bit Return Value FT OK if successful otherwise the return value is an FT error code FT SetDataCharacteristics parameters needs to be set as listed below to communicate with devices provided by IPSES S r l Device uWordLength uStopBits uParity MT2USB 8 1 0 MT2USBMS 8 1 0 MT3USBMS 8 1 0 10 69 8 1 0 9 0 8 1 0 FT_SetFlowControl Description This function sets the flow control for the device Syntax FT STATUS FT SetFlowControl FT HANDLE ftHandle USHORT usFlowContro UCHAR uXon UCHAR uXoff Parameters ftHandle Handle of the device usFlowControl s
3. Syntax FT STATUS GetBitmode FT HANDLE ftHandle PUCHAR pucMode Parameters 22 IPSES S r l Via Suor Lazzarotto 10 20020 Cesate MI ITALY L I Tel 39 02 39449519 Fax 39 02 700403170 gt PS ES 0 1 pi j K UMEN scientific electronics info ipses com 1 b FTD2XX Dynamic ub AL IPSES scientific electronics ftHandle Handle of the device pucMode Pointer to unsigned char to store the instantaneous data bus value The lower nibble contains the current values of the pins both those which are inputs and those which are outputs Return Value OK if successful otherwise the return value is an FT error code Note This function is available only for MT2USB and MT2USBMS devices For further information please contact IPSES S r l 23 IPSES S r l Via Suor Lazzarotto 10 20020 Cesate MI ITALY C Tel 39 02 39449519 Fax 39 02 700403170 lt gt 5 5 http www ipses com e mail info ipses com 1 KS P SEAS IESES scientific electronics CONTACTS IPSES S r l conceives projects and markets electronic and scientific instruments The customized planning of our devices allows us to answer specific necessities for customers asking for embedded systems IPSES clients enjoy access to a dedicated project engineering team available as needed Our pool consists of highly competent professionals whose experie
4. gt 5 5 scientific electronics FTD2XX DLL Dynamic Library USER MANUAL Rel 01 01 0002 CONCEIVING PLANNING DEVELOPMENT IN SCIENTIFIC www ipses com ELECTRONICS p 252 FTD2XX Dynamic Lib USER MANUAL dr PS ES scientific electronics Information provided in this manual is property of IPSES S r l and must be considered and treated as confidential This publication can only be reproduced transmitted transcribed or translated into any human or computer language with the written consent of IPSES S r l Information in this documentation has been carefully checked and is believed to be accurate as of the date of publication however no responsibility is assumed of inaccuracies IPSES will not be liable for any consequential or incidental damages arising from reliance on the accuracy of this documentation Information contained in this manual is subject to change without notice and does not represent a commitment on the part of IPSES The design of this instrument is subject to continue development and improvement Consequently the equipment associated to this document may incorporate minor changes in detail from the information hereafter provided All brand or product names are trademarks or registered trademarks of their respective holders This manual in English is the original version Printed in Italy Copyright 2009 2015IPSES S r l All rights reserved 2 IPSES S r l Via Suor Lazzarotto 10 20020 Cesate
5. MI ITALY lt I Tel 39 02 39449519 Fax 39 02 700403170 q E PS ES ycierefic electronics info ipses com 1 KN P I SO SIESES scientific electronics GUARANTEE IPSES warrants to the end user in accordance with the following provisions that its branded hardware products purchased by the end user from IPSES company or an authorized IPSES distributor will be free from defects in materials workmanship and design affecting normal use for a period of one year as of the original purchase date Products for which proper claims are made will at IPSES s option be repaired or replaced at IPSES s expense Exclusions This Guarantee does not apply to defects resulting from improper or inadequate installation use or maintenance actions or modifications by unauthorized third parties or the end user accidental or wilful damage or normal wear and tear Making a claim Claims must be made by contacting IPSES office within the guarantee period Please contact IPSES S r l Via Suor Lazzarotto 10 20020 Cesate MI Italy Tel 39 02 39449519 39 02 320629547 Fax 39 02 700403170 http www ipses com e mail supportQ ipses com Limitation and Statutory Rights IPSES makes no other warranty guarantee or like statement other than as explicitly stated above and this Guarantee is given in place of all other guarantees whatsoever to the fullest extent permitted by law In the absence of a
6. USER MANUAL gt 5 5 scientific electronics Name IPSES s r l Via Suor Lazzarotto 10 Company Cesate MI Italy Fax 39 02 700403170 Date Tel Fax e mail support ipses com Product Name Version Serial No Report Type bug change request or technical problem Major bug g Urgency Minor bug High Change request Medium T Technical problem L Low L Problem Description Reproduction of Problem IPSES s r l Action notes Received by Date Report No Action 26 IPSES S r l Via Suor Lazzarotto 10 20020 Cesate ITALY A Tel 39 02 39449519 Fax 39 02 700403170 SAO PSE http www ipses com e mail info ipses com 5M 7 j N scientific electro 5 scientific electronics Bob D Rel 01 01 0002 IPSES S r l Via Suor Lazzarotto 10 20020 Cesate MI ITALY Tel 39 02 39449519 39 02 320629547 Fax 39 02 700403170 e mail info ipses com support Q ipses com 27 IPSES S r l Via Suor Lazzarotto 10 20020 Cesate MI ITALY 5 E Tel 39 02 39449519 Fax 39 02 700403170 Lo scientific electronics info ipses com
7. mail info ipses com 1 G1 IP SES scientific electronics The location IDs of all connected devices are returned if FT LIST ALL and FT OPEN BY LOCATION bits are set in dwFlags In this case the parameter 01 is interpreted as a pointer to an array of variables of type long to contain the location IDs and the parameter pvArg2 is interpreted as a pointer to a DWORD location to store the number of devices currently connected FT Open Description Opens the device and return a handle which will be used for subsequent accesses Syntax FT STATUS FT Open int iDevice FT HANDLE ftHandle Parameters iDevice Index of the device to open Indices are 0 based ftHandle Pointer to a variable of type FT HANDLE where the handle will be stored This handle must be used to access the device Return Value FT OK if successful otherwise the return value is an FT error code Note Although this function can be used to open multiple devices by setting iDevice to 0 1 2 etc there is no ability to open a specific device To open named devices use the function FT OpenEx With the FT OpenEx function it is possible to open a device also trough its serial number or trough its description FT OpenEx Description Opens the specified device and return a handle that will be used for subsequent accesses The device can be specified by its serial number device description or location This function can also be
8. store device ID pcSerialNumber Pointer to buffer to store device serial number as a null terminated string pcDescription Pointer to buffer to store device description as a null terminated string pvDummy Reserved for future use should be set to NULL Return Value FT OK if successful otherwise the return value is an FT error code Note This function is used to return the device type device ID device description and serial number The device ID is encoded in a DWORD the most significant word contains the vendor ID and the least significant word contains the product ID So the returned ID 0x04036001 corresponds to the device ID VID 0403 amp PID 6001 18 IPSES S r l Via Suor Lazzarotto 10 20020 Cesate MI ITALY I Tel 39 02 39449519 Fax 39 02 700403170 2 PS ES scientiic electronics info ipses com 1 19 P I Dyramis Lib usn SEA IP SES scientific electronics FT ResetPort Description Send a reset command to the port Syntax FT STATUS FT ResetPort FT HANDLE ftHandle Parameters ftHandle Handle of the device Return Value OK if successful otherwise the return value is an FT error code Note This function is used to attempt to recover the port after a failure It is not equivalent to an unplug replug event FT CreateDevicelnfoList Description This function builds a device information list and returns the number of D2XX devices connected to the system The list contains
9. the system change the device info list will not be updated until CreateDevicelnfoList is called again Location ID information is not returned for devices that are open when FT CreateDevicelnfoList is called Information is not available for devices which are open in other processes In this case the Flags parameter of the FT DEVICE LIST INFO NODE will indicate that the device is open but other fields will be unpopulated The array of FT DEVICE LIST INFO NODES contains all available data on each device The storage for the list must be allocated by the application The number of devices returned by FT CreateDevicelnfoList can be used to do this When programming in Visual Basic LabVIEW or similar languages FT GetDevicelnfoDetail may be required instead of this function FT GetDevicelnfoDetail Description This function returns an entry from the device information list Syntax FT STATUS FT GetDevicelnfoDetail DWORD dwindex LPDWORD pdwFlags LPDWORD pdwType LPDWORD pdwID LPDWORD pdwLocld PCHAR pcSerialNumber PCHAR pcDescription FT HANDLE ftHandle Parameters dwindex Index of the entry in the device info list lpdwFlags Pointer to unsigned long to store the flag value lpdwType Pointer to unsigned long to store device type IpdwlD Pointer to unsigned long to store device ID IpdwLocld Pointer to unsigned long to store the device location ID pcSerialNumber Pointer to buffer to store device serial number as a null terminated str
10. Y 25 1 Tel 39 02 39449519 Fax 35 02 700403170 PSES scientiic electronics http www ipses com e mail info ipses com 40 4 j N l 5 REVISION HISTORY i FTD2XX Dynamic Lib USER MANUAL gt 5 Manual revision history ES scientific electronics IPSES S r l Via Suor Lazzarotto 10 20020 Cesate ITALY Tel 39 02 39449519 Fax 39 02 700403170 http www ipses com e mail info ipses com Revision Change description Author Date 01 00 0000 First version Released Barbera D July 2006 01 01 0000 Included FT_SetBitMode and FT GetBitMode Rivolta April 2009 function s description Other minor upgrade 01 01 0001 Minor changes Mancuso C M April 2014 01 00 0002 Update document layout Bottaccioli M June 2015 lt i gt IPSES scientific electronics scientific electronics 1 s FTD2XX Dynamic Lib usen KA IPSES D2XX Driver Architecture The FTD2XX DLL Dynamic Library for Windows allows you to write your application software to interface with the control card devices by IPSES S r l using a DLL The architecture of the FTD2XX DLL drivers consists of a Windows WDM driver that communicates with the device via the Windows USB Stack and a DLL which interfaces the Application Software written in VC C Builder Delphi VB etc to the WDM driver The FTD2XX DLL interface provides a simple easy to use set of functions to a
11. ccess MT2USB MT2USBMS MT3USBMS 10 69 IN8 and 9 0 control cards Application software Visual C Customer s Application Visual Basic Software Delphi Application Software Interface FTD2XX DLL Supplied DLL WDM Driver Interface Windows USB Interface Nin 9A ME 2000 XP Vista eran stack Windows USB drivers USB Physical MT2USB MT2USBMS MT3USBMS 10 69 control cards IPSES motors amp process 7 IPSES S r l Via Suor Lazzarotto 10 20020 Cesate MI ITALY A M E PS ES Tel 39 02 39449519 Fax 39 02 700403170 SA 0 1 4 j K UMEN scientific electronics info ipses com FTD2XX Dynamic Lib USER MANUAL dr PS ES scientific electronics 17 P We Variables UCHAR unsigned char 1 byte PUCHAR pointer to unsigned char 4 bytes PCHAR pointer to char 1 byte DWORD unsigned long 4 bytes FT HANDLE DWORD Status errors FT STATUS DWORD FT OK 0 FT INVALID HANDLE 1 FT DEVICE NOT FOUND 2 FT DEVICE NOT OPENED 3 FT IO ERROR 4 FT INSUFFICIENT RESOURCES 5 FT INVALID PARAMETER 6 FT INVALID BAUD RATE 7 FT DEVICE NOT OPENED FOR ERASE 8 FT DEVICE NOT OPENED FOR WRITE 9 FT FAILED TO WRITE DEVICE 10 FT EEPROM READ FAILED 11 FT EEPROM WRITE FAILED 12 FT EEPROM ERASE FAILED 13 FT EEPROM NOT PRESENT 14 FT EEPROM NOT PROGRAMMED 15 FT INVALID ARGS 16 FT OTHER ERROR 17 Constants FT DEVICE LIST INFO NODE typedef struct ft device list info n
12. dwBytesWritten Pointer to a variable of type DWORD which receives the number of bytes written to the device Return Value FT_OK if successful otherwise the return value is an FT error code ResetDevice 13 IPSES S r l Via Suor Lazzarotto 10 20020 Cesate ITALY L I Tel 39 02 39449519 Fax 39 02 700403170 5 5 ycierafic electronics info ipses com 1 KN P I AIP SES Description This function sends a reset command to the device Syntax FT STATUS ResetDevice FT HANDLE ftHandle Parameters ftHandle Handle of the device Return Value OK if successful otherwise the return value is an FT error code FT SetBaudRate Description This function sets the baud rate for the device Syntax FT STATUS FT SetBaudRate FT HANDLE ftHandle DWORD dwBaudRate Parameters ftHandle Handle of the device dwBaudRate Baud rate value Return Value FT_OK if successful otherwise the return value is an FT error code scientific electronics FT_SetBaudRate parameter needs to be set as listed below to communicate with devices provided by IPSES Sri Device dwBaudRate MT2USB 9600 MT2USBMS 9600 MT3USBMS 9600 10 69 9600 9 0 19200 FT SetDataCharacteristics Description This function sets the data characteristics for the device IPSES S r l Via Suor Lazzarotto 10 20020 Cesate MI ITALY Tel 39 02 39449519 Fax 39 02 700403170
13. e return value is an FT error code FT GetStatus 17 IPSES S r l Via Suor Lazzarotto 10 20020 Cesate MI ITALY L I Tel 39 02 39449519 Fax 39 02 700403170 5 5 31O 4 j K UMEN scientiic electronics info ipses com 1 SEA S IESES scientific electronics Description Get the device status including number of characters in the receive queue number of characters in the transmit queue and the current event status Syntax FT STATUS GetStatus FT HANDLE ftHandle LPDWORD IpdwAmountlnRxQueue LPDWORD IpdwAmountinTxQueue LPDWORD pdwEventstatus Parameters ftHandle Handle of the device lpdwAmountInRxQueu Pointer to a variable of tppe DWORD which receives the number of characters in the receive queue lpdwAmountlnTxQueue Pointer to a variable of type DWORD which receives the number of characters in the transmit queue lpdwEventstatus Pointer to a variable of type DWORD which receives the current state of the event status Return Value OK if successful otherwise the return value is an FT error code FT GetDevicelnfo Description Get device information for an open device Syntax FT STATUS FT GetDevicelnfo FT HANDLE ftHandle FT DEVICE pftType LPDWORD IpdwID PCHAR pcSerialNumber PCHAR pcDescription PVOID pvDummy Parameters ftHandle Handle of the device pftType Pointer to unsigned long to store device type Lpdwld Pointer to unsigned long to
14. es provided by the law during the installation and the use of this device For any information which is not contained in this guide please contact IPSES S r l Via Suor Lazzarotto 10 20020 Cesate MI Italy Tel 39 02 39449519 39 02 320629547 Fax 39 02 700403170 http www ipses com e mail supportQ ipses com 4 IPSES S r l Via Suor Lazzarotto 10 20020 Cesate MI ITALY L 1 5 5 Tel 39 02 39449519 Fax 39 02 700403170 x gt I http www ipses com e mail info ipses com O ab 4 1 1 FTDZXX Dyramis Lib unm AIP SES scientific electronics TABLE OF CONTENTS uu RO 1 TABLE OF CGONTEN DO red 5 uu re Pr uM I UE 6 IDeXXDnver Arhitectlile 7 MariablBSuccrs AEN 5 x gt u u gt 8 8 BIB SUTTON RERO REEL 10 FL uem Uc ECIAM 10 LT OBEN sonent Doe a ue 11 ELO uu buc enne Unc ua E Eae 11 mem T 12 NICO O 12 ir u s 13 FT ACS D Y u
15. essful otherwise the return value is FT error code FT Purge Description This function purges receive and transmit buffers in the device Syntax STATUS FT Purge FT HANDLE ftHandle ULONG uMask 16 IPSES S r l Via Suor Lazzarotto 10 20020 Cesate MI ITALY gt PS ES Tel 39 02 39449519 Fax 39 02 700403170 44 2 0 1 4 j K UMEN scientific electronics info ipses com 1 19 P I FTUZXX Dyramis Lib usn SIESES scientific electronics Parameters FtHandle Handle of the device uMask Any combination of FT PURGE RX and FT PURGE TX Return Value FT OK if successful otherwise the return value is an FT error code FT SetTimeouts Description This function sets the read and write timeouts for the device Syntax FT STATUS SetTimeouts FT HANDLE ftHandle DWORD dwReadTimeout DWORD dwWriteTimeout Parameters FtHandle Handle of the device dwReadTimeout Read timeout in milliseconds dwWrite Timeout Write timeout in milliseconds Return Value FT_OK if successful otherwise the return value is an FT error code FT GetQueueStatus Description Gets the number of bytes in the receive queue Syntax FT STATUS FT_GetQueueStatus FT HANDLE ftHandle LPDWORD pdwAmountinRxQueue Parameters ftHandle Handle of the device IpdwAmountInRxQueue Pointer to a variable of type DWORD which receives the number of bytes in the receive queue Return Value FT OK if successful otherwise th
16. et the kind of flow control It must be one of FT FLOW NONE no flow control FT FLOW RTS CTS hardware RTS CTS flow control FT FLOW DTR DSR hardware DTR DSR flow control or FT FLOW XON XOFF software XON XOFF flow control uXon Character used to signal Xon Only used if flow control is FT FLOW XON XOFF 15 IPSES S r l Via Suor Lazzarotto 10 20020 Cesate MI ITALY M I Tel 39 02 39449519 Fax 39 02 700403170 44 AO PS ES http www ipses com e mail info ipses com 40 4 Hi J N 1 FTD2XX Dynamic ub use wana gt 5 5 scientific electronics uXoff Character used to signal Only used if flow control is FT FLOW XON XOFF Return Value FT OK if successful otherwise the return value is an FT error code FT SetFlowControl parameters needs to be set as listed below to communicate with devices provided by IPSES Sl Device usFlowControl uXon uXoff MT2USB NONE 0 0 MT2USBMS NONE 0 0 MT3USBMS NONE 0 0 10 69 NONE 0 0 9 0 NONE 0 0 FT GetModemStatus Description Gets the modem status and line status from the device Syntax FT STATUS FT GetModemStatus FT HANDLE ftHandle LPDWORD pdwModemStatus Parameters FtHandle Handle of the device lpdwModemStatus Pointer to a variable of type DWORD which receives the modem status from the device Status lines are bit mapped as follows CTS 0x10 DSR 0x20 RI 0x40 DCD 0x80 Return Value OK if succ
17. il dwBytesToRead have been read into the buffer The number of bytes in the receive queue can be determined by calling FT GetStatus or FT GetQueueStatus and passed to Read as dwBytesTohRead so that the function reads the device and returns immediately When a read timeout value has been specified in a previous call to FT SetTimeouts FT Read returns when the timer expires or dwBytesToRead have been read whichever occurs first If the timeout occurred FT Read reads available data into the buffer and returns FT OK An application should use the function return value and odwBytesReturned when processing the buffer If the return value is FT OK and pdwBytesReturned is equal to dwBytesToRead then FT Read has completed normally If the return value is FT and podwBytesReturned is less then dwBytesToRead then a timeout has occurred and the read has been partially completed Note that if a timeout occurred and no data was read the return value is still OK A return value of FT ERROR suggests an error in the parameters of the function or a fatal error like USB disconnect has occurred FT Write Description Writes a string to the device Syntax FT STATUS FT Write FT HANDLE ftHandle LPVOID lpBuffer DWORD dwBytesToWrite LPDWORD IpdwBytesWritten Parameters ftHandle Handle of the device lpBuffer Pointer to the buffer which contains the data to be written to the device DwBytesToWrite Number of bytes to write to the device lo
18. information about both unopen and open devices Syntax FT STATUS FT CreateDevicelnfoList LPDWORD pdwNumDevs Parameters lpdwNumDevs Pointer to unsigned long to store the number of devices connected Return Value FT OK if successful otherwise the return value is an FT error code Note An application can use this function to get the number of devices attached to the system It can then allocate space for the device information list and retrieve the list using FT GetDevicelnfoList or FT GetDevicelnfoDetail If the devices connected to the system change the device info list will not be updated until FT CreateDevicelnfoList is called again FT GetDevicelnfoList Description This function returns a device information list and the number of D2XX devices in the list 19 IPSES S r l Via Suor Lazzarotto 10 20020 Cesate MI ITALY L I Tel 39 02 39449519 Fax 39 02 700403170 gt PS ES scientiic electronics info ipses com 1 I FTD2XX Dynamic ub CEA IPSES scientific electronics Syntax FT STATUS FT GetDevicelnfo FT DEVICE LIST INFO NODE pDest LPDWORD pdwNumDevs Parameters pDest Pointer to an array of FT DEVICE LIST INFO NODE structures lpdwNumDevs Pointer to the number of elements in the array Return Value FT OK if successful otherwise the return value is an FT error code Note This function should only be called after calling FT CreateDevicelnfoList If the devices connected to
19. ing pcDescription Pointer to buffer to store device description as a null terminated string ftHandle Pointer to a variable of type FT HANDLE where the handle will be stored Return Value FT OK if successful otherwise the return value is an FT error code Note 20 IPSES S r l Via Suor Lazzarotto 10 20020 Cesate MI ITALY Tel 39 02 39449519 Fax 39 02 700403170 QA gt PS ES 0 1 4 j K UMEN scientific electronics info ipses com 1 15 IJ FTD2XX Dynamic ub user wana CEA IPSES scientific electronics This function should only be called after calling FT CreateDevicelnfoList If the devices connected to the system change the device info list will not be updated until FT CreateDevicelnfoList is called again The index value is zero based The flag value is a 4 byte bit map containing miscellaneous data Bit 0 least significant bit of this number indicates if the port is open 1 or closed 0 Bit 1 indicates if the device is enumerated as a high speed USB device 2 or a full speed USB device 0 The remaining bits 2 31 are reserved Location ID information is not returned for devices that are open when FT CreateDevicelnfoList is called To return the whole device info list as an array of FT DEVICE LIST INFO NODE structures use FT CreateDevicelnfoList FT GetDriverVersion Description This function returns the D2XX driver version number Syntax FT STATUS FT GetDriverVersion FT HANDLE ftHand
20. le LPDWORD IpdwDriverVersion Parameters ftHandle Handle of the device lpdwDriverVersion Pointer to the driver version number Return Value FT OK if successful otherwise the return value is an FT error code Note A version number consists of major minor and build version numbers contained in a 4 byte field unsigned long ByteO least significant holds the build version Byte1 holds the minor version and Byte2 holds the major version Byte3 is currently set to zero For example driver version 3 01 02 is represented as 0x00030102 Note that a device has to be opened before this function can be called FT GetLibraryVersion Description This function returns D2XX DLL version number Syntax FT STATUS FT GetLibraryVersion LPDWORD pdwDLL Version Parameters lpdwDLL Version Pointer to the DLL version number Return Value FT OK if successful otherwise the return value is an FT error code 21 IPSES S r l Via Suor Lazzarotto 10 20020 Cesate MI ITALY I Tel 39 02 39449519 Fax 39 02 700403170 5 5 http www ipses com e mail mn info ipses com 7 j N 1 FTDZXX E scientific electronics Note A version number consists of major minor and build version numbers contained in a 4 byte field unsigned long Byte 0 least significant holds the build version byte 1 holds the minor version and byte 2 holds the major version byte 3 is currently set
21. nce in this field is extremely strong Thanks to constant updating and technical development IPSES is a leading company combining the dynamism of a young group into the competence and reliability of a qualified staff IPSES S r l Research and development office Via Suor Lazzarotto 10 20020 Cesate MI Italy tel 39 02 39449519 39 02 320629547 fax 39 02 700403170 e mail info ipses com http www ipses com 24 IPSES S r l Via Suor Lazzarotto 10 20020 Cesate ITALY L I PS ES Tel 39 02 39449519 Fax 39 02 700403170 LO scientific electronics info ipses com 1 P I Frade buna 4A IP SES scientific electronics SUPPORT INFORMATION The customer is at liberty to contact the relevant engineer at IPSES S r l directly Telephone 39 02 39449519 39 02 320629547 Fax 39 02 700403170 Email support ipses com PROBLEM REPORT The next page is a standard template used for reporting system problems It can be copied and send as a fax Alternative bugs may be reported by emails in this case please insure that the mail contains similar information listed in the Engineering Problem Report form 25 IPSES S r l Via Suor Lazzarotto 10 20020 Cesate MI ITALY lt lt I PS ES Tel 39 02 39449519 Fax 39 02 700403170 Lo I 0 1 4 j K UMEN scientific electronics info ipses com l L 22 ENGINEERING PROBLEM REPORT Problem describer FTD2XX Dynamic Lib
22. ode 1 DWORD Flags DWORD Type DWORD ID DWORD Locl D char SerialNumber 16 char Description 64 FT HANDLE ftHandle FT DEVICE LIST INFO NODE 8 IPSES S r l Via Suor Lazzarotto 10 20020 Cesate MI ITALY 5 5 Tel 39 02 39449519 Fax 39 02 700403170 http www ipses com e mail info ipses com 40 4 j N 15 P NS scientific electronics FT LIST NUMBER ONLY 0x80000000 FT LIST BY INDEX 0x40000000 FT LIST ALL 0x20000000 FT OPEN BY SERIAL NUMBER 1 FT OPEN BY DESCRIPTION 2 FT OPEN BY LOCATION 4 FT BITS 8 8 FT BITS 7 7 FT STOP BIT 1 0 FT STOP BIT 2 2 FT PARITY NONE 0 FT PARITY ODD 1 FT PARITY EVEN 2 FT PARITY MARK 3 FT PARITY SPACE 4 FT FLOW NONE 0x0000 FT FLOW RTS CTS 0x0100 FT FLOW DTR DSR 0x0200 FT FLOW XOFF 0x0400 FT PURGE RX 1 FT PURGE TX 2 9 IPSES S r l Via Suor Lazzarotto 10 20020 Cesate MI ITALY 3 5 5 Tel 39 02 39449519 Fax 39 02 700403170 Lo 00 1 4 j K UMEN scientific electronics info ipses com 1 9 r I FTD2XX Dynamic Lib use manu GAL IPSES scientific electronics DLL Functions FT ListDevices Description Gets information concerning the devices currently connected This function can return information such as the number of devices connected the device serial number and device description strings and the location IDs of connected devices Syntax FT STATUS FT ListDevices PVOID p
23. pplicable legislation this Guarantee will be the end user s sole and exclusive remedy against IPSES General Provisions IPSES makes no express warranties or conditions beyond those stated in this warranty statement IPSES disclaims all other warranties and conditions express or implied including without limitation implied warranties and conditions of merchantability and fitness for a particular purpose IPSES s responsibility for malfunctions and defects in hardware is limited to repair and replacement as set forth in this warranty statement IPSES does not accept liability beyond the remedies set forth in this warranty statement or liability for incidental or consequential damages including without limitation any liability for products not being available for use or for lost data or software With the exclusion of shipping costs for and from IPSES s development office 3 IPSES S r l Via Suor Lazzarotto 10 20020 Cesate MI ITALY L 39 02 39449519 39 02 700403170 gt PS ES scientific electronics info ipses com 1 19 P I SEA IP SES scientific electronics WARNING ELECTRICAL DEVICES COULD DAMAGE EQUIPMENT OR PROPERTY OR CAUSE PERSONAL INJURY This guide contains instructions and technical features of the FTD2XX DLL Dynamic Library Read with attention before attempting to install It is the responsibility of the technician to undertake all the safety rul
24. ring that represents the device description if dwFlags is FT OPEN BY LOCATION 01 is interpreted as a long value that contains the location ID of the device ftHandle is a pointer to a variable of type FT HANDLE where the handle is to be stored This handle must be used to access the device FT Close Description Closes an open device and releases its resources Syntax FT STATUS FT Close FT HANDLE ftHandle Parametres ftHandle Handle of the device Return Value FT OK if successful otherwise the return value is an FT error code FT Read Description Reads a string from the device Syntax FT STATUS FT Read FT HANDLE ftHandle LPVOID lpBuffer DWORD dwBytesToRead LPDWORD lpdwBytesReturned Parameters ftHandle Handle of the device lpBuffer Pointer to the buffer that receives the data from the device DwBytesToRead Number of bytes to be read from the device 12 IPSES S r l Via Suor Lazzarotto 10 20020 Cesate MI ITALY L Tel 39 02 39449519 39 02 700403170 5 ES http www ipses com e mail info ipses com you 1 J 4 qe FTD2XX Dynamic ub user wana gt 5 5 scientific electronics lpdwBytesReturned Pointer to a variable of type DWORD which receives the number of bytes read from the device Return Value FT OK if successful FT IO ERROR otherwise Note FT Read always returns the number of bytes read in pdwBytesReturned This function does not return unt
25. ted as the index of the device and the parameter pvArg2 is interpreted as a pointer to a buffer to contain the appropriate string Indexes are zero based and the error code FT DEVICE NOT FOUND is returned for an invalid index It can be used to return device string information for all connected devices If FT LIST ALL and FT OPEN BY SERIAL NUMBER or FT OPEN BY DESCRIPTION bits are set in dwFlags the parameter pvArg1 is interpreted as a pointer to an array of pointers to buffers to contain the appropriate strings and the parameter pvArg2 is interpreted as a pointer to a DWORD location to store the number of devices currently connected Note that for pvArg1 the last entry in the array of pointers to buffers should be a NULL pointer so the array will contain one more location than the number of devices connected The location ID of a device is returned if FT LIST BY INDEX and FT OPEN BY LOCATION bits are set in dwFlags In this case the parameter pvArg1 is interpreted as the index of the device and the parameter pvArg2 is interpreted as a pointer to a variable of type long to contain the location ID Indexes are zero based and the error code FT DEVICE NOT FOUND is returned for an invalid index Please note that Windows CE and Linux do not support location IDs 10 IPSES S r l Via Suor Lazzarotto 10 20020 Cesate MI ITALY L Tel 39 02 39449519 Fax 39 02 700403170 QA PS ES 49 j N scientific electronics http www ipses com e
26. to zero For example driver version 3 01 02 is represented as 0x00030102 Note that this function does not take a handle and so it can be called without opening a device FT SetBitMode Description Enables the CBUS Bit Bang Mode on MT2USB and MT2USBMS devices Syntax FT STATUS FT SetBitmode FT HANDLE ftHandle UCHAR ucMask UCHAR ucMode Parameters ftHandle Handle of the device ucMask Required value for bit mode mask The upper nibble of this value controls which pins are inputs and outputs a bit value of 0 sets the corresponding pin to an input a bit value of 1 sets the corresponding pin to an output The lower nibble controls which of the outputs are high bit sets to 1 and low bit sets to 0 ucMode Mode value Can be one of the following 0x00 Reset 0x20 CBUS Bit Bang Mode Return Value OK if successful otherwise the return value is an FT error code Note This function is available only for MT2USB and MT2USBMS devices The CBUS mode allows to control directly four physical pins C3 to CO of the USB chip on the device For the devices provided by IPSES S r l are available only pins C3 and C2 while pins C1 and CO are reserved So the ucMask should be sets as 00 00 where X will be 0 input or 1 output and Y will be the pins status For further information please contact IPSES S r l FT GetBitMode Description Gets the instantaneous values of CBUS Bit Bang Mode on MT2USB and MT2USBMS devices
27. used to open multiple devices simultaneously Multiple devices can be specified by serial number device descriptor or location ID location information derived from the physical locations of a device on USB Location IDs for devices connected to a system can be obtained by calling FT GetDevicelnfoList or FT ListDevices with the appropriate flags Syntax FT STATUS FT OpenEx PVOID pvArg1 DWORD dwFlags FT HANDLE Parameters pvArgt Pointer to an argument whose type depends on the value of dwFlags It is normally be interpreted as a pointer to a null terminated string dwFlags FT OPEN BY SERIAL NUMBER FT OPEN BY DESCRIPTION Or FT OPEN BY LOCATION 11 IPSES S r l Via Suor Lazzarotto 10 20020 Cesate MI ITALY I Tel 39 02 39449519 Fax 39 02 700403170 5 5 http www ipses com e mail info ipses com 40 4 Hi J N 1 P I 4A IP SES scientific electronics ftHandle Pointer to a variable of type FT HANDLE where the handle will be stored This handle must be used to access the device Return Value OK if successful otherwise the return value is an FT error code Note The parameter specified in pvArg1 depends on dwFlags if dwFlags is FT OPEN BY SERIAL NUMBER pvArg is interpreted as a pointer to a null terminated string that represents the serial number of the device if dwFlags is FT OPEN BY DESCRIPTION pvArg1 is interpreted as a pointer to a null terminated st
28. vArg1 PVOID pvArg2 DWORD dwFlags Parameters pvArgi meaning depend on the dwFlags value see note below pvArg2 meaning depend on the dwFlags value see note below dwFlags Determines format of returned information see note below Return Value FT OK if successful otherwise the return value is an FT error code Note This function can be used in a number of ways to return different types of information A more powerful way to get device information is to use the FT CreateDevicelnfoList FT GetDevicelnfoList and FT GetDevicelnfoDetail functions as they return all the available information on devices In its simplest form it can be used to retum the number of devices currently connected If FT LIST NUMBER ONLY bit is set in dwFlags the parameter pvArg1 is interpreted as a pointer to DWORD location to store the number of devices currently connected It can be used to return device information if FT OPEN BY SERIAL NUMBER bit is set in dwFlags the serial number string will be returned if FT OPEN BY DESCRIPTION bit is set in dwFlags the product description string will be returned if FT OPEN BY LOCATION bit is set in dwFlags the Location ID will be returned if none of these bits is set the serial number string will be returned by default It can be used to return device string information for a single device If FT LIST BY INDEX and FT OPEN BY SERIAL NUMBER or FT OPEN BY DESCRIPTION bits are set in dwFlags the parameter pvArg1 is interpre

Download Pdf Manuals

image

Related Search

Related Contents

Manuel Utilisateur  Implementation of a Linux Workstation Based on The LEON Processor  Harbor Freight Tools Chain Saw Chain_Breaker/Spinner Product manual  MANUAL DE INSTRUÇÕES  3720 kB  CASE Tool - unistep.eu  Owners Manual v2  RED TRANSFRONTERIZA DE RECURSOS Y  

Copyright © All rights reserved.
Failed to retrieve file