Analog OutputHardware UCMVirtual UCM
The analogout library provides an interface for controlling analog outputs.
The analogout library is available for:
- ENP-AO4, using 4 hardware ports for voltage output,
- ENP-AO6 M2, using 6 hardware ports for voltage and amperage output.
analogout.new
-- @param connection_uri string Connection URI
-- @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.
Use port schema to access hardware ports.
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.