Skip to main content

Analog Output

The analogout library provides an interface for controlling analog outputs.

The analogout library is available for:

analogout.new()

-- @param connection_uri string Connection URI to the analogout device
-- @return object|nil, string|nil
function analogout.new(connection_uri)
end

Creates a new analog output client. The connection URI should specify the desired analog output device.

On success, the function returns a new client object and nil. On failure, it returns nil and an error message string.

client Object

client:set_volts

-- @param voltage number Voltage value to set
-- @return string|nil
function client:set_volts(voltage)
end

Sets the voltage value (in Volts) of the analog output.

On success, the function returns nil. On failure, it returns an error message string.

client:set_amps

Portability

This feature is not available for ENP-AO4. The function always returns an error.

-- @param amperage number Amperage value to set
-- @return string|nil
function client:set_amps(amperage)
end

Sets the amperage value (in Amperes) of the analog output.

On success, the function returns nil. On failure, it returns an error message string.

All Rights Reserved © 2025 Enapter AG.