BS-SER module with 8/16/32 digital inputs/outputs

0 customer reviews

ab  312,49

BS-WEU replaces BS-SER!

Switch to the new BS-WEU-Serie already now!

The old BS-Series will no longer be available after the sale.

Availability: Out of stock SKU: BS-SER-O16-M16 BS-SER-O16-R16 BS-SER-O16-R16_3A BS-SER-O32-M32 BS-SER-O32-R32 BS-SER-O32-R32_3A BS-SER-O8-R8 BS-SER-O8-R8_3A Category:


Use our advantages

Lifetime
updates

Free soft- & hardware(firmware)-updates.
Enjoy our lifetime update service.

5 years
Delivery availability

We offer at least 5 years delivery availability for our products.
Our experience shows that it is even about 10 years.

Questions about the product? Product support

Do you have any technical or commercial questions about the product before you buy?
Please contact us in advance.

Customer-
modifications

Our products often serve as the basis for customer-specific solutions.
Just get in touch with us.

We are
always there for you!

Since its foundation in 2008, Dipl. Ing. Jürgen Siebert has been the managing director of DEDITEC GmbH. He will also be happy to advise you personally.

Product- & Service-Hotline: +49 (0) 22 32 / 50 40 8 – 40 Questions about the product or order: support@deditec.de

This BS-SER module is available in versions with 8/16/32 inputs and outputs. For the digital inputs AC optocouplers are used, while the digital outputs can be selected between relay 1A, relay 3A or MOSFET 2A. The module housing consists of a stable aluminum profile with DIN rail mounting.

  • Serial RS-232 interface
  • 8/16/32 Digital inputs: 15V – 30V AC/DC (optional 5V – 15V)
  • 8/16/32 Digital outputs: 1A, 2A or 3A
  • 16 bit counter (up to 100Hz) / flipflop per channel
  • Timeout protection function (configurable via software)
  • Robust aluminium housing (suitable for DIN rail mounting)

Digital inputs

With our optocoupler inputs, digital signal states can be recorded within a voltage range of 5V to 30V AC or DC. Input and output circuits are galvanically isolated from each other up to 2.5kV.

 

Digital In Input Filter

With our Digital-In modules, an input filter can be set in a time interval of 1ms…255ms to filter interference pulses.

This means that AC signals can also be detected cleanly.

 

Counter

Each input has a 16 bit counter that can count up to 65535 pulses. If the maximum counter value is exceeded, the counting process starts again from zero. By means of a software command, the current status of all input counters can be read from the module simultaneously.

 

Recording of status changes

Status changes that occur between the readout cycles are reliably detected by internal flip-flops and can be read out separately by software. In addition, such an event is signalled by a status LED. Resetting is done automatically after the flip-flops have been read out.


Digital outputs

Relay 1A

With the option “Relay outputs (1A)” reed relays with normally open (NO) function are used. They are suitable for smaller switching capacities of up to 1A and have a service life of well over 100 million switching cycles. The electrical isolation between input and output circuit is up to 1.5kV.

 

Timeout-protection-function

If communication with the DEDITEC module is interrupted in a timeout case, the timeout protection function takes effect. It can be set for each digital output whether it is to be “switched off”, “switched on” or left unchanged. Motors can thus be switched off in a timeout case, for example, and connected horns or other alarm transmitters can be switched on.

 

New timeout modes

3 different timeout modes: “normal”, “auto reactive” and “secure outputs” for different procedures in case of a timeout event.
In “secure outputs” timeout mode, access to the outputs is blocked after a timeout event, thus preventing further access to the outputs.
Unlocking must be done by an additional software command.

 

Relay 3A

With the option “Relay outputs (3A)” power relays with normally open (NO) function are used. They are suitable for switching capacities of up to 3A and have a service life of up to 10 million switching cycles. The electrical isolation between input and output circuit is up to 3kV.

 

MOSFET 2A

With the option “Mosfet outputs (2A)” P-Ch MOSFETs are used. They are suitable for switching capacities up to 2A DC and are practically wear-free.


LEDs

Each digital input and output has a separate LED that lights up when the signal state is active. Furthermore, the status of the operating voltage, the communication with the interface, error events or the occurrence of a timeout can be displayed.


Connectors

A screwless system from the manufacturer WAGO Kontakttechnik is used as the connector. The 1-wire female connectors are 100% protected against mismating and have an eject and locking mechanism. All conductor types up to 1.5mm² can be connected.


General

Power supply via external power supply unit + 7V to +24V DC (via two-pin pluggable screw terminal)
Power supply via USB port +5V / 500mA (This mode cannot be used with all BS-SER module variants due to the higher current consumption!)
LEDs • Operating voltage
• Interface activity
• ERROR
• Input status change
• Timout shutdown
• I/O Access
• One LED per I/O channel
DIP switches
• Setting the baud rate
• Activating the preferred mode
• Activating the serial text or register mode
Connectors • Type: Wago Kontakttechnik 713-1108/037-000
• Pluggable 16 pin female connector with locking mechanism
• 100 % malfunction protected
• 1-wire connection for all types of conductors up to 1.5mm²
DIN rail mounting TS 35
Operating temperature +10°C .. +50°C
Dimensions with 8 I/Os 105 mm x 102 mm x 74,5 mm (H x W x D)
Dimensions with 16 I/Os 105 mm x 135 mm x 74,5 mm (H x W x D)
Dimensions with 32 I/Os 105 mm x 230 mm x 74,5 mm (H x W x D)

RS-232-Interface

Interface • RS-232 with up to 115,200 Baud
• Connection via 9 pin D-Sub socket

Digital inputs

Optocoupler inputs • 15V to 30V DC/AC signal voltage (optional 5V – 15V DC/AC)
• Galvanic isolation between input and output circuit : up to 2.5kV AC for 1 minute
• Maximum input current: 14mA
Input filter • Default value 0ms
• Value range 0 (off),  1(ms)…255(ms)
Input counter • 16 bit counter per channel
• Maximum possible counting operations: 65535 / channel
• Reset to zero after memory overflow
• Internal counting logic up to 100Hz
• Programmable filter for input channels (flip-flop and counter):
• Minimum low or high pulse duration: 5ms…255ms
Input state flags (flip-flops) • Detects a change from low to high and high to low level
• Detects the input state change between two readout processes
• Input state flag is reset during readout

Digital outputs

Timeout-Protection-Function • Simple and uncomplicated setting of the timeout protection function possible via software
• Time-definable automatic activation of the timeout protection function in the
Timeout case (between 0.1 seconds and 6553 seconds)
• In the timeout case, digital outputs can be activated, deactivated or left unchanged
• 3 different timeout modes: “normal”, “auto reactive” and “secure outputs” for different procedures in case of a timeout event.
In “secure outputs” timeout mode, access to the outputs is blocked after a timeout event, thus preventing further access to the outputs.
Unlocking must be done by an additional software command.

Relay outputs type I *

Relay up to 1A • Typ: DIP05-1A72-12L
• Property: Normally open contact (NO)
• Max. switching voltage: 36V AC / DC
• Max. switching current: 0.5 A AC / DC
• Max. Transport current: 1A AC / DC
• Max. switching capacity: 10 W
• Galvanic isolation between contact and coil: 1.5 kV RMS /1 min
• Lifetime: up to 100 million switching cycles
* This relay type is only installed in variants with up to 8 I/Os

Relay outputs type II

Relay up to 1A • Typ: SIL05-1A72D
• Property: Normally open contact (NO)
• Max. switching voltage: 36V AC / DC
• Max. switching current: 0.5 A AC / DC
• Max. Transport current: 1A AC / DC
• Max. switching capacity: 10 W
• Galvanic isolation between contact and coil: 1.5 kV RMS /1 min
• Lifetime: up to 100 million switching cycles

Relay outputs type III

Relay up to 3A • Typ: PCN105D3MHZ
• Property: Normally open contact (NO)
• Max. switching voltage: 48V AC / DC
• Max. switching current: 3A AC / DC
• Max. Transport current 3A AC / DC
• Max. switching capacity: 90 W
• Galvanic isolation between contact and coil: 3kV RMS /1 min
• Mechanical life: up to 10 million switching cycles

 


MOSFET outputs

MOSFET to 2A • Typ: IRFR5505PBF
• P-Channel MOSFET
• Galvanic isolation for power supply from module: up to 2.5kV AC for 1 minute *
• Max. switching voltage: 48V DC
• Min. switching voltage: 2.8V DC
• Max. switching current: 2A DC
• Max. switching capacity: 60W DC
• Max. Total load: 12A per 8 outputs ** 

* No galvanic isolation for BS series modules.
** Applies only to outputs with common power supply. Not for BS series.

Additional information

Weight N/A
Number of digital inputs/outputs

, ,

Selection Type of outputs

, ,

Configuration

Configuration of the serial modules

Our serial modules of the RO-series and NET-series are able to handle the standards RS-232 and RS-485. At delivery the modules are always designed for RS-232 operation, but can be reconfigured to RS-485 by changing the jumper positions on the module. For further information please refer to the manual of the respective product.

 


Setting the RS-232 / RS-485 parameters via DIP switches

By means of DIP switches the following parameters can be set:

  • Module address (only for RS-485)
  • Baud rate
  • Preferred mode (115k Baud, module address = deactivated, echo = off)
  • Text Mode / Register Mode

More details about the control and some programming examples can be found in the programming section.

General Handling

DapiOpenModule
This function opens a particular module.

DapiOpenModule

 

Description

This function opens a specific module

 

Definition

ULONG DapiOpenModule(ULONG moduleID, ULONG nr);

 

Parameters

moduleID=Specifies the module to be opened (see delib.h)
nr=Specifies which one (in case of several modules) should be opened.
nr=0 -> 1st module
nr=1 -> 2nd module

 

Return-Value

handle=Corresponding handle for the module
handle=0 -> module was not found

 

Comment

The handle returned by this function is needed to identify the module for all other functions.

 

Programming example

// Open USB module
handle = DapiOpenModule(RO_USB1, 0);
printf(“handle = %x\n”, handle);
if (handle==0)
{
// USB module was not found
printf(“Modul konnte nicht geöffnet werden\n”);
return;
}

DapiCloseModule
This command closes an opened module.

DapiCloseModule

 

Description

This command closes an open module.

 

Definition

ULONG DapiCloseModule(ULONG handle);

 

Parameters

handle=This is the handle of an open module

 

Return-Value

None

 

Programming example

// Close module
DapiCloseModule(handle);

DapiGetLastError
This function returns the last registered error. If an error has occurred, it must be deleted with DapiClearLastError(), otherwise any call of DapiGetLastError() will return the "old" error. If multiple modules are used, the use of DapiGetLastErrorByHandle() is recommended.

DapiGetLastError

 

Description

This function returns the last detected error. If an error occurred, it must be cleared with DapiClearLastError(), otherwise any call to DapiGetLastError() will return the “old” error.
If more than one module should be used, it is recommended to use DapiGetLastLastErrorByHandle().

 

Definition

ULONG DapiGetLastError(void);

 

Parameters

None

 

Return-Value

Error Code
0=no error. (see delib_error_codes.h)

 

Programming example

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);

DapiClearLastError();

return TRUE;
}

return FALSE;
}

DapiGetLastErrorByHandle
This function returns the last registered error of a particular module (handle). If an error has occurred, it must be deleted with DapiClearLastErrorByHandle(), otherwise any call of DapiGetLastErrorByHandle() will return the "old" error.

DapiGetLastErrorByHandle

 

Description

This function returns the last detected error of a specific module (handle). If an error occurred, it must be cleared with DapiClearLastErrorByHandle(), otherwise any call to DapiGetLastErrorByHandle() will return the “old” error.

 

Definition

ULONG DapiGetLastErrorByHandle(ULONG handle);

 

Parameters

handle=This is the handle of an open module

 

Return-Value

Error Code
0=no error. (see delib_error_codes.h)

 

Programming example

BOOL IsError(ULONG handle)
{
unsigned long error_code = DapiGetLastErrorByHandle(handle);

if (error_code != DAPI_ERR_NONE)
{
printf(“Error detected on handle 0x%x – Error Code = 0x%x\n”, handle, error_code);

DapiClearLastErrorByHandle(handle);

return TRUE;
}

return FALSE;
}

DapiGetLastErrorText
This function reads the text of the last registered error. If an error has occurred, it must be cleared with DapiClearLastError(), otherwise every call of DapiGetLastErrorText() returns the "old" error. Definition

DapiGetLastErrorText

 

Description

This function reads the text of the last detected error. If an error occurred, it must be cleared with DapiClearLastError(), otherwise any call to DapiGetLastErrorText() will return the “old” error.

 

Definition

ULONG DapiGetLastErrorText(unsigned char * msg, unsigned long msg_length);

 

Parameters

msg = Buffer for the text to be received
msg_length = Length of the text buffer

 

Programming example

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);

DapiClearLastError();

return TRUE;
}

return FALSE;
}

DapiClearLastError
This function deletes the last error registered with DapiGetLastError().

DapiClearLastError

Description

This function deletes the last error registered with DapiGetLastError().

 

Definition

void DapiGetLastError(void);

 

Parameters

None

 

Return value

None

 

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);

DapiClearLastError();

return TRUE;
}

return FALSE;
}

DapiClearLastErrorByHandle
This function deletes the last error of a particular module (handle), which was registered with DapiGetLastErrorByHandle().

DapiClearLastErrorByHandle

 

Description

This function deletes the last error of a particular module (handle), which was registered with DapiGetLastErrorByHandle().

 

Definition

void DapiClearLastErrorByHandle(ULONG handle);

 

Parameters

handle=This is the handle of an opened module.

 

Return value

None

 

Example program

BOOL IsError(ULONG handle)
{
unsigned long error_code = DapiGetLastErrorByHandle(handle);

if (error_code != DAPI_ERR_NONE)
{
printf(“Error detected on handle 0x%x – Error Code = 0x%x\n”, handle, error_code);

DapiClearLastErrorByHandle(handle);

return TRUE;
}

return FALSE;
}

DapiGetDELIBVersion
This function returns the installed DELIB version.

DapiGetDELIBVersion

 

Description

This function returns the installed DELIB version.

 

Definition

ULONG DapiGetDELIBVersion(ULONG mode, ULONG par);

 

Parameters

mode=Mode with which the version is read (must always be 0).
par=This parameter is not defined (must always be 0).

 

Return-Value

version=Version number of the installed DELIB version [hex]

 

Programming example

version = DapiGetDELIBVersion(0, 0);
//With installed version 1.32 version = 132(hex)

DapiOpenModuleEx
This function opens a specific module with ethernet interface.The particularity of this command is,that parameters like IP-address, portnumber and the duration of the timeout can be specified. The opening of the module is independent of the DELIB Configuration Utility settings.

DapiOpenModuleEx

 

Description

This function specifically opens a module with an Ethernet interface. The parameters IP address, port number and the duration of the timeout can be determined.
The module is opened independently of the settings made in the DELIB Configuration Utility.

 

Definition

ULONG DapiOpenModuleEx(ULONG moduleID, ULONG nr, unsigned char* exbuffer, 0);

 

Parameters

moduleID = Specifies the module to be opened (see delib.h)
nr = Specifies which one (in case of several modules) is to be opened
nr = 0 -> 1st module
nr = 1 -> 2nd module
exbuffer = buffer for IP address, port number and duration of the timeout

 

Return-Value

handle = Corresponding handle for the module
handle = 0 -> module was not found

 

Comment

The handle returned by this function is required to identify the module for all other functions.
This command is supported by all modules with Ethernet interface.

 

Programming example

// Open ETH-Module with parameter

DAPI_OPENMODULEEX_STRUCT open_buffer;

strcpy((char*) open_buffer.address, “192.168.1.10”);
open_buffer.portno = 0;
open_buffer.timeout = 5000;

handle = DapiOpenModuleEx(RO_ETH, 0, (unsigned char*) &open_buffer, 0);
printf(“Module handle = %x\n”, handle);

Digital input functions

DapiDIGet1
This command reads a single digital input.

DapiDIGet1

 

Description

This command reads a single digital input.

 

Definition

ULONG DapiDIGet1(ULONG handle, ULONG ch);

 

Parameters

handle=This is the handle of an open module
ch= Specifies the number of the input to be read (0, 1, 2, 3, .. )

 

Return-Value

Status of the input (0/1)

 

Requirements

The following SW feature bits must be supported by the module:

DAPI_SW_FEATURE_BIT_CFG_DI

The following conditions for the transfer parameters must be met:

maxCh = DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_GET_MODULE_CONFIG, DAPI_SPECIAL_GET_MODULE_CONFIG_PAR_DI, 0, 0)
maxCh > ch

DapiDIGet8
This command reads 8 digital inputs simultaneously.

DapiDIGet8

 

Description

This command reads 8 digital inputs simultaneously.

 

Definition

ULONG DapiDIGet8(ULONG handle, ULONG ch);

 

Parameters

handle=This is the handle of an open module
ch= Specifies the number of the input from which the read is to start (0, 8, 16, 24, .. )

 

Return-Value

Status of the read inputs

 

Requirements

The following SW feature bits must be supported by the module:

DAPI_SW_FEATURE_BIT_CFG_DI

The following conditions for the transfer parameters must be met:

maxCh = DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_GET_MODULE_CONFIG, DAPI_SPECIAL_GET_MODULE_CONFIG_PAR_DI, 0, 0)
maxCh > ch ch must be 0, 8, 16, …

DapiDIGet16
This command reads 16 digital inputs simultaneously.

DapiDIGet16

 

Description

This command reads 16 digital inputs simultaneously.

 

Definition

ULONG DapiDIGet16(ULONG handle, ULONG ch);

 

Parameters

handle=This is the handle of an open module
ch= Specifies the number of the input from which the read is to start (0, 16, 32, …)

 

Return-Value

Zustand der gelesen Eingänge

 

Requirements

The following SW feature bits must be supported by the module:

DAPI_SW_FEATURE_BIT_CFG_DI

The following conditions for the transfer parameters must be met:

maxCh = DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_GET_MODULE_CONFIG, DAPI_SPECIAL_GET_MODULE_CONFIG_PAR_DI, 0, 0)
maxCh > ch ch must be 0, 16, 32, …

DapiDIGet32
This command reads 32 digital inputs simultaneously.

DapiDIGet32

 

Description

This command reads 32 digital inputs simultaneously.

 

Definition

ULONG DapiDIGet32(ULONG handle, ULONG ch);

 

Parameters

handle=This is the handle of an open module
ch= Specifies the number of the input from which the read is to start (0, 32, 64, ..)

 

Return-Value

Status of the read inputs

 

Requirements

The following SW feature bits must be supported by the module:

DAPI_SW_FEATURE_BIT_CFG_DI

The following conditions for the transfer parameters must be met:

maxCh = DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_GET_MODULE_CONFIG, DAPI_SPECIAL_GET_MODULE_CONFIG_PAR_DI, 0, 0)
maxCh > ch ch must be 0, 32, 64, …

 

Programming example

unsigned long data;
// —————————————————-
// Read a value from the inputs (input 1-31)
data = (unsigned long) DapiDIGet32(handle, 0);
// Chan start = 0
printf(“Input 0-31 : 0x%x\n”, data);
printf(“key for further\n”);
getch();
// —————————————————-
// Read a value from the inputs (input 32-64)
data = (unsigned long) DapiDIGet32(handle, 32);
// Chan Start = 32
printf(“Input 32-64 : 0x%x\n”, data);
printf(“key for further\n”);
getch();

DapiDIGet64
This command reads 64 digital inputs simultaneously.

DapiDIGet64

 

Description

This command reads 64 digital inputs simultaneously.

 

Definition

ULONGLONG DapiDIGet64(ULONG handle, ULONG ch);

 

Parameters

handle=This is the handle of an open module
ch= Specifies the number of the input from which the read is to start (0, 64, ..)

 

Return-Value

Status of the read inputs

 

Requirements

The following SW feature bits must be supported by the module:

DAPI_SW_FEATURE_BIT_CFG_DI

The following conditions for the transfer parameters must be met:

maxCh = DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_GET_MODULE_CONFIG, DAPI_SPECIAL_GET_MODULE_CONFIG_PAR_DI, 0, 0)
maxCh > ch ch must be 0 or 64

DapiDIGetFF32
This command reads the flip-flops from the inputs and resets them. (Input state change).

DapiDIGetFF32

 

Description

This command reads the flip-flops of the inputs and resets them.
(input state change)

 

Definition

ULONG DapiDIGetFF32(ULONG handle, ULONG ch);

 

Parameters

handle=This is the handle of an open module
ch= Specifies the number of the input from which the read is to start (0, 32, 64, ..)

 

Return-Value

Status of 32 input status changes

 

Requirements

The following SW feature bits must be supported by the module:

DAPI_SW_FEATURE_BIT_CFG_DI_FF

The following conditions for the transfer parameters must be met:

maxCh = DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_GET_MODULE_CONFIG, DAPI_SPECIAL_GET_MODULE_CONFIG_PAR_DI_FF, 0, 0)
maxCh > ch ch must be 0, 32, 64, …

Digital output functions

DapiDOSet1
This is the command to set a single output.

DapiDOSet1

 

Description

This command sets a single output.

 

Definition

void DapiDOSet1(ULONG handle, ULONG ch, ULONG data);

 

Parameters

handle=This is the handle of an open module
ch= Specifies the number of the output to be set (0 .. )
data= Specifies the data value to be written (0 / 1)

 

Return-Value

None

 

Requirements

The following SW feature bits must be supported by the module:

 

DAPI_SW_FEATURE_BIT_CFG_DO

The following conditions for the transfer parameters must be met:

maxCh = DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_GET_MODULE_CONFIG, DAPI_SPECIAL_GET_MODULE_CONFIG_PAR_DO, 0, 0)
maxCh > ch

DapiDOSet8
This command sets 8 digital outputs simultaneously.

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 open module
ch= Specifies the number of the output from which writing is to start (0, 8, 16, 24, 32, ..)
data=Specifies the data values to be written

 

Return-Value

None

DapiDOSet16
This command sets 16 digital outputs simultaneously.

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 open module
ch= Specifies the number of the output from which writing is to start (0, 16, 32, ..)
data=Specifies the data values to be written

 

Return-Value

None

DapiDOSet32
This command sets 32 digital outputs simultaneously.

DapiDOSet32

 

Description

This command sets 32 digital outputs simultaneously.

 

Definition

void DapiDOSet32(ULONG handle, ULONG ch, ULONG data);

 

Parameters

handle=This is the handle of an open module
ch= Specifies the number of the output from which writing is to start (0, 32, 64, ..)
data=Specifies the data values to be written

 

Return-Value

None

 

Programming example

// Write a value to the outputs
data = 0x0000ff00; // outputs 9-16 are set to 1
DapiDOSet32(handle, 0, data); // Chan Start = 0
printf(“Write to outputs data=0x%x\n”, data);
printf(“key for further\n”);
getch();
// —————————————————-
// Write a value to the outputs
data = 0x80000000; // Output 32 is set to 1
DapiDOSet32(handle, 0, data); // Chan Start = 0
printf(“Write to outputs data=0x%x\n”, data);
printf(“key for further\n”);
getch();
// —————————————————-
// Write a value to the outputs
data = 0x80000000; // Output 64 is set to 1
DapiDOSet32(handle, 32, data); // Chan Start = 32
printf(“Write to outputs data=0x%x\n”, data);
printf(“key for further\n”);
getch();

DapiDOSet64
This command is to set 64 digital outputs.

DapiDOSet64

 

Description

This command sets 64 digital outputs simultaneously.

 

Definition

void DapiDOSet64(ULONG handle, ULONG ch, ULONGLONG data);

 

Parameters

handle=This is the handle of an open module
ch= Specifies the number of the output from which writing is to start (0, 64, ..)
data=Specifies the data values to be written

 

Return-Value

None

DapiDOClrBit32
With this command you can change the states of outputs to 0 without changing the states of the neighboring outputs.

DapiDOClrBit32

 

Description

This command can be used to switch outputs selectively to 0 without changing the states of adjacent outputs.

 

Definition

void DapiDOClrBit32(uint handle, uint ch, uint data);

 

Parameters

handle = This is the handle of an open module
ch = Specifies the number of the output from which writing is to start
data = Specifies the data value to be written (up to 32 bits)

 

Return-Value

None

 

Comment

Only the bits with a value of 1 in the data parameter are considered by the command.

 

Programming example

data = 0x1; // Output 0 would be changed to 0. The states of outputs 1-31 won’t be changed
DapiDOSetBit32(handle, 0, data);

data = 0xf; // Outputs 0-3 would be changed to 0. The states of outputs 4-31 won’t be changed
DapiDOSetBit32(handle, 0, data);

data = 0xff; // Outputs 0-7 would be changed to 0. The states of outputs 8-31 won’t be changed
DapiDOSetBit32(handle, 0, data);

data = 0xff000000; // Outputs 23-31 would be changed to 0. The states of outputs 0-21 won’t be changed
DapiDOSetBit32(handle, 0, data);

DapiDOSet1_WithTimer
This function sets a digital output (ch) to a value (data - 0 or 1) for a specified time in msec.

DapiDOSet1_WithTimer

 

Description

This function sets a digital output (ch) to a value (data – 0 or 1) for a certain time in ms.

 

Definition

void DapiDOSet1_WithTimer(ULONG handle, ULONG ch, ULONG data, ULONG time_ms);

 

Parameters

handle=This is the handle of an open module
ch= Specifies the number of the output to be set (0 .. )
data= Specifies the data value to be written (0 / 1)
time_ms=Specifies the time in which the output is set [ms].

 

Return-Value

None

 

Comment

This command is supported by all output modules of the NET series as well as by our RO-O8-R8 module.
This command loses its validity if it is overwritten with other values.
If you want to deactivate the command, it must be overwritten with time_ms=0.

 

Programming example

DapiDOSet1_WithTimer(handle, 2, 1, 1000);
//Setting channel 2 for 1000msec to 1

DapiDOSetBit32
With this command you can change the states of outputs to 1 without changing the states of the neighboring outputs.

DapiDOSetBit32

 

Description

This command can be used to switch outputs selectively to 1 without changing the states of adjacent outputs.

 

Definition

void DapiDOSetBit32(uint handle, uint ch, uint data);

 

Parameters

handle = This is the handle of an open module
ch = Specifies the number of the output from which writing is to start
data = Specifies the data value to be written (up to 32 bits)

 

Return-Value

None

 

Comment

Only the bits with a value of 1 in the data parameter are considered by the command.

 

Programming example

data = 0x1; // Output 0 would be changed to 1. The states of outputs 1-31 won’t be changed
DapiDOSetBit32(handle, 0, data);

data = 0xf; // Outputs 0-3 would be changed to 1. The states of outputs 4-31 won’t be changed
DapiDOSetBit32(handle, 0, data);

data = 0xff; // Outputs 0-7 would be changed to 1. The states of outputs 8-31 won’t be changed
DapiDOSetBit32(handle, 0, data);

data = 0xff000000; // Outputs 23-31 would be changed to 1. The states of outputs 0-21 won’t be changed
DapiDOSetBit32(handle, 0, data);

DapiDOReadback32
This command reads back the 32 digital outputs.

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 open module
ch= Specifies the number of the output from which the read back is to be performed (0, 32, 64, ..)

 

Return-Value

Status of 32 outputs.

DapiDOReadback64
This command reads the current PWM frequency of the module

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 open module
ch= Specifies the number of the output from which the read back is to be performed (0, 32, 64, ..)

 

Return-Value

Status of 32 outputs.

timeout protection function

DapiSpecialCommand - DapiSpecialCMDTimeout
This command is used to set the timeout protection function

DapiSpecialCommand-DapiSpecialCMDTimeout

 

Description
This command is used to set the timeout protection function

There are three different timeout methods since 2021.

 

“normal” Timeout
This is the timeout that our modules have had since 2009.
Procedure for the timeout command:
The timeout is activated by command.
If then a so-called timeout event takes place (pause between two accesses to the module is greater than the allowed timeout time) the following happens:
– All outputs are switched off.
– The timeout status goes to “2”.
– The timeout LED turns on (for modules that have such a status).
Further accesses to the outputs are then still possible, but the timeout is no longer active. Not again until it has been reactivated.

 

“auto reactivate” Timeout
This is a timeout mode implemented since 2021 that automatically re-enables the timeout after the timeout event occurs.
Procedure for the timeout command:
The timeout is activated by command.
If then a so-called timeout event occurs (pause between two accesses to the module is greater than the allowed timeout time) the following happens:
– All outputs are switched off.
– The timeout status goes to “4”.
– The timeout LED turns on (for modules that have such a status).
Further accesses to the outputs are then still possible. AND the timeout is still active. If the timeout time is exceeded again, the outputs are switched off again.

 

“secure outputs” Timeout
This is a timeout mode implemented since 2021 that prevents write access to the outputs after the timeout event has occurred.This ensures that the software must first restore the outputs to a “safe” state because the module’s timeout mechanism has changed the outputs to predefined values.
Procedure for the timeout command:
The timeout is activated by command.
If then a so-called timeout event takes place(pause between two accesses to the module is greater than the allowed timeout time) the following happens:
– All outputs are switched off.
– The timeout status goes to “6”.
– The timeout LED turns on (for modules that have such a status).
Further access to the outputs is NOT possible. Only after reactivating the timeout or deactivating the timeout the outputs can be written.

 

Definition
DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_TIMEOUT, cmd, par1, par2);

 

Parameter
handle = This is the handle of an open module
cmd = Function to be executed
par1 = Value that is passed to the function
par2 = Value that is passed to the function

DapiSpecialCommand - DapiSpecialTimeoutSetValueSec
This command is used to set the timeout time

DapiSpecialCommand – DapiSpecialTimeoutSetValueSec

 

Description
This command is used to set the timeout time.

 

Definition
DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_TIMEOUT, cmd, par1, par2);

 

Parameter
cmd = DAPI_SPECIAL_TIMEOUT_SET_VALUE_SEC
par1 = seconds [s]
par2 = milliseconds [100ms] (value 6 = 600ms)

 

Comment

The permissible value range of the time specification is between 0.1 seconds and 6553 seconds

 

Programming example

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_TIMEOUT,
DAPI_SPECIAL_TIMEOUT_SET_VALUE_SEC, 3, 7);
//The timeout time is set to 3,7sec.

DapiSpecialCommand - DapiSpecialTimeoutActivate
This command activates the "normal" timeout

DapiSpecialCommand – DapiSpecialTimeoutActivate

 

Description

This command activates the “normal” timeout.
After the timeout event,.
– ..all outputs are switched off
– ..the timeout status is set to “2
– ..the timeout LED is switched on (for modules that have such a status)
Further accesses to the outputs are then still possible, but the timeout is no longer active.
Not again until it has been reactivated.

 

Definition

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_TIMEOUT, cmd, 0, 0);

 

Parameter
cmd = DAPI_SPECIAL_TIMEOUT_ACTIVATE

 

Programming example

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_TIMEOUT,
DAPI_SPECIAL_TIMEOUT_ACTIVATE, 0, 0);
//Activates the “normal” timeout.

DapiSpecialCommand - DapiSpecialTimeoutActivateAutoReactivate
This command activates the "auto reactivate" timeout

DapiSpecialCommand – DapiSpecialTimeoutActivateAutoReactivate

 

Description

This command activates the “auto reactivate” timeout.
In this mode, the timeout is automatically reactivated after the timeout event.
After the timeout event.
– ..all outputs are switched off
– ..the timeout status is set to “4
– ..the timeout LED is switched on (for modules that have such a status)
Further accesses to the outputs are then still possible AND the timeout is still active.
If the timeout time is exceeded again, the outputs are switched off again.

 

Definition

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_TIMEOUT, cmd, 0, 0);

 

Parameter
cmd = DAPI_SPECIAL_TIMEOUT_ACTIVATE_AUTO_REACTIVATE

 

Programming example

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_TIMEOUT,
DAPI_SPECIAL_TIMEOUT_ACTIVATE_AUTO_REACTIVATE, 0, 0);
//The “auto reactivate” timeout is activated.

DapiSpecialCommand - DapiSpecialTimeoutActivateSecureOutputs
This command activates the "secure outputs" timeout

DapiSpecialCommand – DapiSpecialTimeoutActivateSecureOutputs

 

Description

This command activates the “secure outputs” timeout.
In this mode, write access to the outputs is prevented after a timeout event.
This ensures that the software must first restore the outputs to a “secure” state,
because the timeout mechanism of the module has changed the outputs to predefined values.
After the timeout event.
– ..all outputs are switched off
– ..the timeout status is set to “6
– ..the timeout LED is switched on (for modules that have such a status)
Further accesses to the outputs are NOT possible. Only after reactivating the
timeout or deactivating the timeout the outputs can be written.

 

Definition

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_TIMEOUT, cmd, 0, 0);

 

Parameter
cmd = DAPI_SPECIAL_TIMEOUT_ACTIVATE_SECURE_OUTPUTS

 

Programming example

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_TIMEOUT,
DAPI_SPECIAL_TIMEOUT_ACTIVATE_SECURE_OUTPUTS, 0, 0);
//The “secure outputs” timeout is activated.

DapiSpecialCommand - DapiSpecialTimeoutDeactivate
This command deactivates the timeout

DapiSpecialCommand – DapiSpecialTimeoutDeactivate

 

Description

This command disables the timeout.

 

Definition

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_TIMEOUT, cmd, 0, 0);

 

Parameter

cmd = DAPI_SPECIAL_TIMEOUT_DEACTIVATE

 

Programming example

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_TIMEOUT,
DAPI_SPECIAL_TIMEOUT_DEACTIVATE, 0, 0);
//Deactivates the timeout

DapiSpecialCommand - DapiSpecialTimeoutGetStatus
This command is used to read out the timeout status

DapiSpecialCommand – DapiSpecialTimeoutGetStatus

 

Description

This command is used to read the timeout status.

 

Definition

ULONG DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_TIMEOUT, DAPI_SPECIAL_TIMEOUT_GET_STATUS, 0, 0);

 

Parameter

cmd = DAPI_SPECIAL_TIMEOUT_GET_STATUS

 

Return-Value

Return = 0 (timeout is deactivated)

 

Values for the “normal” timeout
Return = 1 (Timeout “normal” is activated)
Return = 2 (Timeout “normal” has occurred)

 

Values for the “auto reactivate” timeout
Return = 3 (Timeout “auto reactivate” is activated)
Return = 4 (Timeout “auto reactivate” has occurred one or more times)

 

Values for the “secure” timeout
Return = 5 (Timeout “secure” is activated)
Return = 6 (Timout “secure” has taken place. In this status, writing to the outputs is prevented).

 

Programming example

unsigned long status = DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_TIMEOUT,
DAPI_SPECIAL_TIMEOUT_GET_STATUS, 0, 0);
printf(“Status = %ul\n”, status);
//Query timeout status with output

DapiSpecialCommand - DapiSpecialTimeoutDoValueMaskWRSet32
This command activates relays in case of a timeout

DapiSpecialCommand – DapiSpecialTimeoutDoValueMaskWRSet32

 

Description

This command determines the outputs to be set in case of a timeout.

 

Definition

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_TIMEOUT, cmd, ch, par2);

 

Parameter

cmd = DAPI_SPECIAL_TIMEOUT_DO_VALUE_MASK_WR_SET32
ch = Specifies the number of the output from which to write (0, 32, 64, ..)
par2 = [32 Bit] Specifies the outputs which are to be activated in case of a timeout.

 

Programming example

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_TIMEOUT,
DAPI_SPECIAL_TIMEOUT_DO_VALUE_MASK_WR_SET32, 0, 0xff);
//The first 8 relays are switched on in the timeout case.

DapiSpecialCommand - DapiSpecialTimeoutDoValueMaskRDSet32
This command is used to read out the passed values

DapiSpecialCommand – DapiSpecialTimeoutDoValueMaskRDSet32

 

Description

This command is used to read out the passed values

 

Definition

ULONG DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_TIMEOUT, cmd, 0, 0);

 

Parameter

cmd = DAPI_SPECIAL_TIMEOUT_DO_VALUE_MASK_RD_SET32

 

Return-Value

[32 bit] Value passed to the SET command

 

Programming example

unsigned long value = DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_TIMEOUT,
DAPI_SPECIAL_TIMEOUT_DO_VALUE_MASK_RD_SET32, 0, 0);
printf(“%0x\n”, value);
//The value that was passed to the SET command is read out and displayed

DapiSpecialCommand - DapiSpecialTimeoutDoValueMaskWRClr32
This command deactivates relays in case of a timeout

DapiSpecialCommand – DapiSpecialTimeoutDoValueMaskWRClr32

 

Description

This command determines the outputs that are to be switched off in the event of a timeout.

 

Definition

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_TIMEOUT, cmd, ch, par2);

 

Parameter

cmd = DAPI_SPECIAL_TIMEOUT_DO_VALUE_MASK_WR_CLR32
ch = Specifies the number of the output from which to write (0, 32, 64, ..)
par2 = [32 Bit] Specifies the outputs which are to be deactivated in the event of a timeout

 

Programming example

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_TIMEOUT,
DAPI_SPECIAL_TIMEOUT_DO_VALUE_MASK_WR_CLR32, 0, 0xff);
//The first 8 relays are switechd off in the timeout case

DapiSpecialCommand - DapiSpecialTimeoutDoValueMaskRDClr32
This command is used to read out the passed values

DapiSpecialCommand – DapiSpecialTimeoutDoValueMaskRDClr32

 

Description

This command is used to read out the passed values.

 

Definition

LONG DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_TIMEOUT, cmd, 0, 0);

 

Parameter

cmd = DAPI_SPECIAL_TIMEOUT_DO_VALUE_MASK_RD_CLR32

 

Return-Value

[32 Bit]Value that is passed to the CLR command

 

Programming example

unsigned long value = DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_TIMEOUT,
DAPI_SPECIAL_TIMEOUT_DO_VALUE_MASK_RD_CLR32, 0, 0);
printf(“%0x\n”, value);
//The value that was passed to the CLR command is read out and displayed

DapiSpecialCommand - DapiSpecialTimeoutDoValueLoadDefault
Setzt die SET- und CLR-Werte auf den Ursprungswert zurück

DapiSpecialCommand – DapiSpecialTimeoutDoValueLoadDefault

 

Description

Resets the SET and CLR values to the default value.
(SET value = 0, CLR value = FFFFFFFF)

 

Definition

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_TIMEOUT, cmd, 0, 0);

 

Parameter

cmd = DAPI_SPECIAL_TIMEOUT_DO_VALUE_LOAD_DEFAULT

 

Programming example

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_TIMEOUT,
DAPI_SPECIAL_TIMEOUT_DO_VALUE_LOAD_DEFAULT, 0, 0);
//SET and CRL values are set to the default value

Software FIFO-functions

DapiSpecialCommand - DapiSpecialCMDSWFifo
This command is used to set the software FIFO of the NET-Modules

DapiSpecialCommand-DapiSpecialCMDSWFifo

 

Description

This command is used to set the software FIFO.
DAPI_SPECIAL_CMD_SW_FIFO commands only work with the NET series.

 

Definition

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SW_FIFO, cmd, fifo_instance, par2);

 

Parameters

handle = This is the handle of an open module
cmd = function to be executed
fifo_instance = Specifies the instance of the software FIFO. So far there is only instance 0
par2 = value that is passed to the function

Remark

Always define the submodule first with the DapiSpecialSWFifoSetSubmodule command!

DapiSpecialCommand - DapiSpecialSWFifoSetSubmodule
This command specifies to which submodule the data of the software FIFO are transferred

DapiSpecialCommand-DapiSpecialSWFifoSetSubmodule

 

Description

This command specifies to which submodule the data of the software FIFO are transferred.

 

Definition

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SW_FIFO, cmd, fifo_instance, par2);

 

Parameters

cmd = DAPI_SPECIAL_SW_FIFO_SET_SUBMODULE
fifo_instance = Specifies the instance of the software FIFO
par2 = indicates the number of the submodule (0, 1, 2, 3, …)

 

Programming example

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SW_FIFO,
DAPI_SPECIAL_SW_FIFO_SET_SUBMODULE, fifo_instance, 2);
//The software FIFO transfers the data to submodule 2.

DapiSpecialCommand - DapiSpecialSWFifoGetSubmodule
This command returns the number of the submodule to which the data is transferred

DapiSpecialCommand – DapiSpecialSWFifoGetSubmodule

 

Description

This command returns the number of the submodule to which the data is transferred.

 

Definition

ULONG DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SW_FIFO, cmd, fifo_instance, 0);

 

Parameters

cmd = DAPI_SPECIAL_SW_FIFO_GET_SUBMODULE
fifo_instance = Specifies the instance of the software FIFO

 

Return value

Number of the submodule (0, 1, 2, 3, …)

 

Programming example

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SW_FIFO,
DAPI_SPECIAL_SW_FIFO_SET_SUBMODULE, fifo_instance, 2);
//The software FIFO transfers the data to submodule 2.

DapiSpecialCommand - DapiSpecialSWFifoActivate
This command activates the Fifo data transfer within the NET modules.

DapiSpecialCommand-DapiSpecialSWFifoActivate

 

Description

This command activates the Fifo data transfer within the NET modules.

 

Definition

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SW_FIFO, cmd, fifo_instance, 0);

 

Parameters

cmd = DAPI_SPECIAL_SW_FIFO_ACTIVATE
fifo_instance = Specifies the instance of the software FIFO

 

Programming example

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SW_FIFO,
DAPI_SPECIAL_SW_FIFO_ACTIVATE, fifo_instance, 0);
//The automatic output of the D/A converter is activated.

DapiSpecialCommand - DapiSpecialSWFifoDeactivate
This command deactivates the Fifo data transfer within the NET modules

DapiSpecialCommand-DapiSpecialSWFifoDeactivate

 

Description

This command deactivates the Fifo data transfer within the NET modules.

 

Definition

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SW_FIFO, cmd, fifo_instance, 0);

 

Parameters

cmd = DAPI_SPECIAL_SW_FIFO_DEACTIVATE
fifo_instance = Specifies the instance of the software FIFO

 

Programming example

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SW_FIFO,
DAPI_SPECIAL_SW_FIFO_DEACTIVATE, fifo_instance, 0);
//The automatic output of the D/A converter is deactivated.

DapiSpecialCommand - DapiSpecialSWFifoGetActivity
This command gets the status of the FIFO transmission to the D/A converter (whether active or inactive)

DapiSpecialCommand – DapiSpecialSWFifoGetActivity

 

Description

This command gets the status of the FIFO transmission to the D/A converter (whether active or inactive).

 

Definition

ULONG DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SW_FIFO, cmd, fifo_instance, 0);

 

Parameters

cmd = DAPI_SPECIAL_SW_FIFO_GET_ACTIVITY
fifo_instance = Specifies the instance of the software FIFO

 

Return value

Return = 0 (transmission is deactivated)
Return = 1 (transmission is activated)

 

Programming example

unsigned long ret = DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SW_FIFO,
DAPI_SPECIAL_SW_FIFO_GET_ACTIVITY, fifo_instance, 0);
printf(“Status = %lu\n”, ret);
//transfer status is retrieved

DapiSpecialCommand - DapiSpecialSWFifoInitAndClear
This command deletes existing data from the software FIFO memory and returns the FIFO mechanism to its original state

DapiSpecialCommand – DapiSpecialSWFifoInitAndClear

 

Description

This command deletes existing data from the software FIFO memory and returns the FIFO mechanism to its original state.

 

Definition

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SW_FIFO, cmd, fifo_instance, 0);

 

Parameters

cmd = DAPI_SPECIAL_SW_FIFO_INIT_AND_CLEAR
fifo_instance = Specifies the instance of the software FIFO

 

Programming example

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SW_FIFO,
DAPI_SPECIAL_SW_FIFO_INIT_AND_CLEAR, fifo_instance, 0);
//existing data is deleted from the FIFO memory.

DapiSpecialCommand - DapiSpecialSWFifoIOActivate
This command activates the FIFO I/O input/output.

DapiSpecialCommand – DapiSpecialSWFifoIOActivate

 

Description

This command activates the FIFO I/O input/output.

 

Definition

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SW_FIFO, cmd, fifo_instance, 0);

 

Parameters

cmd = DAPI_SPECIAL_SW_FIFO_IO_ACTIVATE
fifo_instance = Gibt die Instanz des Software FIFO an

 

Programming example

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SW_FIFO,
DAPI_SPECIAL_SW_FIFO_IO_ACTIVATE, fifo_instance, 0);
//The automatic output of the FIFO to the module is activated.

DapiSpecialCommand - DapiSpecialSWFifoIODeactivate
This command disables the FIFO I/O input/output.

DapiSpecialCommand – DapiSpecialSWFifoIODeactivate

 

Description

This command disables the FIFO I/O input/output.

 

Definition

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SW_FIFO, cmd, fifo_instance, 0);

 

Parameters

cmd = DAPI_SPECIAL_SW_FIFO_IO_DEACTIVATE
fifo_instance = Gibt die Instanz des Software FIFO an

 

Programming example

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SW_FIFO,
DAPI_SPECIAL_SW_FIFO_IO_DEACTIVATE, fifo_instance, 0);
//The automatic output of the FIFO to the module is deactivated.

DapiSpecialCommand - DapiSpecialSWFifoSetChannel
This command specifies the A/D channels to which the FIFO data is to be transferred, specifying the start and end channels

DapiSpecialCommand – DapiSpecialSWFifoSetChannel

 

Description

This command specifies the A/D channels to which the FIFO data is to be transferred, specifying the start and end channels.

 

Definition

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SW_FIFO, cmd, fifo_instance, ch);

 

Parameters

cmd = DAPI_SPECIAL_SW_FIFO_SET_CHANNEL
fifo_instance = Specifies the instance of the software FIFO
ch = specification of the start and end channel

 

Programming example

unsigned long ch_start = 0; //Start with D/A Channel 0
unsigned long ch_end = 1; //End with D/A Channel 1

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SW_FIFO,
DAPI_SPECIAL_SW_FIFO_SET_Channel, fifo_instance,
((ch_end << 8) & 0xff00) | (ch_start & 0xff);
//The start and end channel is defined

DapiSpecialCommand - DapiSpecialSWFifoGetChannel
This command shows the D/A channels to which the data is transferred

DapiSpecialCommand-DapiSpecialSWFifoGetChannel

 

Description

This command shows the D/A channels to which the data is transferred.

 

Definition

ULONG DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SW_FIFO, cmd, fifo_instance, 0);

 

Parameters

cmd = DAPI_SPECIAL_SW_FIFO_GET_CHANNEL
fifo_instance = Specifies the instance of the software FIFO

 

Return value

Number of the A/D channels
Bit 0-7 Start channel
Bit 8-15 End channel

 

Programming example

unsigned long ret = DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SW_FIFO,
DAPI_SPECIAL_SW_FIFO_GET_CHANNEL, fifo_instance, 0);
printf(“Channel = %lu\n”, ret);
//Shows on which A/D channels the data is transferred.

DapiSpecialCommand - DapiSpecialSWFifoSetFrequencyHz
This command specifies the frequency interval (in Hertz) from the FIFO to the module

DapiSpecialCommand-DapiSpecialSWFifoSetFrequencyHz

 

Description

This command specifies the frequency interval (in Hertz) from the FIFO to the module.

 

Definition

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SW_FIFO, cmd, fifo_instance, par2);

 

Parameters

cmd = DAPI_SPECIAL_SW_FIFO_SET_FREQUENCY_HZ
fifo_instance = Specifies the instance of the software FIFO
par2 = frequency interval in Hertz (Hz)

 

Programming example

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SW_FIFO,
DAPI_SPECIAL_SW_FIFO_SET_FREQUENCY_HZ, fifo_instance, 10);
//Sets the frequency interval to 10Hz.

DapiSpecialCommand - DapiSpecialSWFifoGETFrequencyHz
This command returns the previously set frequency interval in Hertz

DapiSpecialCommand-DapiSpecialSWFifoGETFrequencyHz

 

Description

This command returns the previously set frequency interval in Hertz.

 

Definition

ULONG DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SW_FIFO, cmd, fifo_instance, 0);

 

Parameters

cmd = DAPI_SPECIAL_SW_FIFO_GET_FREQUENCY_HZ
fifo_instance = Specifies the instance of the software FIFO

 

Return value

Frequency interval in Hertz (Hz)

 

Programming example

unsigned long ret = DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SW_FIFO,
DAPI_SPECIAL_SW_FIFO_GET_FREQUENCY_HZ, fifo_instance, 0);
printf(“Frequency = %lu (Hz)\n”, ret);
//Displays the previously set frequency interval.

DapiSpecialCommand - DapiSpecialSWFifoGetBytesFree
This command is used to read the free bytes in the software FIFO buffer

DapiSpecialCommand-DapiSpecialSWFifoGetBytesFree

 

Description

This command is used to read the free bytes in the software FIFO buffer.

 

Definition

ULONG DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SW_FIFO, cmd, fifo_instance, 0);

 

Parameters

cmd = DAPI_SPECIAL_SW_FIFO_GET_BYTES_FREE
fifo_instance = Specifies the instance of the software FIFO

 

Return value

Free bytes of the software FIFO

 

Programming example

unsigned long ret = DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SW_FIFO,
DAPI_SPECIAL_SW_FIFO_GET_BYTES_FREE, fifo_instance, 0);
printf(“Free memory = %lu\n”, ret);
//Output the remaining free bytes of the memory.

DapiSpecialCommand - DapiSpecialSWFifoGetBytesPerSample
This command specifies how many bytes are required for writing to the D/A converter

DapiSpecialCommand-DapiSpecialSWFifoGetBytesPerSample

 

Description

This command specifies how many bytes are required for writing to the D/A converter.
Example: If 3 D/A channels are written to a 16 bit (2 byte) D/A converter, 3×2 bytes are required per sample. So the value 6 will be returned.

 

Definition

ULONG DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SW_FIFO, cmd, fifo_instance, 0);

 

Parameters

cmd = DAPI_SPECIAL_SW_FIFO_GET_BYTES_PER_SAMPLE
fifo_instance = Specifies the instance of the software FIFO

 

Return value

Bytes required per sample

 

Programming example

unsigned long ret = DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SW_FIFO,
DAPI_SPECIAL_SW_FIFO_GET_BYTES_PER_SAMPLE, fifo_instance, 0);
printf(“Required bytes = %lu\n”, ret);
//Output of the required bytes per sample.

DapiSpecialCommand - DapiSpecialSWFifoGetBytesPerSample
This command specifies how many bytes are required for writing to the D/A converter

DapiSpecialCommand-DapiSpecialSWFifoGetBytesPerSample

 

Description

This command specifies how many bytes are required for writing to the D/A converter.
Example: If 3 D/A channels are written to a 16 bit (2 byte) D/A converter, 3×2 bytes are required per sample. So the value 6 will be returned.

 

Definition

ULONG DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SW_FIFO, cmd, fifo_instance, 0);

 

Parameters

cmd = DAPI_SPECIAL_SW_FIFO_GET_BYTES_PER_SAMPLE
fifo_instance = Specifies the instance of the software FIFO

 

Return value

Bytes required per sample

 

Programming example

unsigned long ret = DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SW_FIFO,
DAPI_SPECIAL_SW_FIFO_GET_BYTES_PER_SAMPLE, fifo_instance, 0);
printf(“Required bytes = %lu\n”, ret);
//Output of the required bytes per sample.

DapiSpecialCommand - DapiSpecialSWFifoSetMode
This command sets the software FIFO mode

DapiSpecialCommand-DapiSpecialSWFifoSetMode

 

Description

This command sets the software FIFO mode. This command is not yet supported in the current firmware.

 

Definition

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SW_FIFO, cmd, fifo_instance, par2);

 

Parameters

cmd = DAPI_SPECIAL_SW_FIFO_SET_MODE
fifo_instance = Specifies the instance of the software FIFO
par2 = Software FIFO Mode

 

Programming example

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SW_FIFO,
DAPI_SPECIAL_SW_FIFO_SET_MODE, fifo_instance, 0);
//The software FIFO mode is set.

DapiSpecialCommand - DapiSpecialSWFifoGetMode
This command returns the previously set FIFO mode

DapiSpecialCommand-DapiSpecialSWFifoGetMode

 

Description

This command returns the previously set FIFO mode. Currently this mode is not yet supported in the firmware.

 

Definition

ULONG DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SW_FIFO, cmd, fifo_instance, 0);

 

Parameters

cmd = DAPI_SPECIAL_SW_FIFO_GET_MODE
fifo_instance = Specifies the instance of the software FIFO

 

Return value

FIFO Software Mode

 

Programming example

unsigned long ret = DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SW_FIFO,
DAPI_SPECIAL_SW_FIFO_GET_MODE, fifo_instance, 0);
printf(“Mode = %lu\n”, ret);
//Get the previously set FIFO mode.

DapiSpecialCommand - DapiSpecialSWFifoGetStatus
This command can be used to retrieve status values

DapiSpecialCommand-DapiSpecialSWFifoGetStatus

 

Beschreibung

This command can be used to retrieve status values.

 

Definition

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SW_FIFO, cmd, fifo_instance, 0);

 

Parameter

cmd = DAPI_SPECIAL_SW_FIFO_GET_STATUS
fifo_instance = Specifies the instance of the software FIFO

 

Return-Value

Description
(FIFO status generates a return value…)
Return value in hex
DAPI_SPECIAL_SW_FIFO_STATUS_IS_ACTIVE … when the output of the D/A converter is active 0x01
DAPI_SPECIAL_SW_FIFO_STATUS_IO_IS_ACTIVE … if the output of the FIFO I/O is active 0x02
DAPI_SPECIAL_SW_FIFO_STATUS_FIFO_OVERFLOW … if too much data is written into the FIFO 0x04
DAPI_SPECIAL_SW_FIFO_STATUS_FIFO_UNDERRUN … when the FIFO runs empty 0x08
DAPI_SPECIAL_SW_FIFO_STATUS_FIFO_OUT_OF_SYNC … if the FIFO communication within the modules is interrupted 0x10

Programming example

unsigned long ret;

ret = DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SW_FIFO,DAPI_SPECIAL_SW_FIFO_GET_STATUS, fifo_instance, 0);
if((ret & 0x01) != 0) {printf(“is_active”);}
if((ret & 0x02) != 0) {printf(“io_is_active”);}
if((ret & 0x04) != 0) {printf(“fifo_overflow”);}
if((ret & 0x08) != 0) {printf(“fifo_underrun”);}
if((ret & 0x10) != 0) {printf(“fifo_out_of_sync);}

DapiSpecialCommand - DapiSpecialCMDAD
This command controls the Software FIFO of a A/D converter.

DapiSpecialCommand-DapiSpecialCMDAD

 

Description

This command manages the control of the software FIFO of an A/D converter.

 

Definition

ULONG DapiSpecialCommand(ULONG handle, DAPI_SPECIAL_CMD_AD, ULONG cmd, ULONG ch_range, ULONG par0);

 

Parameters

handle = This is the handle of an open module
ch_range = Indicates the number of the A/D converter module (see example or file delib.h)

 

Initialize FIFO

cmd=DAPI_SPECIAL_RO_AD_FIFO_INIT
par0=not defined

Activate FIFO
cmd=DAPI_SPECIAL_RO_AD_FIFO_ACTIVATE
par0=not defined

Deactivate FIFO
cmd=DAPI_SPECIAL_RO_AD_FIFO_DEACTIVATE
par0=not defined

Set FIFO interval
cmd=DAPI_SPECIAL_RO_AD_FIFO_SET_INTERVAL_MS
par0=interval [msec]

Set FIFO for an A/D converter channel
cmd=DAPI_SPECIAL_RO_AD_FIFO_SET_CHANNEL
par0=16 bit value for A/D channels that are written to the FIFO. Each bit stands for one channel (Bit0 -> AD0, Bit1 -> AD1, … Bit15 -> AD15).
If the bit is set, the corresponding A/D channel is active.

Request FIFO status
cmd=DAPI_SPECIAL_RO_AD_FIFO_GET_STATUS
par0=not defined

 

Return-Value

cmd=DAPI_SPECIAL_RO_AD_FIFO_INIT
no return value

cmd=DAPI_SPECIAL_RO_AD_FIFO_ACTIVATE
no return value

cmd=DAPI_SPECIAL_RO_AD_FIFO_DEACTIVATE
no return value

cmd=DAPI_SPECIAL_RO_AD_FIFO_SET_INTERVAL_MS
no return value

cmd=DAPI_SPECIAL_RO_AD_FIFO_SET_CHANNEL
no return value

cmd=DAPI_SPECIAL_RO_AD_FIFO_GET_STATUS
return=current FIFO status

Value [hex] Meaning Explanation 0x80 RO_FIFO_STATUS_MASK_MEASURE_ENABLED FIFO is active 0x40 RO_FIFO_STATUS_MASK_TEST_DATA
0x20 RO_FIFO_STATUS_MASK_OVERFLOW FIFO Buffer is full 0x10 RO_FIFO_STATUS_MASK_UNDERRUN
0x08 RO_FIFO_STATUS_FULL_256_BYTE 256 Byte data available 0x04 RO_FIFO_STATUS_FULL_64_BYTE 64 Byte data available 0x02 RO_FIFO_STATUS_FULL_16_BYTE 16 Byte data available 0x01 RO_FIFO_STATUS_FULL_1_BYTE 1 Byte data available

 

Programming example

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_AD, DAPI_SPECIAL_RO_AD_FIFO_DEACTIVATE, DAPI_SPECIAL_AD_CH0_CH15, 0);
// deactivates the current AD-FIFO recording for AD module0 (channel 0 to 15)

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_AD, DAPI_SPECIAL_RO_AD_FIFO_INIT, DAPI_SPECIAL_AD_CH0_CH15, 0);
// initializing a new AD-FIFO recording for AD module 0 (channel 0 to 15)

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_AD, DAPI_SPECIAL_RO_AD_FIFO_SET_INTERVAL_MS, DAPI_SPECIAL_AD_CH0_CH15, 100);
// Set the AD-FIFO interval for recording to 100 ms for AD module 0 (channel 0 to 15).

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_AD, DAPI_SPECIAL_RO_AD_FIFO_SET_CHANNEL, DAPI_SPECIAL_AD_CH0_CH15, 0x1051);
// set the A/D channels to be recorded for AD module 0 (channel 0 to 15)
// 0x1051 [hex] = 0001 0000 0101 0001 0001 [bin]
// the following channels are recorded: AD0, AD4, AD6 and AD12

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_AD, DAPI_SPECIAL_RO_AD_FIFO_ACTIVATE, DAPI_SPECIAL_AD_CH0_CH15, 0);
// starts / activates the recording

status = DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_AD, DAPI_SPECIAL_RO_AD_FIFO_GET_STATUS, DAPI_SPECIAL_AD_CH0_CH15, 0);
// get the current AD-FIFO status

DapiWriteFifo
This command writes data records into the software FIFO

DapiWriteFifo

 

Description

This command writes data records into the software FIFO.

 

Definition

DapiWriteFifo(ULONG handle, ULONG fifo_instance, ULONG type, UCHAR * buffer, ULONG buffer_length);

 

Parameters

handle=This is the handle of an open module
fifo_instance=Gives the instance of the software FIFO
type=Gives the FIFO type
buffer=Buffer for the record to be sent
buffer_length=Length of the buffer

 

Programming example

DapiWriteFifo(handle, fifo_instance, 0, buff, pos);
//Writes the data set to the software FIFO.

DapiReadFifo
This command reads the Software-FIFO of the RO-Modules

DapiReadFifo

 

Description

This command reads the software FIFO. The data sets read out are deleted from the module’s software FIFO after reading.

 

Definition

ULONG DapiReadFifo(ULONG handle, ULONG type, UCHAR * buffer, ULONG buffer_length);

 

Parameters

handle=This is the handle of an open module
fifo_instance=Gives the instance of the software FIFO
type=Gives the FIFO type
buffer=Buffer for the record to be received
buffer_length=Length of the buffer

 

Return-Value

Length of the read FIFO data records

 

Structure of a FIFO data record (example with 2 active AD channels, AD0 and AD4)

Byte || Meaning || Value [hex]

0 RO_FIFO_ID_START 0xf0

1 FIFO type
2 Time stamp (Bit0..Bit7)
3 Time stamp (Bit8..Bit15)
4 Active A/D channels (Bit0..Bit7) 0x11

5 Active A/D channels (Bit8..Bit15) 0x00

6 A/D value channel 0 (Bit0..Bit7)
7 A/D value channel 0 (Bit8..Bit15)
8 A/D value channel 4 (Bit0..Bit7)
9 A/D value channel 4 (Bit8..Bit15)
10 RO_FIFO_ID_END 0xf1

FIFO data set = 7 bytes ID + (2 x number of active A/D channels) bytes data

 

RO_FIFO_ID_START

Signals the beginning of a new FIFO data record. The RO_FIFO_ID_START always has the value 0xf0 [hex].

 

FIFO type

Specifies the FIFO type (e.g. RO_FIFO_ID_TYPE_AD16M0 for A/D-FIFO)

 

Time stamp

Specifies the 16 bit time stamp of the current record. The time reference here is the time of activation of the FIFO.
If the time stamp overflows, it is reset to 0.

 

Active A/D channels

Specifies a 16 bit value for the currently active A/D channels. Each bit represents one channel (Bit0 -> AD0, Bit1 -> AD1, … Bit15 -> AD15).
If the bit is set, the corresponding A/D channel is active

RO_FIFO_ID_END
Signals the end of a FIFO data record. The RO_FIFO_ID_END always has the value 0xf1 [hex].

 

Comment

This command is only supported by our RO-ETH series modules.
Please note that the software FIFO must be activated or initialized with the command “DapiSpecialCMDAD”.

 

Programming example

bytes_received = DapiReadFifo(handle, DAPI_FIFO_TYPE_READ_AD_FIFO, buffer, sizeof(buffer));
// Reads the Software FIFO

CNT48 functions

DapiCnt48ModeSet
This command sets the count mode for a single input channel.

DapiCnt48ModeSet

 

Description

This command sets a counting mode (optionally also sub mode) and input filter for a specific input counter channel.

 

Definition

void DapiCnt48ModeSet(ULONG handle, ULONG ch, ULONG mode);

 

Parameters

handle=This is the handle of an open module
ch=number of the input counter channel whose mode is to be set (0, 1, 2, 3, .. )
mode= Specifies the mode

 

Possible values for mode

mode=DAPI_CNT48_MODE_COUNT_RISING_EDGE | DAPI_CNT48_SUBMODE_NO_RESET
In this mode, counting is performed on the rising edge.

 

mode=DAPI_CNT48_MODE_COUNT_RISING_EDGE | DAPI_CNT48_SUBMODE_RESET_WITH_READ
In this mode, counting is performed on the rising edge. In addition, the counter is reset with every read operation.

 

mode=DAPI_CNT48_MODE_COUNT_RISING_EDGE | DAPI_CNT48_SUBMODE_RESET_ON_CH_7
In this mode, counting is performed on the rising edge. In addition, the counter can be reset via an external signal (last channel of the module = 1).

 

mode=DAPI_CNT48_MODE_COUNT_RISING_EDGE | DAPI_CNT48_SUBMODE_LATCH_COMMON
With the command “DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_CNT48, DAPI_SPECIAL_CNT48_LATCH_GROUP8, 0, 0)” all 8 counter values of the input counters are written into a latch simultaneously. This mode can then be used to read the latched counter reading.

 

mode=DAPI_CNT48_MODE_T
This mode is used to measure the period T. A 100 MHz counter serves as a basis for this.

 

mode=DAPI_CNT48_MODE_FREQUENCY
In this mode the number of rising edges within one second (= frequency) can be measured.

 

mode=DAPI_CNT48_MODE_PWM
This mode is used to measure the “high” and “low” time of a signal. The ratio can then be determined (PWM).

 

Additionally, all input counters can be combined with an input filter (with an or combination). The following input filters are available for this:

 

DAPI_CNT48_FILTER_20ns
DAPI_CNT48_FILTER_100ns
DAPI_CNT48_FILTER_250ns
DAPI_CNT48_FILTER_500ns
DAPI_CNT48_FILTER_1us
DAPI_CNT48_FILTER_2_5us
DAPI_CNT48_FILTER_5us
DAPI_CNT48_FILTER_10us
DAPI_CNT48_FILTER_25us
DAPI_CNT48_FILTER_50us
DAPI_CNT48_FILTER_100us
DAPI_CNT48_FILTER_250us
DAPI_CNT48_FILTER_500us
DAPI_CNT48_FILTER_1ms
DAPI_CNT48_FILTER_2_5ms
DAPI_CNT48_FILTER_5ms

 

Comment

This command is only supported by our module RO-CNT8.

 

Programming example

DapiCnt48ModeSet(handle, 0, DAPI_CNT48_MODE_COUNT_RISING_EDGE | DAPI_CNT48_SUBMODE_RESET_WITH_READ | DAPI_CNT48_FILTER_20ns);
//input counter channel 0 counts all pulses <= 20ns on rising edge. In addition, the counter is reset after a query.
DapiCnt48ModeSet(handle, 1, DAPI_CNT48_MODE_COUNT_RISING_EDGE | DAPI_CNT48_SUBMODE_RESET_ON_CH_7 | DAPI_CNT48_FILTER_500us);
//input counter channel 1 counts all pulses <= 500us on rising edge. This counter can be reset with an external signal (ch7 = 1).
DapiCnt48ModeSet(handle, 2, DAPI_CNT48_MODE_PWM | DAPI_CNT48_FILTER_5ms);
//input counter channel 2 measures all low-/high times <= 5ms. The ratio is then determined (PWM).

DapiCnt48ModeGet
This command returns the count mode of a single input channel.

DapiCnt48ModeGet

 

Description

This instruction reads back the count mode of a specific input counter channel.

 

Definition

ULONG DapiCnt48ModeGet(ULONG handle, ULONG ch);

 

Parameters

handle=This is the handle of an open module
ch=number of the input counter channel whose mode is to be output (0, 1, 2, 3, .. )

 

Return-Value

Counting mode of the input counter channel.
(More information / description of the bits -> see delib.h or manual “RO register assignment”)

 

Comment

This command is only supported by our module RO-CNT8.

 

Programming example

value = DapiCnt48ModeGet(handle, 0)
//G Returns the count mode of input counter channel 0
value = DapiCnt48ModeGet(handle, 3)
//G Returns the counting mode of input counter channel 3

DapiCnt48CounterGet32
This command reads the first 32 bits of a 48 bit input counter.

DapiCnt48CounterGet32

 

Description

This command reads the first 32 bits of a 48-bit input counter.

 

Definition

ULONG DapiCnt48CounterGet32(ULONG handle, ULONG ch);

 

Parameters

handle=This is the handle of an open module
ch= Specifies the number of the input counter channel to be read (0, 1, 2, 3, .. )

 

Return-Value

Output of the counter value.

 

Comment

This command is only supported by our modules RO-CNT8 and RO-CNT/IGR.

 

Programming example

value = DapiCnt48CounterGet32(handle, 0);
//outputs the value of input counter channel 0
value = DapiCnt48CounterGet32(handle, 3);
//outputs the value of input counter channel 3

DapiCnt48CounterGet48
This command reads a 48 bit counter of an input counter.

DapiCnt48CounterGet48

 

Description

Dieser Befehl liest einen 48 Bit Zähler eines Eingangszählerkanals.

 

Definition

ULONGLONG DapiCnt48CounterGet48(ULONG handle, ULONG ch);

 

Parameters

handle=This is the handle of an open module
ch= Specifies the number of the input counter channel to be read (0, 1, 2, 3, .. )

 

Return-Wert

Output of the counter value.

 

Comment

This command is only supported by our modules RO-CNT8 and RO-CNT/IGR.

 

Programming example

value = DapiCnt48CounterGet48(handle, 0);
//outputs the value of input counter channel 0
value = DapiCnt48CounterGet48(handle, 3);
//outputs the value of input counter channel 3

DapiSpecialCommand - DapiSpecialDIFilterValueSet
This command sets a filter [ms], in which time interval digital input channels are sampled

DapiSpecialCommand – Dapi_Special_DI_Filter_Value_Set

 

Description

This command sets a filter [ms], in which time interval digital input channels are sampled.

 

Definition

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_DI, DAPI_SPECIAL_DI_FILTER_VALUE_SET, ULONG time_ms, 0);

 

Parameters

handle=This is the handle of an opened module.
time_ms=Time interval [ms] by which digital input channels are sampled.

 

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.

 

Programming example

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_DI, DAPI_SPECIAL_DI_FILTER_VALUE_SET, 5, 0);
// Sets the time interval to 5ms
DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_DI, DAPI_SPECIAL_DI_FILTER_VALUE_SET, 150, 0);
// Sets the time interval to 150ms

DapiSpecialCommand - DapiSpecialDIFilterValueGet
This command returns the previously set value of the time interval for sampling the digital input channels in [ms]

DapiSpecialCommand – Dapi_Special_DI_Filter_Value_Get

 

Description

This command returns the previously set value of the time interval for sampling the digital input channels in [ms].

 

Definition

ULONG DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_DI, DAPI_SPECIAL_DI_FILTER_VALUE_GET, 0, 0);

 

Parameters

handle=This is the handle of an open module

 

Return-Value

Time [ms]

 

Remarks

This command is not supported by our modules with Ethernet interface.

 

Programming example

value = DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_DI, DAPI_SPECIAL_DI_FILTER_VALUE_GET, 0, 0);
//Returns the time interval for sampling the digital input channels

DapiSpecialCommand - Dapi_Special_DI_FF_Filter_Value_Set
This command sets a filter [ms], in which time interval the input flip-flops and the input counters are polled.

DapiSpecialCommand – Dapi_Special_DI_FF_Filter_Value_Set

 

Description

This command sets a filter [ms], in which time interval the input flip-flops and the input counters are polled.

 

Definition

void DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_DI, DAPI_SPECIAL_DI_FF_FILTER_VALUE_SET, ULONG time_ms, 0);

 

Parameters

handle=This is the handle of an open module
time_ms=Time interval [ms] by scanning digital input channels.

 

Return-Value

None.

 

Comment

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.

 

Programming example

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_DI, DAPI_SPECIAL_DI_FF_FILTER_VALUE_SET, 5, 0);
// Sets the time interval to 5ms
DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_DI,
DAPI_SPECIAL_DI_FF_FILTER_VALUE_SET, 150, 0);
// Sets the time interval to 150ms

DapiSpecialCommand - Dapi_Special_DI_FF_Filter_Value_Get
This command returns the predefined value of the time interval for sampling the input flip-flops and the input counters in [ms].

DapiSpecialCommand – Dapi_Special_DI_FF_Filter_Value_Get

 

Description

This command returns the predefined value of the time interval for sampling the input flip-flops and the input counters in [ms].

 

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 open module

 

Return-Value

Time [ms]

 

Comment

This command is not supported by our modules with Ethernet interface.

 

Programming example

value = DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_DI, DAPI_SPECIAL_DI_FF_FILTER_VALUE_GET, 0, 0);
// Returns the time interval for scanning the digital input channels.

DapiSpecialCommand - DapiSpecialCNT48LatchGroup8
This command saves the counter values of 8 inputcounters simultaneously into a temporary storage (latch). So, after that, the counter values of the latch can be read successively. Here, the speciality is, that it is possible to "freeze" the counter simultaneously and the frozen counter (latch) can be read one by one.

DapiSpecialCommand – DapiSpecialCNT48LatchGroup8

 

Description

This instruction stores the counter readings of 8 input counters simultaneously in a latch.
Thus, all counter readings of the latch can be read out one after the other.
A special feature is that a simultaneous “freezing” of the counter readings is possible and the frozen readings (latch) can then be read out (slowly) one after the other.

 

Definition

void DapiSpecialCommand(ULONG handle, DAPI_SPECIAL_CMD_CNT48, DAPI_SPECIAL_CNT48_LATCH_GROUP8, ULONG ch, 0)

 

Parameters

handle=This is the handle of an open module
ch=Specifies the number of the input counter from which the counter status of 8 input counters are latched (0, 8, 16, …)

 

Comment

This command is only supported by our module RO-CNT8.

Please regard that only the counter readings of the input counters are latched for which the mode

“DAPI_CNT48_SUBMODE_LATCH_COMMON” was set. (-> DapiCnt48ModeSet)

 

Programming example

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_CNT48, DAPI_SPECIAL_CNT48_LATCH_GROUP8, 0, 0)
// Counter values of the input counters 0-7 are latched
DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_CNT48, DAPI_SPECIAL_CNT48_LATCH_GROUP8, 8, 0)
// Counter values of the input counters 8-15 are latched

DapiSpecialCommand - DapiSpecialCNT48ResetGroup8
This command resets the counter values of 8 inputcounter simultaneously.

DapiSpecialCommand – DapiSpecialCNT48ResetGroup8

 

Description

This command simultaneously resets the counts of 8 input counters.

 

Definition

void DapiSpecialCommand(ULONG handle, DAPI_SPECIAL_CMD_CNT48, DAPI_SPECIAL_CNT48_RESET_GROUP8, ULONG ch, 0)

 

Parameters

handle=This is the handle of an open module
ch=Specifies the number of the input counter from which the counter status of 8 input counters are reset (0, 8, 16, …)

 

Comment

This command is only supported by our module RO-CNT8.

 

Programming example

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_CNT48, DAPI_SPECIAL_CNT48_RESET_GROUP8, 0, 0)
// Counter values of the input counters 0-7 are reset
DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_CNT48, DAPI_SPECIAL_CNT48_RESET_GROUP8, 8, 0)
// Counter values of the input counters 8-15 are reset

DapiSpecialCommand - DapiSpecialCNT48ResetSingle
This commands resets the counter value of a single inputcounter.

DapiSpecialCommand – DapiSpecialCNT48ResetSingle

 

Description

This command resets the count of a single input counter.

 

Definition

void DapiSpecialCommand(ULONG handle, DAPI_SPECIAL_CMD_CNT48, DAPI_SPECIAL_CNT48_RESET_SINGLE, ULONG ch, 0)

 

Parameters

handle=This is the handle of an open module
ch= Specifies the number of the input counter whose counter value is to be reset (0, 1, 2, ..)

 

Comment

This command is only supported by our module RO-CNT8.

 

Programming example

DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_CNT48, DAPI_SPECIAL_CNT48_RESET_SINGLE, 0, 0)
// Counter reading of input counter 0 is reset
DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_CNT48, DAPI_SPECIAL_CNT48_RESET_SINGLE, 1, 0)
// Counter reading of input counter 1 is reset

DapiSpecialCommand - DapiSpecialCNT48DIGet1
This command reads the input state (0/1) of a single inputcounterchannel.

DapiSpecialCommand – DapiSpecialCNT48DIGet1

 

Description

This command reads the input state (0/1) of a digital input counter channel.

 

Definition

ULONG DapiSpecialCommand(ULONG handle, DAPI_SPECIAL_CMD_CNT48, DAPI_SPECIAL_CNT48_DI_GET1, ULONG ch, 0);

 

Parameters

handle=This is the handle of an open module
ch= Specifies the number of the input counter channel whose input state is to be read (0, 1, 2, 3, .. )

 

Return-Value

Status of the input counter (0/1)

 

Comment

This command is only supported by our module RO-CNT8.

 

Programming example

value = DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_CNT48, DAPI_SPECIAL_CNT48_DI_GET1, 0, 0)
// Reads input status of input counter channel 1
value = DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_CNT48, DAPI_SPECIAL_CNT48_DI_GET1, 1, 0)
// Reads input status of input counter channel 2

 

 

Block diagram BS-Optoin

BS-Optoin

Counter / Flip-Flop control

BS-Optoin Counter FF control

Block diagram BS-Relais

BS-Relais

Connection example Relais

Connection example

Connection example Optoin

Connection example

Connection example MOSFET

Connection example

Screwless connector system

The customer’s connection wiring of the inputs and outputs is carried out via screwless, pluggable terminal strips. The conductor connection is made by a so-called actuating tool.
A locking and ejection mechanism facilitates the insertion and removal of the complete terminal strip.

 

Handling

Step 1

Remove the operating tool from the scope of delivery.

Step 2

Insert the operating tool firmly into the side opening in the direction of conductor connection.

Step 3

Now insert the stripped conductor into the open terminal contact.

Schritt 4

Pull the operating tool out again.

Step 5

Check the correct connection of the conductor. It should now no longer be possible to pull it out easily.

DELIB driver library

Manual of the DELIB driver library
Documentation of all functions for the driver library
Download
  • Windows 10, 8, Vista, 7, XP, 2000 andLinux
  • Moduel open/close functions
  • Digital inputs: reading 1 / 8 / 16 / 32 / 64 bit
  • Digital outputs: Write 1 / 8 / 16 / 32 / 64 bit
  • A/D Lesen: read, read_volt, read_mA, A/D Modus einstellen
  • D/A schreiben: write, write_volt, write_mA, D/A-Modus einstellen
DELIB (64-bit) driver library for Windows
For Windows 11/10, Windows 7, Windows 8, Vista, XP and 2000
Download

Installation file for the 64 bit DELIB driver library.

The following operating systems are supported:

64 bit

  • Windows 11/10 x64
  • Windows 7 x64
  • Windows 8 x64
  • Windows Server 2012 x64
  • Windows Server 2008 x64
  • Windows Vista x64
  • Windows XP x64
  • Windows Server 2003 x64

Included software

  • DT-Flasher x64
    Software to update DEDITEC module to the latest version
  • DELIB Configuration Utility x64
    Set configuration of module addresses
  • DELIB Module Config x64
    Configuration of module-specific settings
  • CAN Configuration Utility x64
    Set configuration of CAN modules
  • DELIB Module Demo x64
    Enables manual switching of a module
  • DELIB Command Line Interface x64
    Enables the execution of DELIB commands in the command line
  • Watchdog Configuration Utility x64
    Set configuration of a watchdog stick
DELIB (32-bit) driver library for Windows
For Windows 11/10, Windows 7, Windows 8, Vista, XP and 2000
Download

Installation file for the 32-bit version of the DELIB driver library.

The following operating systems are compatible:
32-Bit

    • Windows 11/10
    • Windows 7
    • Windows 8
    • Windows Server 2012
    • Windows Server 2008
    • Windows Vista
    • Windows XP
    • Windows Server 2003

64-Bit

  • Windows 10 x64
  • Windows 7 x64
  • Windows 8 x64
  • Windows Server 2012 x64
  • Windows Server 2008 x64
  • Windows Vista x64
  • Windows XP x64
  • Windows Server 2003 x64

Included software

  • DT-Flasher
    Software to update DEDITEC module to the latest version
  • DELIB Configuration Utility
    Set configuration of module addresses
  • DELIB Module Config
    Configuration of module-specific settings
  • CAN Configuration Utility
    Set configuration of CAN modules
  • DELIB Module Demo
    Enables manual switching of a module
  • DELIB Command Line Interface
    Enables the execution of DELIB commands in the command line
  • Watchdog Configuration Utility
    Set configuration of a watchdog stick

Attention:

With this version of the driver library, only 32-bit applications can be created, which can then be run on 32- and 64-bit systems.

DELIB driver library for Linux (32/64-bit)
For 32/64-bit Linux distributions starting with kernel 2.6.x
Download

DELIB driver library for Linux distributions (32/64-bit) starting with kernel 2.6.x

This driver package includes the following components:

  • DELIB USB driver
  • DELIB Ethernet driver
  • DELIB CLI

DELIB USB driver

Supports the following products:

  • NET-Series (via USB interface)
  • RO-USB-Series
  • BS-USB-Series
  • USB-Mini-Sticks
  • USB-Watchdog
  • USB-OPTION-8 / USB-RELAIS-8
  • USB-TTL-32 / USB-TTL-64

Note:

With the standard USB driver, you can access several USB products with different module IDs (for example one RO-USB and one USB-OPTOIN-8). Therefore, no additional driver installation is required.

If you want to access several USB products with the same module ID (for example one USB-OPTOIN-8 and one USB-RELAIS-8), you have to install additionally the Linux FTDI driver. The FTDI driver can be found at http://www.ftdichip.com.

 

DELIB Ethernet driver

Supports the following products:

  • NET-Series (via Ethernet Interface)
  • RO-ETH-Series
  • RO-ETH/LC-Series
  • BS-ETH-Serie
  • ETH-OPTION-8 / ETH-RELAIS-8
  • ETH-TTL-64

DELIB CLI

With the DELIB CLI (Command Line Interface) for Linux it is possible so controll all I/O’s over the command-line.

 

DELIB - Sample-Sources - Installer (approx. 10 MB)
Sample programs for different programming languages (Also in DELIB Setup included)
Download

Sample programs for different programming languages (Also in DELIB Setup included)

  • C (Microsoft Visual C++ 6.0, Borland C)
  • C++ (Microsoft Visual C++ 6.0)
  • C# (Microsoft Visual C# 2008 to 2015)
  • Delphi (Borland Delphi 7)
  • VB (Microsoft Visual Basic 6.0)
  • VB.NET (Microsoft Visual Basic 2008 to 2015)
  • Java (Java native interface)
  • Java.dll (Ethernet protocol for ethernet products)

 

Manual BS-Series
Hard- and Software-description
Download
  • Description of the control/regulation technology modules
  • Configuration of the different module interfaces
  • Software installation of the DELIB driver library

DEDITEC driver CD

DEDITEC Driver CD with many helpful tools and manuals for commissioning your DEDITEC products.

  • DELIB driver library for Windows
  • Test and configuration software
  • Manuals
  • Data sheets
  • Example programs for C++, C#, VB, VB.Net, Delphi, LabVIEW

2 pin plug connector

Allows the power supply to be connected to the DEDITEC module

  • Type: Phoenix Contact 1783287
  • 100 % malfunction protected
  • For all conductor types from 0.2mm² to 2.5mm²

16 pol connector

Required to connect your application to the DEDITEC module

  • Type: Wago Kontakttechnik 713-1108/037-000
  • Pluggable female connector with locking mechanism
  • 100 % malfunction protected
  • 1-wire connection for all types of conductors up to 1.5mm²

Tool for wiring connectors

Serves to open and close the clamp contacts on the Wago connectors.
  • Type: Wago Kontakttechnik 734-231

DSUB-9 connection cable

DSUB-9 extension cable. Female to male 1,8 Meter

Optional input voltage range 5V..15V DIL

With this option the input voltage range of the BS-OPTOIN modules can be reduced to 5..15V. We will always modify 8 channels per ordered quantity.

  • Input voltage range 5V to 15V AC / DC
  • 8 channels

8-times relay powermodule (switching capacity 40V/10A), which can be controlled by relays/opto-couplers

The MOD-REL8_10A has eight changeover relays with a switching capacity of 48V/10A AC or 30V/8A DC. It can be used as additional power stage for our digital output modules. The normally open contacts of a digital output module, e.g. a RO-USB-REL16, are simply connected in parallel to the inputs of this power stage. Additionally this module requires a power supply of 24V DC.

  • Power stage for all digital output modules
  • 8 change-over contact relay (CO) / 48V / 10A AC or. 30V / 8A DC
  • 24V power supply
  • Pluggable terminal strips for the connection wiring
  • Potential-free inputs (no control voltage required)

USB watchdog stick with 2 relays for shift operations

This USB-WATCHDOG-STICK monitors your operating PC or server and can reset the hardware independently in case of a program crash. Simply integrate the function of the Watchdog Stick into your application. As soon as a timeout occurs and the watchdog stick is no longer periodically reset, the two relay outputs are switched through. With an appropriate connection cabling, for example, the PC reset could be activated, an external SMS modem can send warnings or a connected siren signals an alarm. With the help of our free configuration tool, you can define how the relays should switch in case of an error.

  • USB 2.0 / USB 1.1 interface
  • Watchdog function
  • Monitoring your control PC or server
  • Timeout times adjustable from 10ms to 10h
  • Windows Watchdog API
  • 2 NO contact relay (NO)
  • Connection cable with DSUB9 socket (approx. 1.8m)

Power supply 24V/2A for DIN rail mounting

The DR-4524 from Mean Well is a 48W rail mount power supply for industrial applications. It offers protection against short circuit, overload, overvoltage and overheating.

  • Input voltage range: 85V… 264V AC / 120V DC … 370V DC
  • Output voltage: 24V DC
  • Output current: 2A
  • Nominal power: 48W

DIN Rail

Top-hat rail for mounting our control technology modules.

  • Top-hat rail according to DIN EN 50022
  • Type: Phoenix Contact / 1208131
  • Dimensions in mm: 450 x 35 x 7.5 (L x W x D)

12V din rail relay

PLC interface for limiting continuous currents up to 10A, consisting of basic terminal with screw connection and pluggable miniature relay. Mountable on NS 35/7.5 mounting rail.

  • Nominal voltage: 230V AC / 220V DC
  • Switching voltage: 250 V AC/DC
  • 1 changeover contact
  • Reverse polarity protection, freewheeling diode
  • LED for voltage indication
  • Phoenix Contact, 2967617, PLC-RSC- 12DC/21HC

24V din rail relay

PLC interface for limiting continuous currents up to 10A, consisting of basic terminal with screw connection and pluggable miniature relay. Mountable on NS 35/7.5 DIN rail.

  • Nominal voltage: 24V AC/DC
  • Switching voltage: 250 V AC/DC
  • 1 changeover contact
  • Reverse polarity protection, freewheeling diode
  • LED for voltage indication
  • Phoenix Contact, 2967633, PLC-RSC- 24UC/21HC

230V din rail relay

With this 230V relay can you reduce your voltage to 12V. The 12V signal can be read by our opto coupler inputs.

  • Max switching current 250V AC
  • Coil current 4,5mA

2 pin plug connector

Allows the power supply to be connected to the DEDITEC module

  • Type: Phoenix Contact 1783287
  • 100 % malfunction protected
  • For all conductor types from 0.2mm² to 2.5mm²

16 pol connector

Required to connect your application to the DEDITEC module

  • Type: Wago Kontakttechnik 713-1108/037-000
  • Pluggable female connector with locking mechanism
  • 100 % malfunction protected
  • 1-wire connection for all types of conductors up to 1.5mm²

Strain relief plate for 16 or 18 pole Wago connectors

A strain relief plate that can be mounted centrally between the conductor entries facilitates the plugging and unplugging process and allows easy access to the actuation openings even when wired.

  • Type: Wago / 713-127
  • Suitable for 16/18 pole female connectors with conductor connection
  • Mating and unmating aid for Wago connectors
  • Strain relief of the individual wired conductors
  • Easy mounting

Tool for wiring connectors

Serves to open and close the clamp contacts on the Wago connectors.
  • Type: Wago Kontakttechnik 734-231

Reviews

There are no reviews yet.

Be the first to review “BS-SER module with 8/16/32 digital inputs/outputs”

Your email address will not be published. Required fields are marked *