USB Analog and Digital IO Modules

LucidControl USB IO Modules

  • Data acquisition and control
  • Cost effective and flexible
  • Platform independent
  • Windows® and Linux
  • Compatible with RPi and Beagle Bone
  • Clippable on DIN-Rail
Read More ...
  • Industrial & home automation
USB Digital Input Module

USB Digital Input Module

LucidControl Product Series

  • 4 / 8 digital inputs
  • For 5V, 10V and 24V signals
  • Opto insulated contacts
  • Counters and edge detectors
Read More ...
USB Digital Output Module

USB Digital Output Module

LucidControl Product Series

  • Opto insulated option
  • 4 / 8 digital outputs
  • Relay module option
  • Pulse width modulation and timers
Read More ...
  • Switching and power control applications
USB Analog Input Module

USB Analog Input Module

LucidControl Product Series

  • Measurement range options
  • 4 analog inputs
  • e.g. 0 ~ 10 V or -10 ~ 10 V
  • 14 bit resolution
Read More ...
  • Acquisition of sensor signals
USB Analog Output Module

USB Analog Output Module

LucidControl Product Series

  • 4 analog outputs
  • Output range options
  • e.g. 0 - 10 V or 4 - 20 mA
  • 12 bit resolution
Read More ...
  • 4 - 20 mA current interfaces
USB RTD Input Module for Pt100 / Pt1000 with 8 Channels

USB RTD Input Module

LucidControl Product Series

  • 4/8 Pt1000/Pt100 RTD inputs
  • Temperature range: -180 ~ 180 °C or 0 ~ 360°C
  • 0.1 °C resolution
  • Heat control applications
Read More ...
  • Logging of temperatures

3 USB Analog Output Module Operation

The LucidControl AO4 USB Analog Output Module generates 4 independent output voltage signals.

Analog Output Signal Processing

Fig. 3-1 Analog Output Processing

The Hardware of the AO4 module consists of 2 independent DAC (Digital Analog Converter). By multiplexing each DAC, 4 output voltages are created in total.

Fig. 3-1 illustrates the output processing in standard mode. Each of the two DAC is responsible for the generation of two analog output voltages.

The processing of both DAC channels is operating in parallel the same way. For simplicity only the processing of one DAC is shown in Fig. 3-1.

The lower diagram shows the DAC output voltages – a higher voltage for output 1, a lower voltage for output 2.
The upper diagram depicts the timing sequence of the output multiplexing and refreshing algorithm for each DAC.

After the DAC set the updated voltage of output 1 and TSetup has passed the output multiplexer applies the voltage to the output circuit. TSetup is a guard time preventing to overwrite the stable voltage of the last refresh cycle.
The voltage is applied to the output circuit for the time TRefresh. After refreshing has completed, the DAC generates the updated voltage of output 2. Output 2 is processed the same way as output 1 was.
The refreshing algorithm repeats periodically after TInterval has passed.

Even if TSetup, TRefresh and TInterval can be adjusted for each output channel independently, this should only be taken into account if it is necessary since changing these parameters may have unexpected consequences like skipped output channels or high voltage ripple.

The relevant IO Configuration Parameters are outAnSetupTime, outAnRefreshTime and outAnRefreshInterval.

At any time it is possible to restore the default values of changed parameters.


3.1 Analog Output Operation Modes


3.1.1 Inactive Mode

Setting an output to inactive mode disables processing of the output and sets the output voltage to 0 V.
Setting an output to Inactive Mode does not suspend the output processing and refreshing but forces the output voltage to 0 V.


3.1.2 Standard Mode

In standard mode the processing of the analog output is executed as described in section 3.


3.2 Output Calibration

LucidControl AO4 modules generate very precise voltages. In contradiction to logic signals, where by nature only two states LOW and HIGH are possible, for analog signals all voltages within a given range are represented by their digital value.
The analog signal conditioning and the analog output drivers are not free from tolerances (e.g. offset voltages of amplifiers). These can to be compensated in order to generate precise output voltages.
The calibration function of the AO4 module, which is described here, corrects these conversion and amplification tolerances mostly.

Attention

Note

All modules are calibrated before shipping. Therefore, it is not necessary to recalibrate a new module, nor is it necessary to calibrate it regularly!

During calibration unexpected voltages might be applied to the calibrated output. It is recommended to disconnect the IO-Connector before starting the calibration.


3.2.1 Calibration Procedure

Each output of the USB Analog Output Module has a feedback line which monitors the output voltage during calibration and adjusts the output voltage to 0 V.

Example
The calibration of analog output channel 0 is started by this command
LucidIoCtrl –dCOM1 –c0 –a -p –-quiet [ENTER]

Starting the CalibrateIO command (-a) with the parameter –quiet causes LucidIoCtrl skipping user confirmation before running the command. Using Parameter –p makes the calibration setting persistent so that it is used after a restart of the module.


3.2.2 Offset Compensation

In some cases it is necessary to compensate an offset voltage by adding a value to the output voltages.
The signed value of the IO Configuration Parameter outAnOffset is added to the output voltage and allows a correction of ± 3 V in 1 mV steps.


3.3 Commands

Accessing inputs and outputs is a very common task which is mostly identical for all LucidControl modules. For this task output modules provide the commands SetIo for writing a single value and SetIoGroup for writing a group of values of the same type.
The command GetIo supports reading of the state of a single output value while GetIoGroup reads a group of output values of the same type.

For more comprehensive information covering reading and writing of inputs and outputs please see this sections:

The following sections describe the commands which are supported by the AO4 module in detail.


3.3.1 SetIo

This command sets the value of the analog output channel.

Please see also the General LucidControl documentation for more information.

Command SetIo Access Write
Opcode 0x40
LucidIoControl Command Line Tool
Call (-tV) LucidIoCtrl –d[COMx] –c[Channel] –tV –w[Voltage]

Request Frame

OPC P1 P2 LEN Data Field
0x40 Channel Value Type Length Value
Value Description
Channel Number of output channel (Range: 0 ~ 3)
Value Type
Value Type Value Range Size
Signed Voltage
(0x1D)
Resolution: 1 µV
-100,000,000 µV ~
100,000,000 µV
(-100 V ~ 100 V)
4 Bytes
Signed Voltage
(0x1C)
Resolution: 1 mV
-30,000 µV ~
30,000 µV
(-30 V ~ 30 V)
2 Bytes
Length Length of the Values in the Data Field
Value Values accordingly to the Value Type

Response Frame

Status LEN
Status 0

The command does not return any data.

In the case of an error the command returns Execution Status Code.

LucidIoCtrl Command Line Tool Example

Set output voltage of channel 0 to 2.540 V
LucidIoCtrl –dCOM4 –c0 –tV -w2.540 [ENTER]

Note
When using the LucidIoCtrl command line tool the distinction between the SetIo and SetIoGroup commands is not necessary since LucidIoCtrl command line tool handles this automatically.


3.3.2 SetIoGroup

This command sets the voltage of a group of output channels of the same Value Type.

Please see also the General LucidControl documentation for more information.

Values
Comma separated list of voltages to set e.g. –w1.25,2.5,7.5

Command SetIoGroup Access Write
Opcode 0x42
LucidIoControl Command Line Tool
Call (-tV) LucidIoCtrl –d[COMx] –c[Channels] –tV –w[Voltages]
Channels
Comma separated list of channels e.g. –c0,2,3

Request Frame

OPC P1 P2 LEN Data
0x42 Channel
Mask
Value Type Length Value(s)
Value Description
Channel Mask

Channel Bit Mask specifying the channel number(s)

Channel Bit Position Value
0 0 0x01
1 1 0x02
2 2 0x04
3 3 0x08

Values can be bitwise combined
Examples
Accessing channel numbers 0 and 3 -> Value = 0x01 OR 0x08 = 0x09
Accessing channel numbers 1 and 2 -> Value = 0x02 OR 0x04 = 0x06

Value Type
Value Type Value Range Size
Signed Voltage
(0x1D)
Resolution: 1 µV
-100,000,000 µV ~
100,000,000 µV
(-100 V ~ 100 V)
4 Bytes
Signed Voltage
(0x1C)
Resolution: 1 mV
-30,000 µV ~
30,000 µV
(-30 V ~ 30 V)
2 Bytes
Length Length of the Values in the Data Field (One Value for every channel)
Value(s) One or more values to set in ascending channel order

Response Frame

Status LEN
Status 0

The command does not return any data.

In the case of an error the command returns Execution Status Code.

Example

The following request frame sets outputs 0 to 1.25 V and output 1 to 2.5 V.

Request Frame

OPC P1 P2 LEN Data Field
0x42 0x03 0x1D 0x08 Byte
Value Channel 0 Value Channel 1
0 1 2 3 4 5 6 7
0xD0 0x12 0x13 0x00 0xA0 0x25 0x26 0x00

Response Frame

Status Length
0x00 0x00

3.3.3 GetIo

This command reads the value of the analog output.

Please see also the General LucidControl documentation for more information.

Command GetIo Access Read
Opcode 0x46  
LucidIoControl Command Line Tool
Call (-tV) LucidIoCtrl –d[COMx] –c[Channels] –tV –r
Return CHn:VV
n Onput Channel
VV Output Voltage

Request Frame

OPC P1 P2 LEN
0x46 Channel Value Type 0
Value Description
Channel Number of input channel (Range: 0 ~ 3)
Value Type
Value Type Value Range Size
Signed Voltage
(0x1D)
Resolution: 1 µV
-100,000,000 µV ~
100,000,000 µV
(-100 V ~ 100 V)
4 Bytes
Signed Voltage
(0x1C)
Resolution: 1 mV
-30,000 µV ~
30,000 µV
(-30 V ~ 30 V)
2 Bytes

Response Frame

Status LEN Data Field
Status Size Value

In case of successful execution the command returns the value of the specified channel number.

In the case of an error the command returns Execution Status Code.

LucidIoCtrl Command Line Tool Example

Read voltage of output channel 0
LucidIoCtrl –dCOM4 –c0 –tV -r [ENTER]
-> CH0:5.00000

Note
When using the LucidIoCtrl command line tool the distinction between GetIo and GetIoGroup commands is not necessary since the program handles this automatically.


3.3.4 GetIoGroup

This command reads the voltage of a group of analog outputs of the same Value Type.

Please see also the General LucidControl documentation for more information.

Command GetIoGroup Access Read
Opcode 0x48  
LucidIoControl Command Line Tool
Call (-tV) LucidIoCtrl –d[COMx] –c[Channels] –tV –r
Channels
Comma separated list of channels e.g. –c0,1,3
Return CHn:VV

n Input Channel
VV Output Voltage

Request Frame

OPC P1 P2 LEN
0x48 Channel
Mask
Value Type 0
Value Description
Channel Mask

Specifies the output channels to access

Channel Bit Position Value
0 0 0x01
1 1 0x02
2 2 0x04
3 3 0x08

Values can be bitwise combined
Examples
Accessing channel numbers 0 and 3 -> Value = 0x01 OR 0x08 = 0x09
Accessing channel numbers 1 and 2 -> Value = 0x02 OR 0x04 = 0x06

Value Type
Value Type Value Range Size
Signed Voltage
(0x1D)
Resolution: 1 µV
-100,000,000 µV ~
100,000,000 µV
(-100 V ~ 100 V)
4 Bytes
Signed Voltage
(0x1C)
Resolution: 1 mV
-30,000 µV ~
30,000 µV
(-30 V ~ 30 V)
2 Bytes

Response Frame

Status LEN Data Field
Status Size Value(s)

In case of successful execution the command returns the value of the specified channels.

In the case of an error the command returns Execution Status Code.

Example of GetIoGroup Request

This request reads the output values of the channels 0 and 1.

Request Frame

OPC P1 P2 LEN
0x48 0x03 0x1D 0x00

Channel Mask (P1) = 0x01 OR 0x02 = 0x03

Response Frame
Output 0 = 1.25 V, Output 1 = 2.50 V. The values in Data Field are in ascending channel order.

Header Field Data Field
Status LEN Value Channel 0 Value Channel 1
0x00 0x08 0xD0 0x12 0x13 0x00 0xA0 0x25 0x25 0x00
LucidIoCtrl Command Line Tool Example

Read output voltages of channel 0, 1 and 3.
LucidIoCtrl –dCOM4 –c0,1,3 –tV –r [ENTER]
-> CH0:1.25000 CH1:2.50000 CH3:5.00000


3.3.5 CalibrateIO

This command executes the 0 V output calibration of an analog output.

Command CalibrateIo Access
Opcode 0x52  
LucidIoControl Command Line Tool
Call LucidIoCtrl –d[COMx] –c[Channel] –a {--quiet} {–p}

Request Frame

OPC P1 P2 LEN
0x52 Channel 0x00 0x00
Value Description
Channel Number of input channel (Range: 0 ~ 3)

<u”>Response Frame

Status LEN
Status 0x00

The command does not return any data.

In the case of an error the command returns Execution Status Code.


3.4 Parameters

LucidControl modules allow configuration by a set of System Configuration Parameters and IO Configuration Parameters.

The Parameters are accessible by using the SetParam command and GetParam command which are described the genreral LucidControl documentation.


3.4.1 outAnValue

This IO Configuration Parameter represents the voltage value of the analog output.

Parameter outAnValue Access Read / Write
Address 0x1000
Values Voltage in 1 µV resolution
Default Value 0x00 Parameter Type 4 bytes signed
LucidIoControl Command Line Tool
Parameter Name outAnValue Parameter Values -100,000,000 µV ~
100,000,000 µV
Call (Set) LucidIoCtrl –d[COMx] –c[Channel] –soutAnValue[=Value] {-p} {--default}
Call (Get) LucidIoCtrl –d[COMx] –c[Channel] –goutAnValue
LucidIoCtrl Command Line Tool Example

Set output voltage of channel 0 to 5 V and make the setting persistent.
LucidIoCtrl –dCOM4 –c0 –soutAnValue=5000000 –p [ENTER]

Read output voltage of channel 0 (value is 5 V).
LucidIoCtrl –dCOM4 –c0 –goutAnValue [ENTER]
-> outAnValue=5000000

By using outAnValue an output voltage can be made persistent. In this case the stored voltage level is restored after a restart of the module.

Note
For normal operation it is recommended to use the functions SetIo and GetIo in order to access the output channel value.


3.4.2 outAnMode

This IO Configuration Parameter configures the operation mode of the output.

Parameter outAnMode Access Read / Write
Address 0x1100
Values

Output Mode

Byte Mode
0x00 Inactive
0x01 Standard
Default Value standard Parameter Type 1 byte unsigned
LucidIoControl Command Line Tool
Parameter Name outAnMode Parameter Values inactive / standard
Call (Set) LucidIoCtrl –d[COMx] –c[Channel] –soutAnMode=[Mode] {-p} {--default}
Call (Get) LucidIoCtrl –d[COMx] –c[Channel] –goutAnMode
LucidIoCtrl Command Line Tool Example

Set operation mode of output channel 0 to Standard Mode and make the setting persistent.
LucidIoCtrl –dCOM4 –c0 –soutAnMode=standard –p [ENTER]

Read the operation mode of input channel 0.
LucidIoCtrl –dCOM4 –c0 –goutAnMode [ENTER]
-> outAnMode=standard


3.4.3 outAnRefreshInterval

This IO Configuration Parameter configures the output refresh interval TInterval.

Parameter outAnRefreshInterval Access Read / Write
Address 0x1111
Values TInterval in µs (micro seconds)
1 ms ≤ TInterval ≤ 100 ms
Default Value 10 ms Parameter Type 4 bytes unsigned
LucidIoControl Command Line Tool
Parameter Name outAnRefreshInterval Parameter Values Time [µs]
Call (Set) LucidIoCtrl –d[COMx] –c[Channel] –soutAnRefreshInterval=[Time] {-p} {--default}
Call (Get) LucidIoCtrl –d[COMx] –c[Channel] –goutAnRefreshInterval
LucidIoCtrl Command Line Tool Example

Set TInterval of output channel 0 to 20 ms and make the setting persistent.
LucidIoCtrl –dCOM4 –c0 –soutAnRefreshInterval=20000 –p [ENTER]

Read TInterval parameter of input channel 0.
LucidIoCtrl –dCOM4 –c0 –goutAnRefreshInteral[ENTER]
-> outAnRefreshInterval=20000


3.4.4 outAnRefreshTime

This IO Configuration Parameter configures the output refresh interval TRefresh.

Parameter outAnRefreshTime Access Read / Write
Address 0x1113
Values TRefresh in µs (micro seconds)
0.1 ms ≤ TRefresh ≤ 10 ms
Default Value 1 ms Parameter Type 4 bytes unsigned
LucidIoControl Command Line Tool
Parameter Name outAnRefreshTime Parameter Values Time [µs]
Call (Set) LucidIoCtrl –d[COMx] –c[Channel] –soutAnRefrehTime=[Time] {-p} {--default}
Call (Get) LucidIoCtrl –d[COMx] –c[Channel] –goutAnRefreshTime
LucidIoCtrl Command Line Tool Example

Set TRefresh of output channel 0 to 5 ms and make the setting persistent.
LucidIoCtrl –dCOM4 –c0 –soutAnRefreshTime=5000 –p [ENTER]

Read TRefresh parameter of input channel 0.
LucidIoCtrl –dCOM4 –c0 –goutAnRefreshTime[ENTER]
-> outAnRefreshTime=5000


3.4.5 outAnSetupTime

This IO Configuration Parameter configures the output refresh interval TSetup.

Parameter outAnSetupTime Access Read / Write
Address 0x1112
Values TSetup in µs (micro seconds)
0.1 ms ≤ TRefresh ≤ 10 ms
Default Value 1 ms Parameter Type 4 bytes unsigned
LucidIoControl Command Line Tool
Parameter Name outAnSetupTime Parameter Values Time [µs]
Call (Set) LucidIoCtrl –d[COMx] –c[Channel] –soutAnSetupTime=[Time] {-p} {--default}
Call (Get) LucidIoCtrl –d[COMx] –c[Channel] –goutAnSetupTime
LucidIoCtrl Command Line Tool Example

Set TSetup of output channel 0 to 1.5 ms and make the setting persistent.
LucidIoCtrl –dCOM4 –c0 –soutAnSetupTime=1500 –p [ENTER]

Read TSetup parameter of input channel 0.
LucidIoCtrl –dCOM4 –c0 –goutAnSetupTime[ENTER]
-> outAnSetupTime=1500


3.4.6 outAnOffset

This IO Configuration Parameter configures the output offset compensation value.

Parameter outAnOffset Access Read / Write
Address 0x1120
Values Offset Compensation in 1 mV steps (-3 V ~ 3 V)
-3,000 ~ 3,000
Default Value 0 Parameter Type 2 bytes signed
LucidIoControl Command Line Tool
Parameter Name outAnOffset Parameter Values Voltage [1mV]
Call (Set) LucidIoCtrl –d[COMx] –c[Channel] –soutAnOffset=[Value] {-p} {--default}
Call (Get) LucidIoCtrl –d[COMx] –c[Channel] –goutAnOffset
LucidIoCtrl Command Line Tool Example

Set output offset compensation value of output channel 0 to -5 mV and make the setting persistent.
LucidIoCtrl –dCOM4 –c0 –soutAnOffset=-5 –p [ENTER]

Read Offset Compensation value.
LucidIoCtrl –dCOM4 –c0 –goutAnOffset[ENTER]
-> outAnOffset=-5


3.4.7 outAnCal

This IO Configuration Parameter configures the output calibration value.
The value does not have a unit and even if it is possible, it is not recommended to change this value manually.

Parameter outAnCal Access Read / Write
Address 0x1130
Values Output Calibration Value 0 ~ 65,535
Default Value 0 Parameter Type 2 bytes unsigned
LucidIoControl Command Line Tool
Parameter Name outAnCal Parameter Values  
Call (Set) LucidIoCtrl –d[COMx] –c[Channel] –soutAnCal=[Value] {-p} {--default}
Call (Get) LucidIoCtrl –d[COMx] –c[Channel] –goutAnCal

Previous Top Next
2 >Setup and Installation LucidControl USB Analog Output Module Content 4 Specification