3.2.1.2. Program with diverse programming languages
3.2.1.3. Program independent of the interface
3.2.1.4. SDK-Kit for Programmer
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
3.3. Test programs20
12
12
12
13
14
14
15
15
15
16
16
17
19
3.3.1. Watchdog Demo
20
4. DELIB API reference22
Index |
2Seite
INDEX
4.1. Management functions22
4.1.1. DapiOpenModule
4.1.2. DapiCloseModule
22
23
4.2. Error handling24
4.2.1. DapiGetLastError
4.2.2. DapiGetLastErrorText
24
25
4.3. Watchdog functions26
4.3.1. DapiWatchdogEnable
4.3.2. DapiWatchdogDisable
4.3.3. DapiWatchdogRetrigger
26
27
28
4.4. Example program29
5. Appendix32
5.1. Revisions32
5.2. Copyrights and trademarks33
Index |
3Seite
Introduction
I
Introduction |
Seite4
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 |
Seite5
Hardware description
II
Hardware description |
Seite6
2. Hardware description
The electronic, which is taken in an USB stick case, cares for the monitoring
with watchdog functions. The used micro controller is scanned in periodic
intervals by the PC via the USB bus.
If a timeout occurs, the watchdog will switch independently both relays with a
procedure, which is specified by the user.
In case of a timeout, the relays, if correspondingly wired, are able to e.g. reset
the PC, an external SMS modem can send warnings or a connected horn can
alarm.
The provided test program and a configuration tool facilitate a simple start.
Hardware description |
Seite7
2.1. Overview screen
Hardware description |
Seite8
2.2. Technical data
USB stick output modul with USB 2.0 / USB 1.1 interface
Micro controller monitoring
10ms to 10h timeout time adjustable
Windows Watchdog API
2 Relays for switching procedures
Connection cable (ca 1,8m) with DSUB-9 connector
Dimensions: 84,5 * 21 * 12,5 / 9,5 mm (without cable)
Hardware description |
Seite9
2.3. Pin assignment DSUB-9 connector
Pin
Description
3 & 7
Relay 1
2 & 6
Relay 2
1, 4, 5, 8, 9
NC
Description
LED Flash Sequence
Watchdog Disabled
LED permanent on (turns shortly off by PC access )
Watchdog Enabled
1*on + long pause
Watchdog Retrigger
1*on + long pause
Watchdog Timeout
2*short on + long pause
2.4. Control LED
The LED on the watchdog stick displays following status:
Hardware description |
Seite10
Software
III
Software |
Seite11
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 |
Seite12
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 |
Seite13
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
3.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. - Therefore the DELIB cares!
Software |
Seite14
3.2.1.2. Program with diverse programming languages
We provide uniform commands to create own applications. This will be solved
by the DELIB driver library.
You choose the programming language!
It can be simply developed applications under C++, C, Visual Basic, Delphi or
LabVIEW®.
3.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 !
3.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 integrate the DELIB installation in your
application.
Software |
Seite15
3.2.2. Supported operating systems
Our products support the following operating systems:
Windows 7
Windows Vista
Windows XP
Windows 2000
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 |
Seite16
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 |
Seite17
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 |
Seite18
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.
This screenshot shows a test of the watchdog stick. The configuration of the
module is shown on the upper left side.
Software |
Seite20
DELIB API reference
IV
DELIB API reference |
Seite21
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.