..
 #############################################################
 # This file was automatically generated on 2015-05-08.      #
 #                                                           #
 # If you have a bugfix for this file and want to commit it, #
 # please fix the bug in the generator. You can find a link  #
 # to the generators git repository on tinkerforge.com       #
 #############################################################

:orphan:
:breadcrumbs: <a href="../../index.html">Home</a> / <a href="../../index.html#software-modbus">Software</a> / Modbus - Industrial Analog Out Bricklet

.. |device_identifier_constant| unicode:: 0xA0
   :trim:

.. _industrial_analog_out_bricklet_modbus:

Modbus - Industrial Analog Out Bricklet
=======================================

.. note::
 This Bricklet is currently in the prototype stage and the software/hardware
 as well as the documentation is in an incomplete state.


This is the description of the :ref:`Modbus protocol <llproto_modbus>` for the :ref:`Industrial Analog Out Bricklet <industrial_analog_out_bricklet>`. General information and technical
specifications for the Industrial Analog Out Bricklet are summarized in its :ref:`hardware description
<industrial_analog_out_bricklet_description>`.

.. _industrial_analog_out_bricklet_modbus_api:

API
---

A general description of the Modbus protocol structure can be found
:ref:`here <llproto_modbus>`.




Basic Functions
^^^^^^^^^^^^^^^



.. modbus:function:: BrickletIndustrialAnalogOut.enable

 :functionid: 1
 :emptyrequest: empty payload

 :noresponse: no response

 Enables the output of voltage and current.
 
 The default is disabled.
 
.. modbus:function:: BrickletIndustrialAnalogOut.disable

 :functionid: 2
 :emptyrequest: empty payload

 :noresponse: no response

 Disables the output of voltage and current.
 
 The default is disabled.
 
.. modbus:function:: BrickletIndustrialAnalogOut.is_enabled

 :functionid: 3
 :emptyrequest: empty payload

 :response enabled: bool

 Returns *true* if output of voltage and current is enabled, *false* otherwise.
 
.. modbus:function:: BrickletIndustrialAnalogOut.set_voltage

 :functionid: 4
 :request voltage: uint16

 :noresponse: no response

 Sets the output voltage in mV.
 
.. modbus:function:: BrickletIndustrialAnalogOut.get_voltage

 :functionid: 5
 :emptyrequest: empty payload

 :response voltage: uint16

 Returns the voltage as set by :modbus:func:`set_voltage <BrickletIndustrialAnalogOut.set_voltage>`.
 
.. modbus:function:: BrickletIndustrialAnalogOut.set_current

 :functionid: 6
 :request current: uint16

 :noresponse: no response

 Sets the output current in µA.
 
.. modbus:function:: BrickletIndustrialAnalogOut.get_current

 :functionid: 7
 :emptyrequest: empty payload

 :response current: uint16

 Returns the current as set by :modbus:func:`set_current <BrickletIndustrialAnalogOut.set_current>`.
 


Advanced Functions
^^^^^^^^^^^^^^^^^^

.. modbus:function:: BrickletIndustrialAnalogOut.set_configuration

 :functionid: 8
 :request voltage_range: uint8
 :request current_range: uint8

 :noresponse: no response

 Configures the voltage and current range.
 
 Possible voltage ranges are:
 
 * 0V to 5V
 * 0V to 10V
 
 Possible current ranges are:
 
 * 4mA to 20mA
 * 0mA to 20mA
 * 0mA to 24mA
 
 The resolution will always be 12 bit. This means, that the
 precision is higher with a smaller range.
 
.. modbus:function:: BrickletIndustrialAnalogOut.get_configuration

 :functionid: 9
 :emptyrequest: empty payload

 :response voltage_range: uint8
 :response current_range: uint8

 Returns the configuration as set by :modbus:func:`set_configuration <BrickletIndustrialAnalogOut.set_configuration>`.
 
.. modbus:function:: BrickletIndustrialAnalogOut.get_identity

 :functionid: 255
 :emptyrequest: empty payload

 :response uid: char[8]
 :response connected_uid: char[8]
 :response position: char
 :response hardware_version: uint8[3]
 :response firmware_version: uint8[3]
 :response device_identifier: uint16

 Returns the UID, the UID where the Bricklet is connected to, 
 the position, the hardware and firmware version as well as the
 device identifier.
 
 The position can be 'a', 'b', 'c' or 'd'.
 
 The device identifier numbers can be found :ref:`here <device_identifier>`.
 |device_identifier_constant|
 


