background image

Hardware-Description

Juli

ETH-TTL-64

2019

Summary of Contents for ETH-TTL-64

Page 1: ...Hardware Description Juli ETH TTL 64 2019 ...

Page 2: ...he module 10 2 2 4 DIP Switches 2 3 Technical data 12 2 4 Overview screen ETH TTL 64 13 2 5 Power supply 14 2 6 Configuration of the voltage level of TTL I O s 14 2 7 Pin assignment 16 16 2 7 1 J1 Pin assignment ETH TTL I O 0 31 18 2 7 2 J2 Pin assignment ETH TTL I O 32 63 3 Software 20 3 1 Using our products 20 20 3 1 1 Access via graphical applications 20 3 1 2 Access via the DELIB driver librar...

Page 3: ...Visual C unter Windows 64bit 27 3 3 4 Integration of the delib pas in Delphi 27 3 3 5 Integration of the delib bas in Visual Basic 27 3 3 6 Integration of the delib vb in VB NET 27 3 3 7 Integration of the delib bas in MS Office VBA 27 3 3 8 Integration of the delib dll in LabVIEW 27 3 3 8 1 Integration of the delib dll in LabVIEW 37 3 3 8 2 Usage of the VIs in LabVIEW 4 Hardware 41 4 1 LED blinki...

Page 4: ...ue_Get 66 5 3 11 Dapi_Special_DI_FF_Filter_Value_Set 5 4 Setting Digital outputs 67 67 5 4 1 DapiDOSet1_WithTimer 68 5 4 2 DapiDOSet1 69 5 4 3 DapiDOSet8 70 5 4 4 DapiDOSet16 71 5 4 5 DapiDOSet32 72 5 4 6 DapiDOSet64 73 5 4 7 DapiDOReadback32 74 5 4 8 DapiDOReadback64 5 5 Set TTL In Outputs direction with DapiSpecialCommand 75 75 5 5 1 DAPI_SPECIAL_CMD_SET_DIR_DX_1 76 5 5 2 DAPI_SPECIAL_CMD_SET_DI...

Page 5: ...I Introduction Seite 5 Introduction ...

Page 6: ...can offer you high quality products at a competitive price We ensure a long delivery availability If semiconductors are no longer available we can react faster With us usually only modules have to be redesigned and not the entire product This increases the delivery availability 1 2 Customer satisfaction Our philosophy a content customer will come again Therefor customer satisfaction is in first pl...

Page 7: ...II Hardware description Seite 7 Hardware description ...

Page 8: ...t interface with 100 10Mbit and 64 TTL I Os The high grade case is suited for din rail mounting Two 37 pin d sub sockets grants access to the I Os Dip switches allowing a quick configuration of network settings LEDs on the board show the status of the module the power supply the communication via ethernet and also the access to the I Os ...

Page 9: ...he folder 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 2 2 Step 2 Connecting of the module Connect the ETH TTL 64 via ethernet cable with your network or PC 2 2 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 examp...

Page 10: ...y to apply the settings 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 will be used from thee EEPROM of the module Using the DELIB Configuration Utility these settings can be edited and saved in the EEPROM of the module Se...

Page 11: ...ts with the parameters stored in the EEPROM OFF The data stored in EEPROM values IP address gateway subnet mask DHCP are ignored during module startup The module starts with the default settings Default settings IP 192 168 1 1 Subnet mask 255 255 255 0 Gateway 192 168 1 254 DHCP Off The values stored in the EEPROM will not be changed DIP Switch 4 Mode Description ON Module starts normally OFF Only...

Page 12: ... Maximum output current 5mA for each channel Access time max 1kHz API Bibliothek Delib driver library for C C VB VB Net Delphi and LabVIEW Control LED Power Indicates if power is supplied Status Displays the current operating status of the product Activity LED I O Indicates access to the I O channels Interface Activity Displays the Ethernet communication Connectors 2 37 pin D sub connector Operati...

Page 13: ...Hardware description Seite 13 2 4 Overview screen ETH TTL 64 ...

Page 14: ...h 1A output current A suitable plug in connector is included in each shipment 2 6 Configuration of the voltage level of TTL I O s TTL level of 1 8 V to 5 V By default you can select the TTL level of 3 3 V or 5V via jumper If you remove the jumper on the module you can apply your own voltage between 1 8 V to 5 V to the TTL I O module so the possibilities of the modules ...

Page 15: ...re description Seite 15 were significantly increased If you want to apply your own voltage this is done via the VIN pin see chapter Pin assignment The TTL I O s of the module can be configured in a 16 blocks ...

Page 16: ...0 28 I O 1 10 I O 2 29 I O 3 11 I O 4 30 I O 5 12 I O 6 31 I O 7 13 I O 8 32 I O 9 14 I O 10 33 I O 11 15 I O 12 34 I O 13 16 I O 14 35 I O 15 17 VIN 0 15 36 VIN 16 31 18 GND 37 GND 19 GND Note The VIN pin is used to apply your own voltage to the I O s of the module This voltage can be between 1 8V and 5V If the TTL levels are set to 3 3V or 5V via jumper assignment the VIN pin serves as the outpu...

Page 17: ...Hardware description Seite 17 problem is solved ...

Page 18: ...5 11 I O 36 30 I O 37 12 I O 38 31 I O 39 13 I O 40 32 I O 41 14 I O 42 33 I O 43 15 I O 44 34 I O 45 16 I O 46 35 I O 47 17 VIN 32 47 36 VIN 48 63 18 GND 37 GND 19 GND Note The VIN pin is used to apply your own voltage to the I O s of the module This voltage can be between 1 8V and 5V If the TTL levels are set to 3 3V or 5V via jumper assignment the VIN pin serves as the output Until and includin...

Page 19: ...III Software Seite 19 Software ...

Page 20: ...ll the functions of our driver library explained and provided with application examples 3 1 3 Access via protocol For products with Ethernet CAN or serial interface we offer you our open protocols These protocols can be used without our DELIB driver library on devices with the appropriate interface The way through our protocols are operating system independent You can find our manuals Protocols Ta...

Page 21: ...Software Seite 21 This manual provides a complete overview of the required register addresses of our modules as well as the structure of the different communication protocols ...

Page 22: ...cess via provided test programs With our DELIB Module Demo you can test our control and control technology products for functionality without any major configuration effort For detailed information see chapter DELIB Module Demo ...

Page 23: ...re 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 ...

Page 24: ...h diverse programming languages 3 2 1 3 Program independent of the interface 3 2 1 4 SDK Kit for Programmer Integrate the DELIB into your application On request you will receive free of charge installation scripts which allow you to integrate the DELIB installation into your application ...

Page 25: ...ver 2008 Linux 64 Bit Windows 10 x64 Windows 8 x64 Windows 7 x64 Windows XP x64 Windows Vista x64 Windows Server 2012 x64 Windows Server 2008 x64 Windows Server 2003 x64 Linux x64 3 2 3 Supported programming languages Our products are responsive via the following programming languages C C C Delphi VisualBasic VB NET MS Office VBA Java Platform independent only for Ethernet products Java JNI only f...

Page 26: ...Software Seite 26 If provided by the programming language development environment we support both 32 bit and 64 bit projects ...

Page 27: ...Visual C unter Windows 64bit 3 3 4 Integration of the delib pas in Delphi 3 3 5 Integration of the delib bas in Visual Basic 3 3 6 Integration of the delib vb in VB NET 3 3 7 Integration of the delib bas in MS Office VBA 3 3 8 Integration of the delib dll in LabVIEW 3 3 8 1 Integration of the delib dll in LabVIEW The LabVIEW Sampleprogram Deditec_Modul_Control vi is not a EXE File and you need to ...

Page 28: ...f 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 29: ...Software Seite 29 Choose the option create VIs for DLL and press continue ...

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

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

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

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

Page 34: ...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 35: ...oftware Seite 35 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 36: ...Software Seite 36 You recive a summary of the executed steps Press continue The VIs will now be created and are ready to use ...

Page 37: ...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 38: ...Software Seite 38 The function could look like this in LabVIEW The channel and mode are passed as unsigned long ...

Page 39: ...Software Seite 39 ...

Page 40: ...IV Hardware Seite 40 Hardware ...

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

Page 42: ...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 43: ...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 44: ...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 45: ...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 46: ...Hardware Seite 46 Geben Sie hier den Text ein ...

Page 47: ...V DELIB API reference Seite 47 DELIB API reference ...

Page 48: ...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 49: ...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 50: ...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 51: ...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 52: ...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 53: ...e which is to be opened nr 0 1 module nr 1 2 module exbuffer buffer for IP adresse port and timeout 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 This command is only support by modules with ethernet interface Example program Open ETH Module with parameter DA...

Page 54: ...error If multiple modules are used the use of DapiGetLastErrorByHandle is recommended Definition ULONG DapiGetLastError Parameters None Return value Error code 0 no error see delib_error_codes h Example program BOOL IsError unsigned char msg 500 unsigned long error_code DapiGetLastError if error_code DAPI_ERR_NONE DapiGetLastErrorText unsigned char msg sizeof msg printf Error Code 0x x Message s n...

Page 55: ...orText returns the old error Definition ULONG DapiGetLastErrorText unsigned char msg unsigned long msg_length Parameters msg text buffer msg_length length of the buffer Example program BOOL IsError unsigned char msg 500 unsigned long error_code DapiGetLastError if error_code DAPI_ERR_NONE DapiGetLastErrorText unsigned char msg sizeof msg printf Error Code 0x x Message s n error_code msg DapiClearL...

Page 56: ...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 57: ...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 58: ...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 59: ...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 60: ...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 61: ...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 62: ...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 63: ...e 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 Return value None Remarks This command is only supported by our O8 R8 time modules Example program DapiSpecialCommand ULONG handle DAPI_SPECIAL_CMD...

Page 64: ...ition 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 Return value None Remarks This command is only supported by our O8 R8 time modules Example program DapiSpecialCommand ULONG handle DAPI_SPECIAL_CMD_COUNTER DAPI_SPECIAL_COUNTER_LATCH_ALL_WITH_RESET 0 0 ...

Page 65: ...opened module Time_ms Time interval ms by scanning digital input channels Return value None Remarks This command only supports pulse times between 5ms and 255ms If no time is set the default value is 100ms This command is not supported by our modules with Ethernet interface Example program DapiSpecialCommand handle DAPI_SPECIAL_CMD_DI DAPI_SPECIAL_DI_FF_FILTER_VALUE_SET 5 0 Setzt das Zeitintervall...

Page 66: ...and 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 Remarks This command is only supported by modules with ethernet interface 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ü...

Page 67: ...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 68: ...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 69: ...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 70: ...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 71: ...ert 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 getc...

Page 72: ...4 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 73: ...is 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 74: ... 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 75: ...x02 0 Set Dir of TTL I O CH1 to output others to input DapiSpecialCommand handle DAPI_SPECIAL_CMD_SET_DIR_DX_1 0 0x04 0 Set Dir of TTL I O CH2 to output others to input DapiSpecialCommand handle DAPI_SPECIAL_CMD_SET_DIR_DX_1 0 0x08 0 Set Dir of TTL I O CH3 to output others to input DapiSpecialCommand handle DAPI_SPECIAL_CMD_SET_DIR_DX_1 0 0x10 0 Set Dir of TTL I O CH4 to output others to input Dap...

Page 76: ...8 Use the DAPI_SPECIAL_CMD_SET_DIR_DX_1 command for USB MINI TTL8 Example program DapiSpecialCommand handle DAPI_SPECIAL_CMD_SET_DIR_DX_8 0 0x1 0 Set Dir of TTL I O CH0 7 to output others to input DapiSpecialCommand handle DAPI_SPECIAL_CMD_SET_DIR_DX_8 0 0x3 0 Set Dir of TTL I O CH0 15 to output others to input DapiSpecialCommand handle DAPI_SPECIAL_CMD_SET_DIR_DX_8 0 0xc 0 Set Dir of TTL I O CH16...

Page 77: ...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 78: ...iWriteByte 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 Ad...

Page 79: ...VI Appendix Seite 79 Appendix ...

Page 80: ...Appendix Seite 80 6 Appendix 6 1 Revisions Rev 2 00 First DEDITEC issue Rev 2 01 Added chapters Firmware update and Integration of the DELIB Rev 2 02 Added index ...

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