background image

Software |

Seite

73

5.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

-> digital outputs 1-16 will be switched off

delib_cli DO16 16 65535

-> digital outputs 17-32 will be switched on

delib_cli DO32 0 4294967295

-> digital outputs 1-32 will be switched on

Linux

sudo delib_cli _usb DO1 17 1

-> digital output 18 of an USB-Module will be switched on

delib_cli _eth DO1 3 0

-> digital output 18 of a RO-ETH-Module will be switched off

Summary of Contents for ETH-RELAIS-8

Page 1: ...Hardware Description Juli ETH RELAIS 8 OPTOIN 8 2019 ...

Page 2: ...nical data 12 2 2 2 Product pictures 13 2 2 3 Overview screen 14 2 2 4 Pin assignment 14 2 2 4 1 Pin assignment J1 14 2 2 4 2 Pin assignment J2 15 2 2 5 Outputs 15 2 2 5 1 Relay outputs 15 2 2 5 2 Timeout protection 15 2 2 5 3 Visual control of the outputs depends of module 2 3 ETH OPTOIN 8 16 16 2 3 1 Technical data 17 2 3 2 Product pictures 18 2 3 3 Overview screen 19 2 3 4 Pin assignment 19 2 3...

Page 3: ... programming languages 37 5 2 1 3 Program independent of the interface 37 5 2 1 4 SDK Kit for Programmer 38 5 2 2 Supported operating systems 38 5 2 3 Supported programming languages 39 5 2 4 Installation DELIB driver library 41 5 2 5 DELIB Configuration Utility 5 3 Integration of the DELIB 42 42 5 3 1 Integration of the delib h in Visual C C 45 5 3 2 Integration of the delib cs in Visual C 46 5 3...

Page 4: ...DapiCloseModule 80 6 1 3 DapiGetDELIBVersion 81 6 1 4 DapiSpecialCMDGetModuleConfig 83 6 1 5 DapiOpenModuleEx 6 2 Error handling 84 84 6 2 1 DapiGetLastError 85 6 2 2 DapiGetLastErrorText 6 3 Reading Digital inputs 86 86 6 3 1 DapiDIGet1 87 6 3 2 DapiDIGet8 88 6 3 3 DapiDIGet16 89 6 3 4 DapiDIGet32 90 6 3 5 DapiDIGet64 91 6 3 6 DapiDIGetFF32 92 6 3 7 DapiDIGetCounter 93 6 3 8 DapiSpecialCounterLat...

Page 5: ... 4 3 DapiDOSet8 100 6 4 4 DapiDOSet16 101 6 4 5 DapiDOSet32 102 6 4 6 DapiDOSet64 103 6 4 7 DapiDOReadback32 104 6 4 8 DapiDOReadback64 6 5 Example program 105 7 Appendix 108 7 1 Revisions 108 7 2 Copyrights and trademarks 109 ...

Page 6: ...I Introduction Seite 6 Introduction ...

Page 7: ...evelopment Therefor we can offer you high quality products at a competitive price Availability Because of the modular design of our products we have to redesign only a module instead of the whole product in case a specific component is no longer available 1 2 Customer satisfaction Our philosophy a content customer will come again Therefor customer satisfaction is in first place for us If by any ch...

Page 8: ...II Hardware description Seite 8 Hardware description ...

Page 9: ...in the zip DELIB delib_install exe on the DEDITEC Driver CD Note On our website www deditec de you can always find the latest DELIB driver version 2 1 2 Step 2 Connecting of the module Connect the ETH RELAIS 8 or the ETH OPTOIN 8 with a ethernet cable with your network or PC 2 1 3 Step 3 Testing the connection and the module In the Start menu see Start All Programs DEDITEC DELIB Sample Programs yo...

Page 10: ...tellung der Spannungsversorgung übernommen DIP Switch 1 Mode Description ON DHCP is active The network settings IP subnet mask DNS Domain and gateway will be received from a DHCP Server OFF DHCP is not active The network settings ip subnet mask DNS Domain and gateway from the module EEPROM itself will be used With the DELIB Configuration Utility those settings can be edited and saved in to the EEP...

Page 11: ...he modul will start with factory settings The settings which will be ignored are the IP address gateway subnet mask and DHCP Factory settings IP 192 168 1 1 Subnet mask 255 255 255 0 Gateway 192 168 1 254 DHCP Off The settings in the EEPROM will not be changed OFF The module will start with the settings from the EEPROM DIP Switch 4 Mode Description ON Modul will start normally OFF Only for service...

Page 12: ...act Max switching voltage 36V DC Max switching current 0 5A Max switching power 10W Max transport current 1 25A Isolation 5TOhm Switching time 0 5ms Fall time 0 1ms Timeout protection 2 Control LEDs Status Interface activity 8 LED Output LEDs one for each output Dimensions 77 x 67 5 x 55 mm L x B x H Operation temperature 10 C 50 C 2 2 2 Product pictures ETH RELAIS 8 ...

Page 13: ...Hardware description Seite 13 2 2 3 Overview screen ...

Page 14: ...hannel 1 3 Output Channel 2 4 Output Channel 2 5 Output Channel 3 6 Output Channel 3 7 Output Channel 4 8 Output Channel 4 2 2 4 2 Pin assignment J2 Pin Description 9 Output Channel 5 10 Output Channel 5 11 Output Channel 6 12 Output Channel 6 13 Output Channel 7 14 Output Channel 7 15 Output Channel 8 16 Output Channel 8 ...

Page 15: ...y to switch off automatically the outputs to prevent damage This takes place if in a predefined time frame any communication with the module was possible Reasons could be cable disruption PC crash and so on This way damage control surcharge of connected equipment and risk of accidents can be avoided 2 2 5 3 Visual control of the outputs depends of module The state of each output is directly signal...

Page 16: ...e 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 Control LED LED for 5V power supply Dimensions 77 x 67 5 x 55 mm L x W x H Operating temperature 10 C 50 C ...

Page 17: ...Hardware description Seite 17 2 3 2 Product pictures ETH RELAIS 8 ...

Page 18: ...Hardware description Seite 18 2 3 3 Overview screen ...

Page 19: ...nput Channel 1 3 Input Channel 2 4 Input Channel 2 5 Input Channel 3 6 Input Channel 3 7 Input Channel 4 8 Input Channel 4 2 3 4 2 Pin assignment J2 Pin Description 9 Input Channel 5 10 Input Channel 5 11 Input Channel 6 12 Input Channel 6 13 Input Channel 7 14 Input Channel 7 15 Input Channel 8 16 Input Channel 8 ...

Page 20: ...uplers provide a galvanic isolation of the module towards the connected equipment They also provide a safe connection to the module for reverse currents and high voltage peaks 2 3 5 3 Visual control of the inputs depends of module 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 obser...

Page 21: ...Hardware description Seite 21 ...

Page 22: ...III Hardware Seite 22 Hardware ...

Page 23: ...Hardware Seite 23 3 Hardware 3 1 LED blinking behavior Erläuterung 1 Bootvorgang Der Bootvorgang startet direkt nach dem Stecken der Spannungsversorgung Die Bootvorgang Sequenz wird einmalig durchlaufen ...

Page 24: ...rodukt ist nun Einsatzbereit Die Status LED leuchtet 5 Sekunden und erlischt für etwa 300ms Die Applikation Sequenz wiederholt sich Bei Modulen mit Ethernet Schnittstelle nicht RO ETH und RO CPU 800 Status LED erlischt einmal Statische IP Status LED erlischt zweimal IP über DHCP erfolgreich bezogen Status LED erlischt dreimal IP über DHCP nicht erfolgreich bezogen ...

Page 25: ...irmware Versionen können über den DT Flasher heruntergeladen werden siehe Firmware Update durchführen Die Status LED leuchtet 2 Sekunden und erlischt für etwa 300ms Die Bootloader Sequenz wiederholt sich 3 Bootloader erzwungen Das Produkt kann mittels der DIP Schalter in den Bootloader gezwungen werden Der Bootloader dient nur zu Service Zwecken Die Status LED blinkt abwechselnd 2 Sekunden lang Di...

Page 26: ...orgung übernommen DIP Schalter 1 Modus Erklärung ON DHCP ist aktiviert Die Netzwerkseinstellungen IP Subnetzmaske DNS Domain sowie Gateway werden über einen DHCP Server aus Ihrem Netzwerk bezogen OFF DHCP deaktiviert Die Netzwerkseinstellungen IP Subnetzmaske DNS Domain sowie Gateway werden aus dem EEPROM des Moduls verwendet Mithilfe des DELIB Configuration Utility können diese Einstellungen bear...

Page 27: ...n Parametern OFF Die im EEPROM gespeicherten Werte IP Adresse Gateway Subnetzmaske DHCP werden beim Modulstart ignoriert Das Modul startet mit den Werkseinstellungen Werkseinstellungen IP 192 168 1 1 Port 9912 Subnetzmaske 255 255 255 0 Gateway 192 168 1 254 DHCP Off Die im EEPROM gespeicherten Werte werden nicht verändert DIP Schalter 4 Modus Erklärung ON Modul startet normal OFF Nur für SERVICE ...

Page 28: ...Hardware Seite 28 Geben Sie hier den Text ein ...

Page 29: ...IV Firmware update Seite 29 Firmware update ...

Page 30: ...roduct 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 31: ...ve to connect the module with your PC via the CAN SER adapter 2 Additional options Command Key Description D Flasher runs in DEBUG mode Therefore additional information will be displays P Reads the current firmware of connected DEDITEC products 3 Select the module which you want to flash RO Series only Command Key Description M Flash the RO Interface module A Flash all AD16 AD16 DA4 DA4 or AD16_IS...

Page 32: ...Firmware update Seite 32 After successful update procedure the message FLASH OK appears ...

Page 33: ...V Software Seite 33 Software ...

Page 34: ...river connection with examples 5 1 2 Access via the DELIB driver library In the appendix you can find the complete function reference for the integration of our API functions in your software In addition we provide examples for the following programming languages C C C Delphi VisualBasic VB NET MS Office 5 1 3 Access via protocol The protocol for the activation of our products is open source So yo...

Page 35: ...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 36: ...nsideration of the following viewpoints Independent of operating system Independent of programming language Independent of the product 5 2 1 1 Program under diverse operating systems The DELIB driver library allows an uniform response of our products on diverse operating systems We has made sure that all of our products can be responded by a few commands Whatever which operating system you use The...

Page 37: ...ons under C C Visual Basic Delphi or LabVIEW 5 2 1 3 Program independent of the interface Write your application independent of the interface Program an application for an USB product of us Also it will work with an ethernet or RS 232 product of us 5 2 1 4 SDK Kit for Programmer Integrate the DELIB in your application On demand you receive an installation script for free which allows you to integr...

Page 38: ...Our products support the following operating systems Windows 7 Windows Vista Windows XP Windows 2000 Linux 5 2 3 Supported programming languages Our products are responsive via the following programming languages C C C Delphi VisualBasic VB NET MS Office ...

Page 39: ...stallation 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 ...

Page 40: ... 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 ...

Page 41: ... 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 42: ...ion 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 ...

Page 43: ...Software Seite 43 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 ...

Page 44: ...Software Seite 44 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 ...

Page 45: ...l C You can find the needed files for Visual C in the directory C 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 ...

Page 46: ...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 47: ...Software Seite 47 Check under Projekte und Projektmappen Erweiterte Buildkonfigurationen anzeigen ...

Page 48: ...e Seite 48 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 ...

Page 49: ...Software Seite 49 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 ...

Page 50: ... in Delphi Description of the delib pas integration in Delphi You can find the needed files for Delphi in the directory C Programme DEDITEC DELIB include delib pas Start Delphi and open via menu Projekt dem Projekt hinzufügen the file delib pas to import ...

Page 51: ...isual Basic Description of the delib bas integration in Visual Basic You can find the needed files for VB in the directory C Programme DEDITEC DELIB include delib bas Start Visual Basic and open via menu Projekt Datei hinzufügen the file delibi bas to import ...

Page 52: ...the DELIB integration in VB NET You can find the needed files for VB NET in the directory C Programme DEDITEC DELIB Include delib vb Start VB NET and open via menu Projekt Vorhandes Element hinzufügen in the directory C Programme DEDITEC DELIB Include the file delib vb to import ...

Page 53: ...S Office VBA Description of the delib bas integration in Visual Basic for Applications You can find the needed files for VBA in the directory C Programme DEDITEC DELIB include delib bas Start Microsoft Excel and open via menu Extras Makro Visual Basic Editor ...

Page 54: ...erForm 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 ...

Page 55: ...dul_Control vi is not a EXE File and you need to execute this file the LabVIEW development environment 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 and C Programme DEDITEC DELIB include delib h Start LabVIEW and open the menu Tools Import DLL ...

Page 56: ...Software Seite 56 Choose the option create VIs for DLL and press continue ...

Page 57: ...Software Seite 57 In the next window choose the path to the delib h and delib dll and press continue ...

Page 58: ...Software Seite 58 Press continue again The Header File will now be analized Afterwards press continue ...

Page 59: ...Software Seite 59 Follow the instructions and configurate the name and the saving location for the VIs ...

Page 60: ...Software Seite 60 In the new window choose Easy error correction in the drop down menu and press continue ...

Page 61: ...th 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 DapiDOReadBack64 function return ...

Page 62: ...oftware Seite 62 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 ...

Page 63: ...Software Seite 63 You recive a summary of the executed steps Press continue The VIs will now be created and are ready to use ...

Page 64: ...oid DapiADSetMode ULONG handle ULONG ch ULONG mode The voltage ranges for this function are already defined in the DELIB library Example code in C C DapiADSetMode handle 0 ADDA_MODE_UNIPOL_5V This code can also be written like this DapiADSetMode handle 0 1 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 installati...

Page 65: ...Software Seite 65 The function could look like this in LabVIEW The channel and mode are passed as unsigned long ...

Page 66: ...put 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 67: ...rograms 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 Definition for USB Module Linux sudo delib cli usb command channel value unit nounit Definition for RO ETH Module Linux delib cli eth command channel value unit nounit Note The parameters are separated by s...

Page 68: ...Software Seite 68 t ao 0 1 2 integer or hexadecimal number starting with 0x For an integer a V for Volt mA for milli Ampere can be attached ...

Page 69: ... 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 and command ai ...

Page 70: ...SB Mini Stick and so on Since this causes unnecessary error messages you can simply remark not needed entries include delib sources delib delib h ULONG handle ULONG delib_cli_open_module handle DapiOpenModule RO_USB 0 if handle 0 handle DapiOpenModule USB_MINI_STICK 0 if handle 0 handle DapiOpenModule USB_RELAIS_8 0 if handle 0 handle DapiOpenModule USB_OPTOIN_8_RELAIS_8 0 if handle 0 handle DapiO...

Page 71: ...Software Seite 71 compile_delib_cli_usb sh with which you can compile the project under Linux ...

Page 72: ...e You have to modify following entry include delib sources delib delib h extern char global_ip_addr ULONG handle ULONG delib_cli_open_module sprintf global_ip_addr 192 168 1 11 Set the IP address of the RO ETH module here handle DapiOpenModule RO_ETH 0 return handle Note The project delib cli eth has to recompiled after each modification Therefore you can find in the directory deditec cli the shel...

Page 73: ...ital outputs 1 8 will be switched on delib_cli DO16 0 0 digital outputs 1 16 will be switched off delib_cli DO16 16 65535 digital outputs 17 32 will be switched on delib_cli DO32 0 4294967295 digital outputs 1 32 will be switched on Linux sudo delib_cli _usb DO1 17 1 digital output 18 of an USB Module will be switched on delib_cli _eth DO1 3 0 digital output 18 of a RO ETH Module will be switched ...

Page 74: ...hexadecimal delib_cli DI32 0 hex Example of a return value 0xFFFFFFFF reads the state of digital inputs 1 32 as hexadecimal Alternatively you can append the argument nounit delib_cli DI8 0 hex nounit Example of a return value FF reads the state of digital inputs 1 8 as hexadecimal Linux sudo delib_cli _usb DI1 3 Example of a return value 1 reads the state of digital input 4 of an USB Module delib_...

Page 75: ...log output 8 will be set to 3 7 Volt the comma and the dot can be used for decimal separation delib_cli AO 7 13 3mA the current of analog output 8 will be set to 13 3 mA the comma and the dot can be used for decimal separation Linux sudo delib_cli_usb AO 7 4711 analog output 8 of an USB Module will be set to the decimal value 4711 delib_cli_eth AO 6 0x4711 analog output 7 of a RO ETH Module will b...

Page 76: ...int number Alternatively you can append the argument nounit delib_cli AI 3 hex nounit Example of a return value 1FA reads the value of analog input 4 as hexadecimal delib_cli AI 3 V nounit Example of a return value 12 500000 reads the voltage of analog input 4 as point number delib_cli AI 3 mA nounit Example of a return value 20 551600 reads the current of analog input 4 as point number Linux sudo...

Page 77: ...VI DELIB API reference Seite 77 DELIB API reference ...

Page 78: ...pened see delib h nr Indicates No of module which is to be opened nr 0 1 module nr 1 2 module Return value handle handle to the corresponding module handle 0 Module was not found Remarks The handle returned by this function is needed to identify the module for all other functions Example program USB Modul öffnen handle DapiOpenModule RO_USB1 0 printf handle x n handle if handle 0 USB Modul wurde n...

Page 79: ...piCloseModule 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 ...

Page 80: ...n 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 Bei installierter Version 1 32 ist version 132 hex ...

Page 81: ...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 par DAPI_SPECIAL_GET_MODULE_CONFIG_PAR_DX Get number of analog input channels par DAPI_SPECIAL_GET_MODULE_CONFIG_PAR_AD Get number of analog output channels par DAPI_SPECIAL_GET_MODU...

Page 82: ...Anzahl der digitalen Eingangskanäle zurück ret DapiSpecialCommand handle DAPI_SPECIAL_CMD_GET_MODULE_CONFIG DAPI_SPECIAL_GET_MODULE_CONFIG_PAR_DO 0 0 Gibt die Anzahl der digitalen Ausgangskanäle zurück ret DapiSpecialCommand handle DAPI_SPECIAL_CMD_GET_MODULE_CONFIG DAPI_SPECIAL_GET_MODULE_CONFIG_PAR_DX 0 0 Gibt die Anzahl der digitalen Ein Ausgangskanäle zurück ret DapiSpecialCommand handle DAPI_...

Page 83: ...module which is to be opened nr 0 1 module nr 1 2 module exbuffer buffer for IP adresse and port Return value handle handle to the corresponding module handle 0 Module was not found Remarks The handle returned by this function is needed to identify the module for all other functions Currently this command is only supported by our RO ETH Series Example program Open ETH Module with parameter DAPI_OP...

Page 84: ...LastError 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 ...

Page 85: ...tern 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 DapiGetLastErrorText unsigned char msg sizeof msg printf Error Code x Message s n 0 msg return TRUE return FALSE ...

Page 86: ...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 87: ...nd 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 88: ...mand 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 89: ...nput from which it begins to read from 0 32 64 Return value State of the read inputs Example program unsigned long data Einen Wert von den Eingängen lesen Eingang 1 31 data unsigned long DapiDIGet32 handle 0 Chan Start 0 printf Eingang 0 31 0x x n data printf Taste für weiter n getch Einen Wert von den Eingängen lesen Eingang 32 64 data unsigned long DapiDIGet32 handle 32 Chan Start 32 printf Eing...

Page 90: ...mand 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 91: ...p 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 ...

Page 92: ...E_READ_WITH_RESET Reading and resetting the counter mode DAPI_CNT_MODE_READ_LATCHED Reading the latched counter Return value Value of the counter Example program value DapiDIGetCounter handle 0 0 Reading counter of DI Chan 0 value DapiDIGetCounter handle 1 0 Reading counter of DI Chan 1 value DapiDIGetCounter handle 8 0 Reading counter of DI Chan 8 value DapiDIGetCounter handle 0 DAPI_CNT_MODE_REA...

Page 93: ...er 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 Definition void DapiSpecialCommand ULONG handle DAPI_SPECIAL_CMD_COUNTER DAPI_SPECIAL_COUNTER_LATCH_ALL 0 0 Parameters None Example program DapiSpecialCommand handle DAPI_SPECIAL_CMD_COUNTER DAPI_SPECIAL_COUNTER_LATCH_ALL 0 0 ...

Page 94: ...eously 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 95: ...ampled 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 Gibt das Zeitintervall zum Abtasten der digitalen Eingangskanäle zurück ...

Page 96: ...This is the handle of an opened module time_ms time interval ms in which digital inputs are sampled Return value None Remarks This command only supports pulse durations between 5ms and 255ms If no time is set the default value 100ms will be used Example program DapiSpecialCommand handle DAPI_SPECIAL_CMD_DI DAPI_SPECIAL_DI_FF_FILTER_VALUE_SET 5 0 Setzt das Zeitintervall auf 5ms DapiSpecialCommand h...

Page 97: ...dule 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 Return value None Remarks This function is only supported by our RO O8 R8 module This function will lose its validity if it is overwritten with other values If you want to deactivate this function you will...

Page 98: ...ommand 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 99: ...uts 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 None ...

Page 100: ...utputs 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 101: ...Wert auf die Ausgänge schreiben data 0x0000ff00 Ausgänge 9 16 werden auf 1 gesetzt DapiDOSet32 handle 0 data Chan Start 0 printf Schreibe auf Ausgänge Daten 0x x n data printf Taste für weiter n getch Einen Wert auf die Ausgänge schreiben data 0x80000000 Ausgang 32 wird auf 1 gesetzt DapiDOSet32 handle 0 data Chan Start 0 printf Schreibe auf Ausgänge Daten 0x x n data printf Taste für weiter n get...

Page 102: ...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 103: ...his 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 104: ...s 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 105: ...instellungen Linker Objekt Bibliothek Module letzter Eintrag konfigurieren include windows h include stdio h include conio h include delib h void main void unsigned long handle unsigned long data unsigned long anz unsigned long i unsigned long chan USB Modul öffnen handle DapiOpenModule USB_Interface8 0 printf USB_Interface8 handle x n handle if handle 0 USB Modul wurde nicht gefunden printf Modul...

Page 106: ...piWriteByte handle 1 data printf Schreibe auf Adresse 0 daten 0x x n data Einen Wert auf die Ausgänge schreiben data 255 DapiWriteByte handle 2 data printf Schreibe auf Adresse 2 daten 0x x n data Einen Wert von den Eingängen lesen data unsigned long DapiReadByte handle 0 printf Gelesene Daten 0x x n data Einen A D Wert lesen chan 11 read chan 11 data DapiReadWord handle 0xff010000 chan 2 printf A...

Page 107: ...VII Appendix Seite 107 Appendix ...

Page 108: ...Appendix Seite 108 7 Appendix 7 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 ...

Page 109: ...valds 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 ...

Reviews: