Outdated Information
This online document might be outdated. Please see the LucidControl USB Analog Output Module PDF documentation instead.
3 USB Analog Output Module Operation
The LucidControl AO4 USB Analog Output Module generates 4 independent output voltage signals.

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.

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:
- LucidIoCtrl Commandline Tool (Read Command)
- General Lucid Control Documentation (Implemented Commands)
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 |
|
|||||||||
| 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.
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)
Values can be bitwise combined |
|||||||||||||||
| Value Type |
|
|||||||||||||||
| 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 |
|
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 –rChannels Comma separated list of channels e.g. –c0,1,3 |
||||||
| Return | CHn:VV
|
||||||
Request Frame
| OPC | P1 | P2 | LEN |
|---|---|---|---|
| 0x48 | Channel Mask |
Value Type | 0 |
| Value | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Channel Mask |
Specifies the output channels to access
Values can be bitwise combined |
|||||||||||||||
| Value Type |
|
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
|
||||||||
| 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 |








Leave a Reply
Want to join the discussion?Feel free to contribute!