Advertisement

Quick Links

USB-RELAIS-8 / OPTOIN-8
Hardware-Description
2012
Dezember

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the USB-RELAIS-8 and is the answer not in the manual?

Questions and answers

Summary of Contents for Deditec USB-RELAIS-8

  • Page 1 USB-RELAIS-8 / OPTOIN-8 Hardware-Description 2012 Dezember...
  • Page 2 2.1. Quick installation 2.1.1. Step 1 - Installation of the software and driver 2.1.2. Step 2 - Connecting of the module 2.1.3. Step 3 - Testing the connection and the module 2.2. USB-RELAIS-8 2.2.1. Technical data 2.2.2. Product pictures 2.2.3. Overview screen 2.2.4.
  • Page 3 INDEX 3. Firmware update 3.1. DEDITEC Flasher 4. Software 4.1. Using our products 4.1.1. Access via graphical applications 4.1.2. Access via the DELIB driver library 4.1.3. Access via protocol 4.1.4. Access via provided test programs 4.2. DELIB driver library 4.2.1. Overview 4.2.1.1.
  • Page 4 INDEX 4.5.2. Customisation for RO-ETH-Modules (only Linux) 4.5.3. DELIB CLI samples 5. DELIB API reference 5.1. Management functions 5.1.1. DapiOpenModule 5.1.2. DapiCloseModule 5.1.3. DapiGetDELIBVersion 5.1.4. DapiSpecialCMDGetModuleConfig 5.1.5. DapiOpenModuleEx 5.2. Error handling 5.2.1. DapiGetLastError 5.2.2. DapiGetLastErrorText 5.3. Reading Digital inputs 5.3.1. DapiDIGet1 5.3.2.
  • Page 5 INDEX 6. Appendix 6.1. Revisions 6.2. Copyrights and trademarks Index | Seite...
  • Page 6 Introduction Introduction | Seite...
  • Page 7: General Remarks

    1.1. General remarks First of all, we would like to congratulate you to the purchase of a high quality DEDITEC product. Our products are being developed by our engineers according to quality requirements of high standard. Already during design and development we take care that our products have -besides quality- a long availability and an optimal flexibility.
  • Page 8: Hardware Description

    Hardware description Hardware description | Seite...
  • Page 9: Quick Installation

    2.1.3. Step 3 - Testing the connection and the module In the Start menu, see "Start -> All Programs -> DEDITEC -> DELIB -> Sample Programs" you will find some example programs to test your module. Hardware description | Seite...
  • Page 10 2.2. USB-RELAIS-8 2.2.1. Technical data Interface USB 2.0 / USB 1.1 Power Supply +5V (power supply occurs over USB bus) 8x Relais outputs (36V, 1A, 15W) max. switching voltage: 36V DC max. switching current: 1A max. switching power: 15W max. transport current: 1,25A...
  • Page 11 2.2.2. Product pictures USB-RELAIS-8 USB-RELAIS-8_A USB-RELAIS-8_B Hardware description | Seite...
  • Page 12 2.2.3. Overview screen Hardware description | Seite...
  • Page 13: Pin Assignment

    2.2.4. Pin assignment 2.2.4.1. Pin assignment J1 Description Output Channel 1 Output Channel 1 Output Channel 2 Output Channel 2 Output Channel 3 Output Channel 3 Output Channel 4 Output Channel 4 2.2.4.2. Pin assignment J2 Description Output Channel 5 Output Channel 5 Output Channel 6 Output Channel 6...
  • Page 14 The state of each output is directly signalized by a separate LED. This simplifies to detect and rectify wiring errors, because the signals on the cables are directly observable. Note: Only available for the USB-RELAIS-8 and USB-RELAIS-8_B module Hardware description | Seite...
  • Page 15 2.3. USB-OPTOIN-8 2.3.1. Technical data USB-Interface (USB 1.1 / USB 2.0) Power supply: +5V (supply occurs over USB bus) 8 opto-coupler inputs 24V AC switching voltage (optional 15V, 12V and 5V are available) 16 Bit-Counter for each input Detection of pulses between two selection cycles Galvanically isolated using opto-couplers Variable input voltage range min 5V, max 30V AC (standard: 15-30V) Logging of impulses between 2 read out cycles...
  • Page 16 2.3.2. Product pictures USB-OPTOIN-8 USB-OPTOIN-8_A USB-OPTOIN-8_B Hardware description | Seite...
  • Page 17 2.3.3. Overview screen Hardware description | Seite...
  • Page 18 2.3.4. Pin assignment 2.3.4.1. Pin assignment J1 Description Input Channel 1 + Input Channel 1 - Input Channel 2 + Input Channel 2 - Input Channel 3 + Input Channel 3 - Input Channel 4 + Input Channel 4 - 2.3.4.2.
  • Page 19 The state of each input is directly signalized by a separate LED. This simplifies to detect and rectify wiring errors, because the signals on the cables are directly observable. Note: Only available for the USB-RELAIS-8 and USB-RELAIS-8_B module Hardware description | Seite...
  • Page 20 Hardware description | Seite...
  • Page 21: Firmware Update

    Firmware update Firmware update | Seite...
  • Page 22 3. Firmware update 3.1. DEDITEC Flasher You can find the latest firmware version for your DEDITEC product always at the download section of our homepage. -> http://www.deditec.de/en/module/downloads/firmware-updates.html Approach after download Unzip the ZIP archive Start the program deditec-flasher.exe The following application will be opened: You can find a detailed description of the available commands on the following page.
  • Page 23 2. Additional options Command (Key) Description Flasher runs in DEBUG mode Therefore, additional information will be displays Reads the current firmware of connected DEDITEC products 3. Select the module which you want to flash (RO-Series only) Command (Key) Description Flash the RO-Interface module...
  • Page 24 After successful update procedure, the message FLASH-OK! appears. Firmware update | Seite...
  • Page 25 Software Software | Seite...
  • Page 26 4. Software 4.1. Using our products 4.1.1. Access via graphical applications We provide driverinterfaces e.g. for LabVIEW and ProfiLab. The DELIB driver library is the basis, which can be directly activated by ProfiLAB. For LabVIEW, we provide a simple driver connection with examples! 4.1.2.
  • Page 27 4.1.4. Access via provided test programs We provide simple handling test programs for the most important functions of our products. These will be installed automatically by the installation of the DELIB driver library. So you can test directly e.g. relays or you can check the voltage of an A/D converter.
  • Page 28 4.2. DELIB driver library 4.2.1. Overview The following figure explains the structure of the DELIB driver library The DELIB driver library allows an uniform response of DEDITEC hardware with particular consideration of the following viewpoints: Independent of operating system Independent of programming language Independent of the product 4.2.1.1.
  • Page 29 4.2.1.2. Program with diverse programming languages We provide uniform commands to create own applications. This will be solved by the DELIB driver library. You choose the programming language! It can be simply developed applications under C++, C, Visual Basic, Delphi or LabVIEW®.
  • Page 30 4.2.2. Supported operating systems Our products support the following operating systems: Windows 7 Windows Vista Windows XP Windows 2000 Linux 4.2.3. Supported programming languages Our products are responsive via the following programming languages: Delphi VisualBasic VB.NET MS-Office Software | Seite...
  • Page 31 4.2.4. Installation DELIB driver library Start screen of the DELIB installer Insert the DEDITEC driver CD into the drive and start „delib_install.exe“. The DELIB driver library is also available on http://www.deditec.en/delib Click on „Install“. Software | Seite...
  • Page 32 The drivers will be installed. The DELIB driver library is now installed. Press „Close“ to finish the installation. You can configure your module with the „DELIB Configuration Utility“ (see next chapter). This is only necessary, if more than one module is present. Software | Seite...
  • Page 33 4.2.5. DELIB Configuration Utility Start the “DELIB Configuration Utility” as follows: Start Programs DEDITEC DELIB DELIB Configuration Utility. The „DELIB Configuration Utility“ is a program to configure and subdivide identical USB-modules in the system. This is only necessary if more than one module is present.
  • Page 34 Description of the DELIB integration in Visual-C/C++ The DELIB Installation defines environment variables to facilitate links to the DELIB-include and DELIB-lib directory. DELIB_LIB = C:\Programs\DEDITEC\DELIB\lib DELIB_INCLUDE = C:\Programs\DEDITEC\DELIB\include Start Visual-C/C++ and open via menu "Projekt -> Einstellungen" Software | Seite...
  • Page 35 DELIB.H entry in the Visual-C/C++ Project configurations Under the tab "C/C++" choose the "Kategorie" Präprozessor and enter on "Zusätzliche Include Verzeichnisse" "$(DELIB_INCLUDE)". Software | Seite...
  • Page 36 DELIB.LIB entry in the Visual-C/C++ Project configurations Under the tab "Linker" extend the existing line in "Zusätzliche Include Verzeichnisse" with the ending "$(DELIB_LIB)\delib.lib" Software | Seite...
  • Page 37 You can find needed files Visual-C# directory \Programme\DEDITEC\DELIB\Include\delib.cs. Start Visual-C# and open via menu "Projekt -> Vorhandes Element hinzufügen" in the directory C: \Programme\DEDITEC\DELIB\Include\ the file "delib.cs" to import. Add the following reference in your program: using DeLib; Software | Seite...
  • Page 38 4.3.3. Integration of the delib.cs in Visual-C# unter Windows 64bit Program sample for the DELIB driver library under Windows 64 Bit In the following sections there is a description how to compile the project as "x86" Show all settings Open the options via menue "Extras -> Optionen" Check “Alle Einstellungen anzeigen"...
  • Page 39 Check under "Projekte und Projektmappen" "Erweiterte Buildkonfigurationen anzeigen". Software | Seite...
  • Page 40 The Configuration Manager Open the configuration manager via "Any CPU -> Konfigurations-Manager...". In the configuration manager select under der column "Plattform" "Any CPU -> Neu...". Under "Neue Plattform" select "x86". Software | Seite...
  • Page 41 Start debugging You can start the debugging as normal via the "Start-Button". Note that the toolbar combobox for Platform Configuration now lists both "x86" and "AnyCPU" and has "x86" selected Software | Seite...
  • Page 42 4.3.4. Integration of the delib.pas in Delphi Description of the "delib.pas" integration in Delphi find needed files Delphi directory \Programme\DEDITEC\DELIB\include\delib.pas. Start Delphi and open via menu "Projekt -> dem Projekt hinzufügen" the file "delib. pas" to import. Software | Seite...
  • Page 43 4.3.5. Integration of the delib.bas in Visual Basic Description of the "delib.bas" integration in Visual Basic find needed files directory \Programme\DEDITEC\DELIB\include\delib.bas. Start Visual Basic and open via menu "Projekt -> Datei hinzufügen..." the file "delibi.bas" to import. Software | Seite...
  • Page 44 4.3.6. Integration of the delib.vb in VB.NET Description of the DELIB integration in VB.NET find needed files VB.NET directory \Programme\DEDITEC\DELIB\Include\delib.vb. Start VB.NET and open via menu "Projekt -> Vorhandes Element hinzufügen" directory \Programme\DEDITEC\DELIB\Include\ the file "delib.vb" to import. Software | Seite...
  • Page 45 4.3.7. Integration of the delib.bas in MS-Office (VBA) Description of the "delib.bas" integration in Visual Basic for Applications find needed files directory \Programme\DEDITEC\DELIB\include\delib.bas. Start Microsoft Excel and open via menu "Extras -> Makro -> Visual Basic Editor". Software | Seite...
  • Page 46 Creation of UserForm Create a new UserForm via menu "Einfügen -> UserForm". In the top left-hand corner of the project manager right click on "UserForm -> Datei importieren". Open in the directory C:\Programme\DEDITEC\DELIB\include the file "delib.bas" to import. Software | Seite...
  • Page 47 Description of the delib.dll integration in LabVIEW Version 11 - You can find the needed files for LabVIEW in the directorys "C:\Windows\System32\delib.dll" "C:\Programme\DEDITEC\DELIB\include\ delib.h" - Start LabVIEW and open the menu "Tools -> Import -> DLL ..." Software | Seite...
  • Page 48 - Choose the option "create VIs for DLL" and press continue Software | Seite...
  • Page 49 - In the next window, choose the path to the delib.h and delib.dll and press continue Software | Seite...
  • Page 50 - Press continue again - The Header-File will now be analized. Afterwards press continue. Software | Seite...
  • Page 51 - Follow the instructions and configurate the name and the saving location for the VIs. Software | Seite...
  • Page 52 - In the new window choose "Easy error correction" in the drop-down menu and press continue. Software | Seite...
  • Page 53 - VIs which are working with 64-bit values must be edited. The display must be changed from "unsigned long" to "unsigned quad". - The following VIs must be edited: -> DapiCNT48CounterGet48 (function return) -> DapiDIGet64 (function return) -> DapiDOSet64 (data) ->...
  • Page 54 - In addition for some VIs you need to change the elementype to "numeric". - The following VIs must be edited: -> DapiWriteLongLong (value) -> DapiReadLongLong (function return) - Afterwards press continue. Software | Seite...
  • Page 55 - You recive a summary of the executed steps. - Press continue - The VIs will now be created and are ready to use. Software | Seite...
  • Page 56 In the delib.h file can you read the hexadecimal values to determine the modes. The hex values must be convertet to decimal. After the installation of the DELIB-library, the delib.h file is located in the following directory: C:\Programs\Deditec\DELIB\Include\delib.h Software | Seite...
  • Page 57 The function could look like this in LabVIEW: The channel and mode are passed as unsigned long Software | Seite...
  • Page 58: Test Programs

    4.4.1. Digital Input-Output Demo Start “Digital Input-Output Demo” as follows: Start Programme DEDITEC DELIB Digital Input-Output Demo. The screenshot shows a test of the RO-USB-O64-R64. The configuration of the module (64 inputs and 64 outputs) is shown on the upper left side.
  • Page 59 C:\Programme\DEDITEC\DELIB\Programs\Console. You can find the DELIB CLI Command for Windows after Installation of the DELIB driverlibrary in the directory C:\Programme\DEDITEC\DELIB\programs\cli\ . The DELIB CLI Command for Linux is located in the directory "/deditec-cli/, after unzipping the ZIP-Archiv "delib-linux-cli". Definition (Windows) delib_cli command channel [value | unit ["nounit"] ]...
  • Page 60 Return-value Read state of the inputs (in combination with command = di, di8, di16, di32 and ai). Read state of the inputs as hexadecimal (in combination with command = di, di8, di16, di32 and ai and unit "hex") Voltage of the input (in combination with unit "volt" and command "ai") Current of the input (in combination with unit "mA"...
  • Page 61 = DapiOpenModule(USB_OPTOIN_32_RELAIS_32, 0); return handle; Note: The project "delib-cli-usb" has to recompiled after each modification. Therefore, you can find in the directory "/deditec-cli/", the shell script "compile_delib_cli_usb. sh", with which you can compile the project under Linux. Software | Seite...
  • Page 62 4.5.2. Customisation for RO-ETH-Modules (only Linux) In order to access a RO-ETH module under Linux, you have to set IP address of the module. Therefore you can find in the directory "/deditec-cli/source" the file "delib_cli_open_module_eth.c" after unzipping the ZIP archive.
  • Page 63 4.5.3. DELIB CLI samples Digital Outputs Windows delib_cli DO1 17 1 -> digital output 18 will be switched on delib_cli DO1 3 0 -> digital output 4 will be switched on delib_cli DO8 0 255 -> digital outputs 1-8 will be switched on delib_cli DO16 0 0 ->...
  • Page 64 Digitale Inputs Windows delib_cli DI1 3 Example of a return value: 1 -> reads the state of digital input 4 delib_cli DI8 0 hex Example of a return value: 0xFF -> reads the state of digital input 4 as hexadecimal delib_cli DI16 0 hex Example of a return value: 0xFFFF ->...
  • Page 65 Analog Outputs Windows delib_cli AO 7 4711 ->analog output 8 will be set to the decimal value 4711 delib_cli AO 6 0x4711 ->analog output 7 will be set to the hexadecimal value 0x4711 delib_cli AO 7 3.7V -> the voltage of analog output 8 will be set to 3,7 Volt (the comma ","...
  • Page 66 Analog Inputs Windows delib_cli AI 2 Example of a return value: 1234 -> reads the value of analog input 3 as decimal delib_cli AI 2 hex Example of a return value: 0x1FA -> reads the value of analog input 3 as hexadecimal delib_cli AI 2 V Example of a return value: 12.500000V ->...
  • Page 67 DELIB API reference DELIB API reference | Seite...
  • Page 68: Management Functions

    5. DELIB API reference 5.1. Management functions 5.1.1. DapiOpenModule Description This function opens a particular module. Definition ULONG DapiOpenModule(ULONG moduleID, ULONG nr); Parameters moduleID=Specifies the module, which is to be opened (see delib.h) nr=Indicates No of module which is to be opened. nr=0 ->...
  • Page 69 5.1.2. DapiCloseModule Description This command closes an opened module. Definition ULONG DapiCloseModule(ULONG handle); Parameters handle=This is the handle of an opened module Return value none Example program // Close the module DapiCloseModule(handle); DELIB API reference | Seite...
  • Page 70 5.1.3. DapiGetDELIBVersion Description This function returns the installed DELIB version. Definition ULONG DapiGetDELIBVersion(ULONG mode, ULONG par); Parameters mode=Mode, with which the version is readout (must be 0). par=This parameter is not defined (must be 0). Return value version=Version number of the installed DELIB version [hex]. Example program version = DapiGetDELIBVersion(0, 0);...
  • Page 71 5.1.4. DapiSpecialCMDGetModuleConfig Description This command returns the hardware equipment (number of in-/output channels) of the module. Definition ULONG DapiSpecialCommand(ULONG handle, DAPI_SPECIAL_CMD_GET_MODULE_CONFIG, par, 0, 0); Parameters handle=This is the handle of an open module. Get number of digital input channels par=DAPI_SPECIAL_GET_MODULE_CONFIG_PAR_DI Get number of digital output channels par=DAPI_SPECIAL_GET_MODULE_CONFIG_PAR_DO Get number of digital in-/output channels...
  • Page 72 Return value Get number of digital input channels return=Number of digital input channels Get number of digital output channels return=Number of digital output channels Get number of digital in-/output channels return=Number of digital in-/output channels Get number of analog input channels return=Number of analog input channels Get number of analog output channels return=Number of analog output channels...
  • Page 73 5.1.5. DapiOpenModuleEx Description This function opens a specific RO-ETH-module.The particularity of this command is, that parameters like IP-address and portnumber can be specified. Definition ULONG DapiOpenModuleEx(ULONG moduleID, ULONG nr, unsigned char* exbuffer); Parameters moduleID=Specifies the module, which is to be opened (see delib.h) nr=Indicates No of module which is to be opened.
  • Page 74: Error Handling

    5.2. Error handling 5.2.1. DapiGetLastError Description This function returns the last registered error. Definition ULONG DapiGetLastError(); Parameters None Return value Error code 0=no error. (see delib.h) Example program ULONG error; error=DapiGetLastError(); if(error==0) return FALSE; printf("ERROR = %d", error); DELIB API reference | Seite...
  • Page 75 5.2.2. DapiGetLastErrorText Description This function reads the text of the last registered error. Definition extern ULONG __stdcall DapiGetLastErrorText(unsigned char * msg, unsigned long msg_length); Parameters msg = text buffer msg_length = length of the buffer Example program BOOL IsError () if (DapiGetLastError () != DAPI_ERR_NONE) unsigned char msg[500];...
  • Page 76: Reading Digital Inputs

    5.3. Reading Digital inputs 5.3.1. DapiDIGet1 Description This command reads a single digit input. Definition ULONG DapiDIGet1(ULONG handle, ULONG ch); Parameters handle=This is the handle of an opened module. ch=Specifies the number of input that is to be read (0 ..). Return value State of the input (0 / 1).
  • Page 77 5.3.2. DapiDIGet8 Description This command reads 8 digital inputs simultaneously. Definition ULONG DapiDIGet8(ULONG handle, ULONG ch); Parameters handle=This is the handle of an opened module. ch=Specifies the number of the input, from which it begins to read from (0, 8, 16, 24, 32, ..) Return value State of the read inputs.
  • Page 78 5.3.3. DapiDIGet16 Description This command reads 16 digital inputs simultaneously. Definition ULONG DapiDIGet16(ULONG handle, ULONG ch); Parameters handle=This is the handle of an opened module. ch=Specifies the number of the input, from which it begins to read from (0, 16, 32, Return value State of the read inputs.
  • Page 79 5.3.4. DapiDIGet32 Description This command reads 32 digital inputs simultaneously. Definition ULONG DapiDIGet32(ULONG handle, ULONG ch); Parameters handle=This is the handle of an opened module. ch=Specifies the number of the input, from which it begins to read from (0, 32, 64, Return value State of the read inputs.
  • Page 80 5.3.5. DapiDIGet64 Description This command reads 64 digital inputs simultaneously. Definition ULONGLONG DapiDIGet64(ULONG handle, ULONG ch); Parameters handle=This is the handle of an opened module. ch=Specifies the number of the input,from which it begins to read from (0, 64, ..) Return value State of the read inputs.
  • Page 81 5.3.6. DapiDIGetFF32 Description This command reads the flip-flops from the inputs and resets them. (Input state change). Definition ULONG DapiDIGetFF32(ULONG handle, ULONG ch); Parameters handle=This is the handle of an opened module . ch=Specifies the number of the input, from which it begins to read from (0, 32, ..) Return value State of 32 input change states DELIB API reference | Seite...
  • Page 82 5.3.7. DapiDIGetCounter Description This command reads the counter of a digital input Definition ULONG DapiDIGetCounter(ULONG handle, ULONG ch, ULONG mode); Parameters handle=This is the handle of an opened module. ch=Specifies the digital input,from which the counter will be read. mode=0 (Normal counter function) mode=DAPI_CNT_MODE_READ_WITH_RESET (Reading and resetting the counter) mode=DAPI_CNT_MODE_READ_LATCHED (Reading the latched counter)
  • Page 83 5.3.8. DapiSpecialCounterLatchAll Description This command saves the counters of all digital inputs simultaneously into a temporary storage (latch). So, after that, the counter of the latch can be read successively. Here, the speciality is, that it is possible to "freeze" simultaneously the counter and the frozen counter (latch) can be read one by one.
  • Page 84 5.3.9. DapiSpecialCounterLatchAllWithReset Description This command saves the counters of all digital inputs simultaneously into a temporary storage (latch). In addition, the counters of the digital inputs will be reset. Definition void DapiSpecialCommand(ULONG handle, DAPI_SPECIAL_CMD_COUNTER, DAPI_SPECIAL_COUNTER_LATCH_ALL_WITH_RESET, 0, 0); Parameters None Example program DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_COUNTER, DAPI_SPECIAL_COUNTER_LATCH_ALL_WITH_RESET, 0, 0);...
  • Page 85 5.3.10. Dapi_Special_DI_FF_Filter_Value_Get Description This command returns the filter [ms], in which time interval the digital inputs are sampled. Definition ULONG DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_DI, DAPI_SPECIAL_DI_FF_FILTER_VALUE_GET, 0, 0); Parameters handle=This is the handle of an opened module. Return value Time [ms] Example program value = DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_DI, DAPI_SPECIAL_DI_FF_FILTER_VALUE_GET, 0, 0);...
  • Page 86 5.3.11. Dapi_Special_DI_FF_Filter_Value_Set Description This command sets a filter [ms], in which time interval the digital inputs are sampled. Definition void DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_DI, DAPI_SPECIAL_DI_FF_FILTER_VALUE_SET, ULONG time_ms, 0); Parameters handle=This is the handle of an opened module. time_ms=time interval [ms], in which digital inputs are sampled. Return value None Remarks...
  • Page 87: Setting Digital Outputs

    5.4. Setting Digital outputs 5.4.1. DapiDOSet1_WithTimer Description This function sets a digital output (ch) to a value (data - 0 or 1) for a specified time in msec. Definition void DapiDOSet1_WithTimer(ULONG handle, ULONG ch, ULONG data, ULONG time_ms); Parameters handle=This is the handle of an opened module ch=Specifies the number of the output, from which it begins to write to (0, 32, 64, ..) data=Specifies the data values, to write to the outputs time_ms=Specifies the time, in which an output is set [ms]...
  • Page 88 5.4.2. DapiDOSet1 Description This is the command to set a single output. Definition void DapiDOSet1(ULONG handle, ULONG ch, ULONG data); Parameters handle=This is the handle of an opened module ch=Specifies the number of the output to be set to (0 ..) data=Specifies the data value that is to be written (0 / 1) Return value None...
  • Page 89 5.4.3. DapiDOSet8 Description This command sets 8 digital outputs simultaneously. Definition void DapiDOSet8(ULONG handle, ULONG ch, ULONG data); Parameters handle=This is the handle of an opened module ch=Specifies the number of the output, from which it begins to write to (0, 8, 16, 24, 32, ..) data=Specifies the data values, to write to the outputs Return value...
  • Page 90 5.4.4. DapiDOSet16 Description This command sets 16 digital outputs simultaneously. Definition void DapiDOSet16(ULONG handle, ULONG ch, ULONG data); Parameters handle=This is the handle of an opened module ch=Specifies the number of the output, from which it begins to write to (0, 16, 32, ..) data=Specifies the data values, to write to the outputs Return value None...
  • Page 91 5.4.5. DapiDOSet32 Description This command sets 32 digital outputs simultaneously. Definition void DapiDOSet32(ULONG handle, ULONG ch, ULONG data); Parameters handle=This is the handle of an opened module ch=Specifies the number of the output, from which it begins to write to (0, 32, 64, ..) data=Specifies the data values, to write to the outputs Return value None...
  • Page 92 5.4.6. DapiDOSet64 Description This command is to set 64 digital outputs. Definition void DapiDOSet64(ULONG handle, ULONG ch, ULONG data); Parameters handle=This is the handle of an opened module ch=Specifies the number of the output, from which it begins to write to (0, 64, ..) data=Specifies the data values, to write to the outputs Return value None...
  • Page 93 5.4.7. DapiDOReadback32 Description This command reads back the 32 digital outputs. Definition ULONG DapiDOReadback32(ULONG handle, ULONG ch); Parameters handle=This is the handle of an opened module ch=Specifies the number of the input, from which it begins to read from (0, 32, ..) Return value Status of 32 outputs.
  • Page 94 5.4.8. DapiDOReadback64 Description This command reads back the 64 digital outputs. Definition ULONGLONG DapiDOReadback64(ULONG handle, ULONG ch); Parameters handle=This is the handle of an opened module ch=Specifies the number of the input, from which it begins to read from (0, 64, ..) Return value Status of 64 outputs.
  • Page 95: Example Program

    5.5. Example program // **************************************************************************** // **************************************************************************** // **************************************************************************** // **************************************************************************** // **************************************************************************** // (c) DEDITEC GmbH, 2009 // web: http://www.deditec.de // mail: vertrieb@deditec.de // dtapi_prog_beispiel_input_output.cpp // **************************************************************************** // **************************************************************************** // **************************************************************************** // **************************************************************************** // **************************************************************************** // Folgende Bibliotheken beim Linken mit einbinden: delib.lib // Dies bitte in den Projekteinstellungen (Projekt/Einstellungen/Linker(Objekt- Bibliothek-Module) ..
  • Page 96 return; // Zum Testen - ein Ping senden // ---------------------------------------------------- printf("PING\n"); anz=10; for(i=0;i!=anz;++i) data=DapiPing(handle, i); if(i==data) // OK printf("."); else // No answer printf("E"); printf("\n"); // ---------------------------------------------------- // Einen Wert auf die Ausgänge schreiben data = 255; DapiWriteByte(handle, 0, data); printf("Schreibe auf Adresse=0 daten=0x%x\n", data);...
  • Page 97 Appendix Appendix | Seite...
  • Page 98 6. Appendix 6.1. Revisions Rev 2.00 First DEDITEC issue Rev 2.01 Added chapter "Firmware update" and "Integration of the DELIB" Rev 2.02 Added index Appendix | Seite...
  • Page 99: Copyrights And Trademarks

    6.2. Copyrights and trademarks Linux is registered trade-mark of Linus Torvalds. Windows CE is registered trade-mark of Microsoft Corporation. USB is registered trade-mark of USB Implementers Forum Inc. LabVIEW is registered trade-mark of National Instruments. Intel is registered trade-mark of Intel Corporation AMD is registered trade-mark of Advanced Micro Devices, Inc.

This manual is also suitable for:

Usb-optoin-8

Table of Contents