..
 #############################################################
 # 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       #
 #############################################################


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

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

.. _analog_out_bricklet_modbus:

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

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

.. _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:: BrickletAnalogOut.set_voltage

 :functionid: 1
 :request voltage: uint16

 :noresponse: no response

 Sets the voltage in mV. The possible range is 0V to 5V (0-5000).
 Calling this function will set the mode to 0 (see :modbus:func:`set_mode <BrickletAnalogOut.set_mode>`).
 
 The default value is 0 (with mode 1).
 
.. modbus:function:: BrickletAnalogOut.get_voltage

 :functionid: 2
 :emptyrequest: empty payload

 :response voltage: uint16

 Returns the voltage as set by :modbus:func:`set_voltage <BrickletAnalogOut.set_voltage>`.
 
.. modbus:function:: BrickletAnalogOut.set_mode

 :functionid: 3
 :request mode: uint8

 :noresponse: no response

 Sets the mode of the analog value. Possible modes:
 
 * 0: Normal Mode (Analog value as set by :modbus:func:`set_voltage <BrickletAnalogOut.set_voltage>` is applied)
 * 1: 1k Ohm resistor to ground
 * 2: 100k Ohm resistor to ground
 * 3: 500k Ohm resistor to ground
 
 Setting the mode to 0 will result in an output voltage of 0. You can jump
 to a higher output voltage directly by calling :modbus:func:`set_voltage <BrickletAnalogOut.set_voltage>`.
 
 The default mode is 1.
 
.. modbus:function:: BrickletAnalogOut.get_mode

 :functionid: 4
 :emptyrequest: empty payload

 :response mode: uint8

 Returns the mode as set by :modbus:func:`set_mode <BrickletAnalogOut.set_mode>`.
 


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

.. modbus:function:: BrickletAnalogOut.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|
 


