Deditec RO-INTERFACE-ETH Hardware-Description

RO-INTERFACE-ETH
Hardware-Description
2010
Oktober
INDEX
1. Introduction 5
1.1. General remarks 5
1.2. Customer satisfaction 5
1.3. Customer response 5
2. Hardware description 7
2.1. Overview screen 7
2.2. Technical data 8
2.3. Plug-in connector of the module 9
2.3.1. Power supply
2.3.2. Ethernet interface
2.4. Buttons of the module 10
2.5. Controll LEDs 11
2.5.1. Definition of LEDs
11
3. Configuring the module 13
3.1. Configuration via DELIB Configuration utility 13
3.2. Configuration via internal web server 17
3.3. Factory settings 18
4. Firmware Update 20
4.1. DEDITEC Flasher 20
4.2. Web interface 21
5. Restore basic configuration 24
5.1. Restore IP address 24
Index | 2Seite
INDEX
5.2. Restore firmware 24
6. Software 26
6.1. Using our products 26
6.1.1. Access via graphical applications
6.1.2. Access via the DELIB driver library
6.1.3. Access via protocol
6.1.4. Access via provided test programs
26 26 26
27
6.2. DELIB driver library 28
6.2.1. Overview
6.2.2. Supported operating systems
6.2.3. Supported programming languages
6.2.4. Installation DELIB driver library
6.2.5. DELIB Configuration Utility
28 30 30
31
33
6.3. Test programs 34
6.3.1. Digital Input-Output Demo
6.3.2. Analog Input-Output Demo
6.3.3. Stepper Demo
34 35 36
7. Appendix 38
7.1. Revisions 38
7.2. Copyrights and trademarks 39
Index | 3Seite
Introduction
I
Introduction | Seite 4
1. Introduction
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.
Modular design
The modular design of our products reduces the time and the cost of development. 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 chance, you are not content with the performance of our product, please contact us by phone or mail immediately.
We take care of the problem.
1.3. Customer response
Our best products are co-developments together with our customers. Therefor we are thankful for comments and suggestions.
Introduction | Seite 5
Hardware description
II
Hardware description |Seite 6
2. Hardware description
2.1. Overview screen
The figure shows the control module with ethernet interface (left side) combined with an input/output module (right side).
The figure shows the control module with ethernet interface (left side) combined with a flexible connector input/output module (right side).
Hardware description |Seite 7
2.2. Technical data
Single power supply +7V..+24V DC 10/100 Mbit/sec Ethernet interface Input/output access over TCP/IP WEB interface Configuration over web interface 9 Control LEDs RJ45 Socket Timeout feature providing ability to disconnect outputs for safety reasons Expandable in 16 gradations Can be combined without any problem to other modules of the RO series Windows driver library DELIB
Hardware description |Seite 8
2.3. Plug-in connector of the module
LED
Description
1
Activity
2
10/100 Mbit
2.3.1. Power supply
The input-power-supply-range lies between +7V and +24V DC.The power supply can be realized with a standard AC/DC adaptor with 1A output current. A suitable plug-in connector is delivered.
2.3.2. Ethernet interface
The network connection is provided by a RJ45 socket.
Hardware description |Seite 9
2.4. Buttons of the module
Left Button:
Reset IP address to default
(see chapter 5.1)
Right Button:
Reset firmware to factory settings.
(see chapter 5.2)
Hardware description |Seite 10
2.5. Controll LEDs
LED
Label
Description
above
3,3V
Internal 3,3V power supply
above
5V
Internal 5V power supply
1
CPU Activity
2x flashing + long break. Operating system reports: Status OK
2
Interface Activity
Active communication over Ethernet 3
Status
LED is on -> Module is ready
4
ERROR
Error during ethernet-transfer (for details see document ”Serial protocol”)
5
Inputs: Change
"State change" between 2 read-out cycles detected
6
Outputs: Auto­Off
Due to timeout, all outputs are switched-off for safety reasons
7
I/O Access
CPU-access to the connected I/O modules.
The Ethernet module has a series of control LEDs. They are used for easy visual indication of various state functions.
While switching the module on, in normal operating mode, the module should signalize the following sequence:
approx. 20 sec after switching the module on, LED 1 and 2 are flashing briefly.
-> Operating system has been loaded successfully. Then LED 3 is on permanently and LED 1 is flashing. -> Module is ready.
2.5.1. Definition of LEDs
Hardware description |Seite 11
Configuring the module
III
Configuring the module |Seite 12
3. Configuring the module
3.1. Configuration via DELIB Configuration utility
This method allows a simple configuration of the product. Following basic values can be changed.
Module name IP address Net mask Default gateway DNS server
Additionally with this tool all DEDITEC ethernet devices in the LAN network are displayed.
The following pages describe how it works...
Configuring the module |Seite 13
Start DELIB Configuration utility as follows:
Start -> Programs -> DEDITEC -> DELIB -> DELIB Configuration Utility
1.
Module Selection: select RO-ETH
2.
Find and configure RO-ETH Module
Configuring the module |Seite 14
1.
Scan RO-ETH modules: So you can find all DEDITEC ETH modules on local ethernet stream. Therefore we use an ethernet protocol which will not be routed. Because of that you can configure only modules which are connected to the bus. The advantage of this method is, that you can find modules which are not in the same sub net, of which you are configuring.
2.
Click on the module, which you want to configure.
Configuring the module |Seite 15
Here you can change the module name according to your wishes
1.
You can change module name, IP address, net mask, default gateway and DNS server.
2.
Write new Values to Module.
Notice:
At the configuration of the RO-ETH module should be paid attention to the IP address. It has to be in the same IP segment in which the control PC is. Of course you must not select an already used IP address.
If the standard IP address of the module is not from the address range of the network, the module will not be reachable by TCP/IP at the moment. Problems of accessibility will also occur, if the IP address is already used. However the IP address and the net mask of the ethernet module are configurable by this utility. Alternatively you can connect the module to the PC and set the IP address and the net mask directly. After the accessibility is given, the further configuration is ensued by a browser via the integrated web server of the ethernet module.
To these belongs ask your system administrator.
Configuring the module |Seite 16
3.2. Configuration via internal web server
The RO-ETH module has an own web server by which it can be configured, too.
Configuring the module |Seite 17
3.3. Factory settings
The factory settings of the ethernet module include following settings: IP address: 192.168.1.1
The factory settings can be restored by pushing the left button -> see chapter
5.2
IP address 192.168.1.1 Subnet mask 255.255.255.0 Standard gateway 192.168.1.254
Configuring the module |Seite 18
Firmware Update
IV
Firmware Update | Seite 19
4. Firmware Update
4.1. DEDITEC Flasher
Approach:
Download the latest firmware inclusive software update. http://www.deditec.
de/en/module/software/delib/download.html
Extract all data to one folder Start the application deditec-flasher.exe
1.
Select the interface. For ethernet press the key "E"
2.
Select the module which you want to update. Press the key "M" for CPU interface
3.
After successfully flashing , in the prompt appears: Flash OK!
Firmware Update | Seite 20
4.2. Web interface
Approach:
1.
Type the IP address of your module in the browser
Firmware Update | Seite 21
1.
Click on FW-Update
2.
Select the file “ro_cpu_eth_fw.dfw”
3.
Click on Firmware update
Firmware Update | Seite 22
Restore basic configuration
V
Restore basic configuration | Seite 23
5. Restore basic configuration
5.1. Restore IP address
The default value of the IP address is: 192.168.1.1
Left Button: Restore IP address to default (192.168.1.1):
To restore the IP address proceed as follow:
Push the button at least 5 sec. After that, the left LEDs "CPU Activity" and "Interface Activity" should be
flashing four times (confirmation of receipt) After this, the module has following settings:
IP address 192.168.1.1 Subnet mask 255.255.255.0 Standard gateway 192.168.1.254
5.2. Restore firmware
To restore the firmware to default value proceed as follow:
Right Button: Restore firmware to factory settings
To restore the firmware to factory settings proceed as follow:
Press the button at least 10sec. After this, the three LED‘s “CPU Activity”, “Interface Activity” and “Status”
should be flashing four times (confirmation of receipt). After this, the module restarts.
The firmware and configuration of the factory settings are now active again!
Restore basic configuration | Seite 24
Software
VI
Software | Seite 25
6. Software
6.1. Using our products
6.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!
6.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
6.1.3. Access via protocol
The protocol for the activation of our products is open source. So you are able to use our products on systems without Windows or Linux.
Software | Seite 26
6.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.
Software | Seite 27
6.2. DELIB driver library
6.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
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. - Therefore the DELIB cares!
Software | Seite 28
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®.
Program independent of the interface
Write your application independent of the interface ! Program an apllication for an USB product of us. - Also, it will work with an
ethernet or RS-232 product of us !
SDK-Kit for Programmer
Integrate the DELIB in your application. On demand you receive an installation script for free, which allows you, to integrate the DELIB installation in your apllication.
Software | Seite 29
6.2.2. Supported operating systems
Our products support the following operating systems:
Windows 2000 Windows XP Windows Vista Windows 7 Linux
6.2.3. Supported programming languages
Our products are responsive via the following programming languages:
C C++ C# Delphi VisualBasic VB.NET MS-Office
Software | Seite 30
6.2.4. Installation DELIB driver library
DELIB stands for DEDITEC Library and contains the necessary libraries for the modules in the programming languages C, Delphi and Visual Basic.
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 31
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 32
6.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.
Software | Seite 33
6.3. Test programs
6.3.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.
Software | Seite 34
6.3.2. Analog Input-Output Demo
Start “Analog Input-Output Demo” as follows: Start Programme DEDITEC DELIB Analog Input-Output Demo.
The screenshot shows a test of the RO-USB-AD16-DA2_ISO. The configuration of the module (16 A/D inputs and 2 D/A outputs) is shown on the upper left side.
Software | Seite 35
6.3.3. Stepper Demo
Start “Stepper Demo” as follows: Start Programme DEDITEC DELIB Stepper Demo.
The screenshot shows a test of the RO-USB-STEPPER2. The configuration of the module (2 Stepper) is shown on the upper left side.
Software | Seite 36
Appendix
VII
Appendix | Seite 37
7. Appendix
7.1. Revisions
Rev 1.00 First issue Rev 2.00 Design change
Appendix | Seite 38
7.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.
Appendix | Seite 39
RO-DIGITAL-IN-OUT
Hardware-Description
2010
Oktober
INDEX
1. Introduction 6
1.1. General remarks 6
1.2. Customer satisfaction 6
1.3. Customer response 6
2. Hardware description 8
2.1. Opto-coupler inputs 9
2.1.1. Overview screen
2.1.2. Technical data
2.1.3. 16-bit counter
2.1.4. Registering short input pulses
2.1.5. Galvanically decouppled through optocouplers
2.1.6. Plug-in connector on the module
2.1.6.1. Connection wiring
2.1.6.2. Visual control of the inputs
2.1.6.3. Pinout
2.1.7. Variable input voltage range
2.1.7.1. Changing the input voltage
10
11 11 11
12
12
13 13
13
14
2.2. Relay outputs 15
2.2.1. Overview screen
2.2.2. Technical data
2.2.3. Timeout-protection
2.2.4. Plug-in connector on the module
2.2.4.1. Relay-outputs (galvanically decoupled, max. 1A)
2.2.4.2. Connection wiring
2.2.4.3. Visual control of the outputs
2.2.4.4. Pinout
15
16
17 17
17 18 18 18
2.3. MOSFET outputs 19
2.3.1. Overview screen
2.3.2. Technical data
2.3.3. Timeout-protection
2.3.4. Plug-in connector on the module
19
20
21 21
Index | 2Seite
INDEX
2.3.4.1. Optocoupler-outputs (galvanically isolated, max. 2A DC)
2.3.4.2. Connection wiring
2.3.4.3. Pinout
3. Software 24
3.1. Using our products 24
21
22 22
3.1.1. Access via graphical applications
3.1.2. Access via the DELIB driver library
3.1.3. Access via protocol
3.1.4. Access via provided test programs
24 24 24
25
3.2. DELIB driver library 26
3.2.1. Overview
3.2.2. Supported operating systems
3.2.3. Supported programming languages
3.2.4. Installation DELIB driver library
3.2.5. DELIB Configuration Utility
26 28 28 29
31
3.3. Test programs 32
3.3.1. Digital Input-Output Demo
32
4. DELIB API reference 34
4.1. Management functions 34
4.1.1. DapiOpenModule
4.1.2. DapiCloseModule
4.2. Error handling 36
34
35
4.2.1. DapiGetLastError
4.2.2. DapiGetLastErrorText
36
37
4.3. Reading Digital inputs 38
4.3.1. DapiDIGet1
4.3.2. DapiDIGet8
4.3.3. DapiDIGet16
4.3.4. DapiDIGet32
4.3.5. DapiDIGet64
4.3.6. DapiDIGetFF32
4.3.7. DapiDIGetCounter
38 39
40
41 42 43
44
Index | 3Seite
INDEX
4.4. Setting Digital outputs 45
4.4.1. DapiDOSet1
4.4.2. DapiDOSet8
4.4.3. DapiDOSet16
4.4.4. DapiDOSet32
4.4.5. DapiDOSet64
4.4.6. DapiDOReadback32
4.4.7. DapiDOReadback64
45 46
47 48 49
50
51
4.5. Output timeout management 52
4.5.1. DapiSpecialCMDTimeout
4.5.2. DapiSpecialCMDTimeoutGetStatus
52 53
4.6. Test functions 54
4.6.1. DapiPing
54
4.7. Example program 55
5. Appendix 58
5.1. Revisions 58
5.2. Copyrights and trademarks 59
Index | 4Seite
Introduction
I
Introduction | Seite 5
1. Introduction
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.
Modular design
The modular design of our products reduces the time and the cost of development. 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 chance, you are not content with the performance of our product, please contact us by phone or mail immediately.
We take care of the problem.
1.3. Customer response
Our best products are co-developments together with our customers. Therefor we are thankful for comments and suggestions.
Introduction | Seite 6
Hardware description
II
Hardware description |Seite 7
2. Hardware description
Using the in-/output modules is based on two 16 pol. connectors with each 8 different current circuits. Each state of these (total 16) current circuits is signalized by a LED. The modules are numbered from left to right (see overview screen).
Hardware description |Seite 8
2.1. Opto-coupler inputs
2.1.1. Overview screen
The figure shows two modules next to each other with corresponding numbering of the terminal blocks.
The lower figure shows a flexible conntector module with 32 outputs and corresponding numbered ports. Each outer end of the module has a 26 pol. wire trap connector. Thus, multiple modules can be connected in series using a ribbon cable for each connection.
Hardware description |Seite 9
2.1.2. Technical data
Variable power supply min. 5V, max. 30V AC 16-bit counter for the first 16 input channels Pulse-detection between 2 read out cycles, indicated by LED LED status indication of the inputs Galvanically isolated using optocouplers Comfortable connector system with ejection mechanism Expandable in 16 gradations Can be combined without any problem to other modules of the RO series
Hardware description |Seite 10
2.1.3. 16-bit counter
The first 16 input channels have each a 16 bit counter. Thus, events as light barriers, turnstiles or push-buttons are counted. Easy logical circuits are realizable, which may e.g. switch one or several outputs, if a counter reached a certain amount (set-point is reached). Please refer to the manual ”RO-series” to implement such logical circuits into software.
2.1.4. Registering short input pulses
Short input pulses between to read-out cycles are registered through an additional logic and can be separately read-out. A registered pulse on one or more inputs is signalized by the LED ”Inputs: Change” on the control module. The LED is extinguishing, if the software-register of the input state change is read out by the user. For more indformation, see ”Register assignment”.
2.1.5. Galvanically decouppled through optocouplers
AC input optocouplers 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.
Hardware description |Seite 11
2.1.6. Plug-in connector on the module
As terminal block, user-friendly terminal strips with locking protection and ejection mechanism are used. They are reverse-polarity protected and allow quick replugging. The wire connection itself is realised with a screwless connector system. A tool is included with each module.
2.1.6.1. Connection wiring
Connecting the wires is to be effected at the ports with the same numbering, for
example: 1a & 1b, 2a & 2b. ...
The optocoupler inputs are suitable for AC voltage. Therefore it is not necessary to take care of the connection polarity.
The figure shows two terminal blocks with numbered connection ports.
Hardware description |Seite 12
2.1.6.2. Visual control of the inputs
Port
Pin
Port
Pin11a & 1b
9
9a & 9b
2
2a & 2b
10
10a & 10b
3
3a & 3b
11
11a & 11b
4
4a & 4b
12
12a & 12b
5
5a & 5b
13
13a & 13b
6
6a & 6b
14
14a & 14b
7
7a & 7b
15
15a & 15b
8
8a & 8b
16
16a & 16b
Input voltage range
5V – 15V
15V – 30V
Resistance value
1K
2K2
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.
2.1.6.3. Pinout
2.1.7. Variable input voltage range
The factory-default of the inputs is set to a voltage range of 15V to 30V. This may be changed to a range of 5V to 15V (even afterward).
Hardware description |Seite 13
2.1.7.1. Changing the input voltage
Each terminal block has 8 inputs sudivided in two groups and each group has its own input voltage range (resulting groups: 1-4, 5-8, 9-12 und 13-16). Each group‘s input voltage range is defined by a corresponding resistor network.
The following steps describes how to exchange one or more resistor networks.
Notice!
Bevore opening the device, please note the following:
Disconnect the power supply (unplug AC/DC adaptor)!
Do not touch electronic components. They could be destroyed by electrostatic discharge! If necessary, touch grounded metal casings or radiators.
Remove a module‘s side element. Unscrew the three Phillips screws.
Pull the circuit board together with the front panel sideways out.
Lift the front panel from the module.
Every input module has two single rowed socket terminal strips in which the resistor networks are plugged in. Please carefully remove the desired resistor network and replace them it appropriate one.
Assembling the elements in done the reverse order.
Hardware description |Seite 14
2.2. Relay outputs
2.2.1. Overview screen
The figure shows two modules next to each other with corresponding numbering of the terminal blocks.
The lower figure shows a flexible conntector module with 32 outputs and corresponding numbered ports. Each outer end of the module has a 26 pol. wire trap connector. Thus, multiple modules can be connected in series using a ribbon cable for each connection.
Hardware description |Seite 15
2.2.2. Technical data
Timeout-protection LED status indication of the outputs Galvanically isolated using optocouplers Comfortable connector system with ejection mechanism Expandable in 16 gradations Can be combined without any problem to other modules of the RO series Max. switching voltage: 36V Max. switching current: 1A Max. switching power: 20W Switching cycles according to the manufacturer: 10 Mio.
Hardware description |Seite 16
2.2.3. Timeout-protection
The timeout-protection gives the possibility to switch-off automatically the outputs on its own to prevent damage. This takes place, if in a predefined time frame no communication with the module was possible. Reasons could be cable disruption, PC-crash and more. This way damage control, surcharge of connected equipment and risk of accidents can be avoided. Switching off the outputs is indicated by a LED.
2.2.4. Plug-in connector on the module
As terminal block, user-friendly terminal strips with locking protection and ejection mechanism are used. They are reverse-polarity protected and allow quick replugging. The wire connection itself is realised with a screwless connector system. A tool is included with each module.
2.2.4.1. Relay-outputs (galvanically decoupled, max. 1A)
The relays are able to switch voltages up to 36V. The max. current is 1A at a max. power of 20W.
Additionally, the relays provide a safe electrical isolation of the module to the connected equipment.
Hardware description |Seite 17
2.2.4.2. Connection wiring
Port
Pin
Port
Pin11a & 1b
9
9a & 9b
2
2a & 2b
10
10a & 10b
3
3a & 3b
11
11a & 11b
4
4a & 4b
12
12a & 12b
5
5a & 5b
13
13a & 13b
6
6a & 6b
14
14a & 14b
7
7a & 7b
15
15a & 15b
8
8a & 8b
16
16a & 16b
Connecting the wires is to be effected at the ports with the same numbering, for
example: 1a & 1b, 2a & 2b. ...
It is not necessary to take care to the correct polarity.
2.2.4.3. Visual control of the outputs
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.
2.2.4.4. Pinout
Hardware description |Seite 18
2.3. MOSFET outputs
2.3.1. Overview screen
The figure shows two modules next to each other with corresponding numbering of the terminal blocks.
The lower figure shows a flexible conntector module with 32 outputs and corresponding numbered ports. Each outer end of the module has a 26 pol. wire trap connector. Thus, multiple modules can be connected in series using a ribbon cable for each connection.
Hardware description |Seite 19
2.3.2. Technical data
Timeout-protection LED status indication of the outputs Galvanically isolated using optocouplers Comfortable connector system with ejection mechanism Expandable in 16 gradations Can be combined without any problem to other modules of the RO series Max. switching voltage: 30V DC Max. switching current: 2A DC Max. switching power: 40W
Hardware description |Seite 20
2.3.3. Timeout-protection
The timeout-protection gives the possibility to switch-off automatically the outputs on its own to prevent damage. This takes place, if in a predefined time frame no communication with the module was possible. Reasons could be cable disruption, PC-crash and more. This way damage control, surcharge of connected equipment and risk of accidents can be avoided. Switching off the outputs is indicated by a LED.
2.3.4. Plug-in connector on the module
As terminal block, user-friendly terminal strips with locking protection and ejection mechanism are used. They are reverse-polarity protected and allow quick replugging. The wire connection itself is realised with a screwless connector system. A tool is included with each module.
2.3.4.1. Optocoupler-outputs (galvanically isolated, max. 2A DC)
Every output is realized using high current optocouplers. Using optocouplers provides a secure galvanical decoupling of the module-driven equipment to the module itself.
Pay attention to the optocoupler’s output polarity while wiring (see figure below)!
Hardware description |Seite 21
2.3.4.2. Connection wiring
Port
Pin
Port
Pin11a & 1b
9
9a & 9b
2
2a & 2b
10
10a & 10b
3
3a & 3b
11
11a & 11b
4
4a & 4b
12
12a & 12b
5
5a & 5b
13
13a & 13b
6
6a & 6b
14
14a & 14b
7
7a & 7b
15
15a & 15b
8
8a & 8b
16
16a & 16b
Connecting the wires is to be effected at the ports with the same numbering, for example: 1a & 1b, 2a & 2b, ... Pay attention to the optocoupler’s output polarity while wiring, else the outputs will get damaged. Connect the positive voltage to port ”a”, and the switched positive voltage to port ”b”.
2.3.4.3. Pinout
Hardware description |Seite 22
Software
III
Software | Seite 23
3. Software
3.1. Using our products
3.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!
3.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
3.1.3. Access via protocol
The protocol for the activation of our products is open source. So you are able to use our products on systems without Windows or Linux.
Software | Seite 24
3.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.
Software | Seite 25
3.2. DELIB driver library
3.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
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. - Therefore the DELIB cares!
Software | Seite 26
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®.
Program independent of the interface
Write your application independent of the interface ! Program an apllication for an USB product of us. - Also, it will work with an
ethernet or RS-232 product of us !
SDK-Kit for Programmer
Integrate the DELIB in your application. On demand you receive an installation script for free, which allows you, to integrate the DELIB installation in your apllication.
Software | Seite 27
3.2.2. Supported operating systems
Our products support the following operating systems:
Windows 2000 Windows XP Windows Vista Windows 7 Linux
3.2.3. Supported programming languages
Our products are responsive via the following programming languages:
C C++ C# Delphi VisualBasic VB.NET MS-Office
Software | Seite 28
3.2.4. Installation DELIB driver library
DELIB stands for DEDITEC Library and contains the necessary libraries for the modules in the programming languages C, Delphi and Visual Basic.
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 29
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 30
3.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.
Software | Seite 31
3.3. Test programs
3.3.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.
Software | Seite 32
DELIB API reference
IV
DELIB API reference | Seite 33
4. DELIB API reference
// USB-Modul öffnen handle = DapiOpenModule(RO_USB1, 0); printf("handle = %x\n", handle); if (handle==0) { // USB Modul wurde nicht gefunden printf("Modul konnte nicht geöffnet werden\n"); return; }
4.1. Management functions
4.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 -> 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
DELIB API reference | Seite 34
4.1.2. DapiCloseModule
// Close the module DapiCloseModule(handle);
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
DELIB API reference | Seite 35
4.2. Error handling
ULONG error; error=DapiGetLastError(); if(error==0) return FALSE; printf("ERROR = %d", error);
4.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
DELIB API reference | Seite 36
4.2.2. DapiGetLastErrorText
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; }
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
DELIB API reference | Seite 37
4.3. Reading Digital inputs
4.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).
DELIB API reference | Seite 38
4.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.
DELIB API reference | Seite 39
4.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.
DELIB API reference | Seite 40
4.3.4. DapiDIGet32
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("Eingang 32-64 : 0x%x\n", data); printf("Taste für weiter\n"); getch();
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.
Example program
DELIB API reference | Seite 41
4.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.
DELIB API reference | Seite 42
4.3.6. DapiDIGetFF32
Description
This command reads the flip-flops from the inputs and resets them. (Input state change).
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, 32,
..)
Return value
State of 32 input change states
DELIB API reference | Seite 43
4.3.7. DapiDIGetCounter
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_READ_WITH_RESET); // Reading AND resetting counter of DI Chan 0
Description
This command reads the counter of a digital input
Definition
ULONG DapiDIGetCounter(handle, ch, par1);
Parameters
handle=This is the handle of an opened module. ch=Specifies the digital input, from which the counter will be read par1=0 (Normal counter function) par1=DAPI_CNT_MODE_READ_WITH_RESET (Reading and resetting the
counter)
Return value
Value of the counter.
Example program
DELIB API reference | Seite 44
4.4. Setting Digital outputs
4.4.1. 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
DELIB API reference | Seite 45
4.4.2. 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
None
DELIB API reference | Seite 46
4.4.3. 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
DELIB API reference | Seite 47
4.4.4. DapiDOSet32
// Einen 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"); getch(); // ---------------------------------------------------­// Einen Wert auf die Ausgänge schreiben data = 0x80000000; // Ausgang 64 wird auf 1 gesetzt DapiDOSet32(handle, 32, data); // Chan Start = 32 printf("Schreibe auf Ausgänge Daten=0x%x\n", data); printf("Taste für weiter\n"); getch();
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
Example program
DELIB API reference | Seite 48
4.4.5. 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
DELIB API reference | Seite 49
4.4.6. 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.
DELIB API reference | Seite 50
4.4.7. 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.
DELIB API reference | Seite 51
4.5. Output timeout management
DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_TIMEOUT, DAPI_SPECIAL_TIMEOUT_SET_VALUE_SEC, 3, 7); //Die Zeit des Timeouts wird auf 3,7sek gesetzt. DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_TIMEOUT, DAPI_SPECIAL_TIMEOUT_ACTIVATE, 0, 0); //Der Timeout wird aktiviert. DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_TIMEOUT, DAPI_SPECIAL_TIMEOUT_DEACTIVATE, 0, 0); //Der Timeout wird deaktiviert.
4.5.1. DapiSpecialCMDTimeout
Description
This command serves to set the timeout time
Definition
DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_TIMEOUT, cmd, par1, par2);
Parameters
handle=This is the handle of an opened module
Set timeout time
cmd=DAPI_SPECIAL_CMD_TIMEOUT_SET_VALUE_SEC par1=Seconds [s] par2=Milliseconds [100ms] (value 6 stands for 600ms)
Activate timeout
cmd=DAPI_SPECIAL_CMD_TIMEOUT_ACTIVATE
Deactivate timeout
cmd=DAPI_SPECIAL_CMD_TIMEOUT_DEACTIVATE
Return value
None
Example program
DELIB API reference | Seite 52
4.5.2. DapiSpecialCMDTimeoutGetStatus
status = DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_TIMEOUT, DAPI_SPECIAL_TIMEOUT_GET_STATUS, 0, 0); //Abfrage des Timeout-Status.
Description
This command reads the timeout status.
Definition
ULONG DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_TIMEOUT, DAPI_SPECIAL_TIMEOUT_GET_STATUS, 0, 0);
Parameters
handle=This is the handle of an opened module
Return value
Return=0 (timeout is deactivated) Return=1 (timeout is activated) Return=2 (timeout has occurred)
Example program
DELIB API reference | Seite 53
4.6. Test functions
4.6.1. DapiPing
Description
This command checks the connection of an opened module.
Definition
ULONG DapiPing(ULONG handle, ULONG value);
Parameters
handle=This is the handle of an opened module value=Given test value to the module
Return value
The given test-value “value“ is also the return value
DELIB API reference | Seite 54
4.7. 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) .. 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 konnte nicht geöffnet werden\n"); printf("TASTE für weiter\n"); getch();
DELIB API reference | Seite 55
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); // ---------------------------------------------------­// Einen Wert auf die Ausgänge schreiben data = 255; DapiWriteByte(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("Adress=%x, ret=%x volt=%f\n", chan, data, ((float) data) / 1024*5);// Bei 5 Volt Ref // ---------------------------------------------------­// Modul wieder schliessen DapiCloseModule(handle); printf("TASTE für weiter\n"); getch(); return ; }
DELIB API reference | Seite 56
Appendix
V
Appendix | Seite 57
5. Appendix
5.1. Revisions
Rev 1.00 First issue Rev 2.00 Design change
Appendix | Seite 58
5.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.
Appendix | Seite 59
RO-Series
Hardware-Description
2010
November
INDEX
1. Introduction 10
1.1. General remarks 10
1.2. Customer satisfaction 10
1.3. Customer response 10
2. Hardware description 12
2.1. Ethernet Interface 12
2.1.1. Hardware description
2.1.1.1. Overview screen
2.1.1.2. Technical data
2.1.1.3. Plug-in connector of the module
2.1.1.3.1. Power supply
2.1.1.3.2. Ethernet interface
2.1.1.4. Buttons of the module
2.1.1.5. Controll LEDs
2.1.1.5.1. Definition of LEDs
2.1.2. Restore basic configuration
2.1.2.1. Restore IP address
2.1.2.2. Restore firmware
2.1.3. Firmware Update
2.1.3.1. DEDITEC Flasher
2.1.3.2. Web interface
2.1.4. Configuring the module
2.1.4.1. Configuration via DELIB Configuration utility
2.1.4.2. Configuration via internal web server
2.1.4.3. Factory settings
12
12
14 15 15 15 16
17
17
18
18 18
19
19
20
22
22 26
27
2.2. CAN Interface 28
2.2.1. Hardware description
2.2.1.1. Overview screen
2.2.1.2. Technical data
2.2.1.3. Plug-in connector of the module
2.2.1.3.1. Power supply
2.2.1.3.2. CAN interface
2.2.1.4. Control LEDs
2.2.1.4.1. Definition of LEDs
Index |
28
28 29
30 30 30
31
31
2Seite
Loading...