Home

PISO-813 Series Classic Driver DLL Software Manual

image

Contents

1. gt Returns 16 bits data with the leading 8 bits are all O Only the low BYTE is valid PISO 813 Series Classic Driver DLL Software Manual PISO813_OutputWord This subroutine will send the 16 bits data to the desired I O port gt Syntax void PISO813_OutputWord DWORD wPortAddr WORD wOutputVal gt Parameters wPortAddr Input I O port addresses please refer to function PISO813_GetConfigAddressSpace Only the low WORD is valid wOutputVal Input 16 bit data send to I O port Only the low WORD is valid gt Returns None PISO813_InputWord This subroutine will input the 16 bit data from the desired I O port gt Syntax WORD PISO813_InputWord DWORD wPortAddr gt Parameters wPortAddr Input I O port addresses please refer to function PISO813_GetConfigAddressSpace Only the low WORD is valid gt Returns 16 bits data Only the low WORD is valid PISO 813 Series Classic Driver DLL Software Manual 2 6 Analog Input Functions PISO813_SetChGain This subroutine wills setting the cannel number and Gain Code Refer to Section 2 2 for the AD converter gt Syntax WORD PISO813_SetChGain DWORD wBase WORD wChannel WORD wGainCode gt Parameters wBase Input I O port base addresses please refer the PISO813_GetConfigAddressSpace wChannel Input A D channel number 0 to 31 wGainCode Input The value is O to 4 refer to Section 2 2 gt Returns PI
2. PISO 813 Series VB6 VC6 BCB Delphi Classic Driver DLL Sgy VB NET C NET d lt 2 es A ICP DAS PISO 813 Series Board 1 1 Obtaining the Driver Installer Package PIO 821 series card can be used on Linux and Windows 95 98 NT 2000 and 32 bit XP 2003 Vista 7 based systems and the drivers are fully Plug and Play PnP compliant for easy installation The driver installer package for the PISO 813 series can be found on the supplied CD ROM or can be obtained from the ICP DAS FTP web site The location and addresses are indicated in the table below Install the appropriate driver for your operating system as follows Win2K_XP_7 For Windows 2000 and 32 bit Windows XP Vista 7 Win98 For Windows 95 98 ME WinNT For Windows NT 4 0 1 2 Driver Installing Procedure Before the driver installation you must complete the hardware installation For detailed information about the hardware installation please refer to hardware user manual of PISO 813 series card The hardware user manual is contained in Step 1 Double Click PISO 813_Win2K_xxxx exe to install driver Step 2 Click the Next gt button to start the installation on the PISO 813 DLL and OCX Win2000 Setup window PISO 81 3 DLL See OCX v2 01 for Windows 2000 XP 2003 Supports PISO 813 PISO 613 DLL and OCZ Win2000 Setup Welcome to the InstallShield Wizard for PISO 813_ Wink The InstallS hieldA wizard will install PISO 67 2
3. 0 0 0 0x0 2 2 5 V 5 V 0 OU 1 0x1 4 1 25 V 2 5 V OU 1 0 0x2 8 0 625 V 1 25 V 0 1 1 0x3 16 Not Use 0 625 V 1 0 0 0x4 gt JP2 Unipolar Mode GAIN Control Code Table Input Range GAIN2 GAIN1 GAINO Gain Code JP1 10 V JP1 20V 1 0 10V Not Use 0 OU 0 0 2 Oo svV Not Use 0 0 1 1 4 0 2 5V Not Use 0 1 0 2 8 0 1 25V Not Use 0 1 1 3 16 0 0 625V Not Use 1 0 0 4 User Manual Ver 2 0 Feb 2014 Page 11 PISO 813 Series Classic Driver DLL Software Manual 2 3 Test Functions PISO813_GetDllVersion To get the version number of PISO813 DLL gt Syntax WORD PISO813_GetDllVersion void gt Parameters None gt Returns DLL version information For example If 200 hex value is return it means driver version is 2 00 PISO813_ShortSub To perform the subtraction as nA nB in short data type This function is provided for testing DLL linkage purpose gt Syntax short PISO813_ShortSub short nA short nB gt Parameters nA Input 2 bytes short data type value nB Input 2 bytes short data type value gt Returns The value of nA nB PISO 813 Series Classic Driver DLL Software Manual PISO813_FloatSub To perform the subtraction as fA fB in float data type This function is provided for testing DLL linkage purpose gt Syntax float PISO813_FloatSub float fA float fB gt Parameters fA Input 4 bytes floating point value B Input 4 bytes floating point valu
4. S E E a a Phd voawaebaeadwe sbdeaaslentaeeamstbIeeaeeebanies 10 2 2 PIG URN CODE EE EE 11 2 3 EE Eege 12 PISOB13 JGCCD I VEISION E 12 EEN 12 EE EEN 13 2 4 DRUER e el 14 PROSI ee Giang l l EE 14 PISOB TS EE 14 PISOS 13 Driver EE EE EE 15 PISOS1TS ee edel 15 2 5 DIGITAL INPUT OUTPUT FUNC e 17 PIS OB EE 17 PIS OB TS e 17 PISOS OUPO OG E 18 PIS OS 13 e EE 18 2 6 ANALOG INPUT Let e EE 19 PIS OB SUC E 19 PES OT EE 20 PIS OB TS VD Eege 21 PIS OG TF Eege 22 POST ENEE 23 fel XO oS A EE 24 Be vi le PROGR BIG EE 25 3 1 FOR MICROSOFT WINDOWS saci sastestsainsiunsdviatinsaundavasedautasuh buseesss tostinintoodupsshtnstavish bastuseh tos tinistenbeebshinstansh basen eoateaeeabinat 25 3 2 FOR IOS oe E E E E A 28 A PROGRAMS PRCA e RT 29 5 PROBLEMS FER OR EE 30 User Manual Ver 2 0 Feb 2014 Page 1 Si ER AW 1 Introduction The software is a collection of digital I O analog input subroutines for PISO 813 series card add on cards for Windows 95 98 NT 2000 and 32 bit Windows XP 2003 Vista 7 applications The application structure is presented in the following diagram The subroutines in PISO813 DLL are easy understanding as its name standing for It provides powerful easy to use subroutine for developing your data acquisition application Your program can call these DLL functions by VB VC Delphi BCB VB NET 2005 and C NET 2005 easily To speed up your developing process some demonstration source program are provided
5. Wwinzke on your computer To continue click Next l Cancel PISO 813 Series Classic Driver DLL Software Manual PISO 317 DLL and OCE Win2000 Setup Choose Destination Location Select folder where setup will install files Setup will install PISO 67 2 Winge m the following folder To install to this folder click Next To install to a different folder click Browse and select another folder Step 4 Selection No I will restart my computer later and then click the Finish button PISO 617 DLL and OCR WinZ000 Setup InstallShield Wizard Complete The InstallShield Wizard has successtully installed PIS0 8613 Wmdk Before you can use the program you must restart your computer C Yes want to restart my computer now Remove any disks from ther drives and then click Finish to complete setup Cancel User Manual Ver 2 0 Feb 2014 Page 5 PISO 813 Series Classic Driver DLL Software Manual 1 3 PnP Driver Installation Step 1 The system should find the new card and then continue to finish the Plug amp Play steps Note Some operating system such as Windows e e S i x Vista 7 will find the new card and make it work ay Found Nen eg Network Controller automatically so the Step2 to Step4 will be skipped Step 2 Select Install the software automatically Recommended and click the Next gt button Found Hew Hardware Wizard Welcome to the Found New Har
6. floating value lt AD Hex Demo Get the AD Hex value Following figure is the result for the demo program It can be applied to obtain the hardware information and function test of the PISO 813 board m DLL and Configuration Demo Sel Function Test DLL Version best Dm oo S Driver Version hes joo b test a b 7 Short_Sub_ a b Float _S5ub_ fa Bl This demo program provides the get the AD floating value w AD Demo Ads Float Analog to Digital Display Hardware Setting Total Boards Choose 4 Board Number to Active JP1 Setting JP2 Setting Hardware Setting Total Boards Choose a Board Pp Number to Active Ki JP1 Setting H agy JP2 Setting EEX PISO 813 Series Classic Driver DLL Software Manual 3 2 For DOS The demo program is contained in CD NAPDOS PCI PISO 813 DOS PISO813 CS http ftp icodas com pub cd iocard pci napdos pci piso 813 dos piso 813 ZG TC gt for Turbo C 2 xx or above lt MSC gt for MSC 5 xx or above ZG BC gt for BC 3 xx or above TC LIB gt for TC Library TC DEMO gt for TC demo program TC DIAG gt for TC diagnostic program TC LIB Large gt TC Large Model Library TC LIB Huge gt TC Huge Model Library File TC LIB Large PIO H gt TC Declaration File TC LIB Large TCPIO_L LIB gt TC Large Model Library File TC LIB Huge PIO H gt TC Declaration File TC LIB Huge TCPIO_H
7. table Furthermore the error code of all functions supported by PISO 813 is also listed in Section 2 1 Input Yes No Output No Yes Input Output Yes Yes Table2 1 Test Functions Table of PISO813 DLL 2 3 Test Functions float PISO813_ FloatSub float fA float fB short PISO813_ShortSub shor nA short nB WORD PISO813_GetDIIVersion void Table2 2 Driver Functions Table of PISO813 DLL 2 4 Driver Functions WORD PISO813_Driverlnit void viod PISO813_DriverClose void WORD PISO813_ SearchCard WORD wBoards DWORD dwP OCardID WORD PISO813_GetDriverVersion WORD wDriverVersion WORD PISO813_GetConfigAddressSpace WORD wBoardNo DWORD wAddrBase WORD wirqNo WORD wSubVendor WORD wSubDevice WORD wSubAux WORD wSlotBus WORd wSlotDevice PISO 813 Series Classic Driver DLL Software Manual Table2 3 DIO Functions Table of PISO813 DLL Section Function Definition Digital Input Output Functions void PISO813_OutputWord DWORD wPortAddress DWORD wOoutData void PISO813_OutputByte DWORD wPortAddr WORD bOutputValue DWORD PISO813_InputWord DWORD wPortAddress WORD PISO813_InputByte DWORD wPortAddr Table2 4 A D Functions Table of PISO813 DLL Section Function Definition Analog Input Functions WORD PISO813_SetChGain DWORD wAddrBase WORD wChannel WORD wGainCode WORD PISO813_AD_Hex DWORD wAddrBase WORD PISO813_Ads_Hex DWORD wAddrBase WORD wBuffer DWORD dwDataNo float PISO813_AD_Float
8. DWORD wAddrBase WORD wJump20v WORD wBipolar float PISO813_Ads_ Float DWORD wAddrBase WORD wJump20v WORD wBipolar float fBuffer DWORD dwDataNo float PISO813_ AD2F WORD whex WORD wGainCode WORD wJump20v WORD wBipolar User Manual Ver 2 0 Feb 2014 Page 9 PISO 813 Series Classic Driver DLL Software Manual 2 1 Error Code Table For the most errors it is recommended to check 1 Does the device driver installs successful Does the card have plugged Does the card conflicts with other device Close other applications to free the system resources Try to use another slot to plug the card aie Ee Restart your system to try again Error Code Error ID Error String 0 PISO813_NoError OK No Error 1 PISO813_DriverOpenError Device driver can t be opened l The PISO813_Driverlnit function 2 PISO813_DriverNoOpen f must be called first 3 PISO813_GetDriverVersionError Get driver version error PISO813_CallDriverError Call driver is error 5 PISO813_FindBoardError Cannot find board The board number exceeds the 6 PISO813_ExceedBoardNumber l maximum board number 7 Oxffff PISO813_TimeOutError Delay time out 100 0 PISO813_ ADError2 A D converter error User Manual Ver 2 0 Feb 2014 Page 10 PISO 813 Series Classic Driver DLL Software Manual 2 2 A D Gain Code Table gt JP2 Bipolar Mode GAIN Control Code Table Input Range GAIN2 GAIN1 GAINO Gain Code JP1 10 V JP1 20 V 1 5 V 10 V
9. LIB gt TC Huge Model Library File ZG MSC LIB Large PIO H gt MSC Declaration File lt MSC LIB Large MSCPIO_L LIB gt MSC Large Model Library File lt MSC LIB Huge PIO H gt MSC Declaration File lt MSC LIB Huge MSCPIO_H LIB gt MSC Huge Model Library File ZG BC LIB Large PIO H gt BC Declaration File BC LIB Large BCPIO_L LIB gt BC Large Model Library File BC LIB Huge PIO H gt BC Declaration File ZG BC LIB Huge BCPIO_H LIB gt BC Huge Model Library File The list of demo programs Dome1 Measure 32 channel A I Bipolar range 10 V to 10V Note that all of the hardware control functions need to be provided and processed by user themselves User Manual Ver 2 0 Feb 2014 Page 28 PISO 813 Series Classic Driver DLL Software Manual 4 Programs Architecture PISO813_DriverInit Enable All DI DO PISO813_InputByte PISO813_OutputByte Function Call into DLLs VXDs SYSs Device Driver Hardware Devices PISO 813 Series Classic Driver DLL Software Manual 5 Problems Report Technical support is available at no charge as described below The best way to report problems is to send electronic mail to Service icpdas com or Service icodas gmail com on the Internet When reporting problems please include the following information Is the problem reproducible If so how 2 What kind and version of platform that you using For example Windows 98 Wind
10. PISO 813 Series Classic Driver DLL Software Manual Version 2 0 Feb 2014 Board includes PISO 813 and PISO 813U All products manufactured by ICP DAS are warranted against defective materials for a period of one year from the date of delivery to the original purchaser ICP DAS assumes no liability for damages consequent to the use of this product ICP DAS reserves the right to change this manual at any time without notice The information furnished by ICP DAS is believed to be accurate and reliable However no responsibility is assumed by ICP DAS for its use nor for any infringements of patents or other rights of third parties resulting from its use Copyright 2014 by ICP DAS All rights are reserved Names are used for identification only and may be registered trademarks of their respective companies If you have any question please feel to contact us at service icpdas com service icodas gmail com We will give you quick response within 2 workdays PISO 813 Series Classic Driver DLL Software Manual TABLE OF CONTENTS 1 EIERE 2 1 1 OBTAINING THE DRIVER INSTALLER PACKAGE cenrricicisiiicin irori nin iN EAE AE O RAORAO ETRE EOE OEO OEEO 3 1 2 DRIVER INSTALLING PROCEDURE nssssssssssssssssssssssssssssesssssssssseseseseseeeesesseeeeeseeeseseeseeteeeeeteeeeetetteeteeteetttereteereeeeeeeeeeeeerereent 4 1 3 PNP DEVER INSTALATON eebe 6 2 DELEUNCTION DESCRIPTIONS cocirar eanna E E E cassia 8 2l ER OR CODE TARIE eonceo
11. SO813_NoError OK User Manual Ver 2 0 Feb 2014 Page 19 PISO 813 Series Classic Driver DLL Software Manual PISO813_AD2F This subroutine will convert the Hex value to floating value depending on Gain Code Bipolar Unipolar and 10 V 20 V gt Syntax float PISO813_ AD2F WORD wHexValue WORD wGainCode WORD wJump20v WORD weBipolar gt Parameters wHexValue Input Hex Value O to Oxfff wGainCode Input The value is O to 4 Refer to Section 2 2 for detail information wJump20v Input 1 20 V HW default 0 10 V wBipolar Input 1 Bipolar HW default 0 Unipolar gt Returns PISO813_ADError2 A D converter error return 100 0 Other value The floating point value of A D conversion 10 to 10 User Manual Ver 2 0 Feb 2014 Page 20 PISO 813 Series Classic Driver DLL Software Manual PISO813_AD_Hex This subroutine will perform an A D conversion by polling The A D converter is 12 bits for PISO 813 Refer to PISO813_SetChGain gt Syntax WORD PISO813_AD_Hex DWORD wBase gt Parameters wBase Input I O port base addresses please refer to PISO813_GetConfigAddressSpace gt Returns PISO813_TimeOutError A D converter error return Oxffff Other value The Hex value of A D conversion 0 to OxOffff User Manual Ver 2 0 Feb 2014 Page 21 PISO 813 Series Classic Driver DLL Software Manual PISO813_AD_Float This subroutine will perform an A D con
12. dware Wizard This wizard helps you install software for PISO 613 Isolated Analog Input Card Pa If your hardware came with an installation CD lt or floppy disk insert it now What do you want the wizard to do Cancel User Manual Ver 2 0 Feb 2014 Page 6 PISO 813 Series Classic Driver DLL Software Manual Step 3 Click the Finish button Found New Hardware Wizard Please wait while the wizard installs the software Hg UniDAQIPISO 813 Isolated Analog Input Card Setting a system restore point and backing up old files in case your system needs to be restored in the future Completing the Found New Hardware Wizard joo D O The wizard has finished installing the software for z BEE PISO 613 Isolated Analog Input Card Click Finish to close the wizard Step 4 Windows pops up Found New Hardware dialog box again Complete i Found New Hardware x Your new hardware is installed and ready to use User Manual Ver 2 0 Feb 2014 Page 7 2 DLL Function Descriptions All of the functions provided for PISO 813 series card are listed below in Tables 2 1 to 2 4 This list of functions is expanded on in the text that follows However in order to make a clear and simplified description of the functions the attributes of the input and output parameters for every function is indicated as input and output respectively as shown in following
13. e gt Returns The value of fA fB User Manual Ver 2 0 Feb 2014 Page 13 PISO 813 Series Classic Driver DLL Software Manual 2 4 Driver Functions PISO813_GetDriverVersion This subroutine will read the version number of PISO 813 driver gt Syntax WORD PISO813_GetDriverVersion WORD wDriverVersion gt Parameters wDriverVersion Output address of wDriverVersion gt Returns PISO813_NoError OK PISO813_DriverNoOpen The PISO 813 driver no open PIDO813_GetDriverVersionError Read driver version error PISO813_Driverlnit This subroutine will open the PISO 813 driver and allocate the resource for the device This function must be called once before calling other PISO 813 functions gt Syntax WORD P1SO813_Driverlnit gt Parameters None gt Returns PISO813_NoError OK PISO813_DriverNoOpen Open PISO 813 driver error PISO 813 Series Classic Driver DLL Software Manual PISO813_DriverClose W This subroutine will close the PISO 813 Driver and release the resource from the device This function must be called once before exit the user s application gt Syntax void PISO813_DriverClose gt Parameters None gt Returns None PISO813_GetConfigAddressSpace Get the I O address of PISO 813 board n gt Syntax WORD PISO813_GetConfigAddressSpace WORD wBoardNo DWORD wAddrBase WORD wirqNo WORD wSubVendor WORD wSubDevice WORD wSubAux WORD wsSlo
14. e data into this buffer The user cans analyze these data from the buffer after calling this function wCount Input Number of A D conversions will be performed gt Returns PISO813_NoError Operation is OK PISO813_TimeOutError A D converter error Oxffff User Manual Ver 2 0 Feb 2014 Page 23 PISO 813 Series Classic Driver DLL Software Manual PISO813_Ads_Float This subroutine will perform a number of A D conversions by polling This subroutine is very similar to PISO813_AD_Float except that this subroutine will perform wCount of conversions instead of just one conversion Then the A D data are stored in a data buffer in Float format The fBuf is the starting address of this data buffer Refer to PISO813_ SetChGain gt Syntax WORD PISO813_Ads_Float DWORD wBase WORD wJump20v WORD weBipolar float fBuf DWORD wCount gt Parameters wBase Input I O port base addresses please refer to PISO813_ GetConfigAddressSpace wJump20v Input 1 20 V HW default 0 10 V wBipolar Input 1 Bipolar HW default 0 Unipolar wBu Output Starting address of the data buffer in float format The user must allocate spaces for this buffer and send the address into the function This function will fill the data into this buffer The user cans analyze these data from the buffer after calling this function wCount Input Number of A D conversions will be performed gt Returns PISO813_ NoErro
15. ows 2000 or 32 bit Windows XP 2003 Vista 2008 7 3 What kinds of our products that you using Please see the product s manual 4 Ifa dialog box with an error message was displayed please include the full test of the dialog box including the text in the title bar 5 If the problem involves other programs or hardware devices what devices or version of the failing programs that you using 6 Other comments relative to this problem or any suggestions will be welcomed After we had received your comments we will take about two business days to test the problems that you said And then reply as soon as possible to you Please check that if we had received you comments And please keeps contact with us User Manual Ver 2 0 Feb 2014 Page 30
16. r Operation is OK PISO813_TimeOutError A D converter error Oxffff PISO 813 Series Classic Driver DLL Software Manual 3 Demo Programs 3 1 For Microsoft Windows ICP DAS PISO 813 Series Classic Driver DLL contains a set of functions It can be used in various application programs for PISO 813 series card The API functions supports many development environments and programming languages including Microsoft Visual C Visual Basic Borland Delphi gt Borland C Builder Microsoft Visual C NET gt Microsoft Visual VB NET The demo programs of Windows OS for the PISO 813 series can be found on the supplied CD ROM or can be obtained from the ICP DAS FTP web site The location and addresses are indicated in the table below CD NAPDOS PCI PISO 813 DLL_OCX Demo Go http ftp icpodas com pub cd iocard pci napdos pci piso 813 dll_ocx demo BCB4 gt for Borland C Builder 4 Delphi4 gt for Delphi 4 PISO813 H gt Header files PISO813 PAS gt Declaration files PISO813 LIB gt Linkage library for BCB only zb VC6 gt forVisualC 6 VB6 gt for Visual Basic 6 PISO813 H gt Header files PISO813 BAS gt Declaration files PISO813 LIB gt Linkage library for VC only 4 VB NET2005 gt for VB NET2005 CSharp2005 gt for C NET2005 PISO813 vb gt Visual Basic Source files PISO813 cs gt Visual C Source files The list of demo programs Config Demo Get cards information AD Float Demo Get the AD
17. tBus WORd wsSlotDevice gt Parameters wBoardNo Input PISO 813 board number PISO 813 Series Classic Driver DLL Software Manual wAddrBase Output The base address of PISO 813 board Only the low WORD is valid wlr aNo Output The IRQ number that the PISO 813 board using wSubVendor Output Sub Vendor ID wSubDevice Output Sub Device ID wSubAux Output Sub Aux ID wSlotBus Output Slot Bus number wSlotDevice Output Sub Device ID gt Returns PISO813_NoError OK PISO813_FindBoardError Handshake check error PIDO813_ ExceedBoardError wBoardNo is invalidated User Manual Ver 2 0 Feb 2014 Page 16 PISO 813 Series Classic Driver DLL Software Manual 2 5 Digital Input Output Functions PISO813_OutputByte This subroutine will send the 8 bits data to the desired I O port gt Syntax void PISO813_OutputByte DWORD wPortAddr WORD bOutputVal gt Parameters wPortAddr Input I O port addresses please refer to function PISO813_GetConfigAddressSpace Only the low WORD is valid bOutputVal Input 8 bit data send to I O port Only the low BYTE is valid gt Returns None PISO813_InputByte This subroutine will input the 8 bit data from the desired I O port gt Syntax WORD PISO813_InputByte DWORD wPortAddr gt Parameters wPortAddr Input I O port addresses please refer to function PISO813_GetConfigAddressSpace Only the low WORD is valid
18. version by polling The A D converter is 12 bits for PISO 813 This subroutine will compute the result according to the configuration code Section 2 2 Refer to PISO813_SetChGain gt Syntax float PISO813_AD_Float DWORD wBase WORD wJump20v WORD wBipolar gt Parameters wBase Input I O port base addresses please refer to PISO813_GetConfigAddressSpace wJump20v Input 1 20 V HW default 0 10V wBipolar Input 1 Bipolar HW default 0 Unipolar gt Returns PISO813_ADError2 A D converter error return 100 0 Other value The floating point value of A D conversion 10 to 10 User Manual Ver 2 0 Feb 2014 Page 22 PISO 813 Series Classic Driver DLL Software Manual PISO813 Ads Hex This subroutine will perform a number of A D conversions by polling This subroutine is very similar to PISO813_AD_Hex except that this subroutine will perform wCount of conversions instead of just one conversion After A D conversing the A D data are stored in a buffer in Hex format The wBuf is the starting address of this data buffer Refer to PISO813_ SetChGain gt Syntax WORD PISO813_Ads_Hex DWORD wBase WORD wBuf DWORD wCount gt Parameters wBase Input I O port base addresses please refer to PISO813_GetConfigAddressSpace wBuf Output Starting address of the data buffer The user must allocate spaces for this buffer and send the address into the function This function will fill th

Download Pdf Manuals

image

Related Search

Related Contents

sonja SR-5 / 1D  Maintien des couvertures prévoyance et Santé : mode d`emploi  quick facts - CSAE Ottawa-Gatineau Tête-à-Tête  LinMot - Profilex Systems  Rack box for TWRR2 receiver  製品安全データシート  instruction manual  Gebrauchsanleitung  

Copyright © All rights reserved.
Failed to retrieve file