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 Shell API bindings for the Industrial Analog Out Bricklet. General information and technical specifications for the Industrial Analog Out Bricklet are summarized in its hardware description.
An installation guide for the Shell API bindings is part of their general description.
The example code below is Public Domain (CC0 1.0).
Download (example-simple-current.sh)
1 2 3 4 5 6 7 8 | #!/bin/sh
# connects to localhost:4223 by default, use --host and --port to change it
# change to your UID
uid=XYZ
# set a current of 4.5mA
tinkerforge call industrial-analog-out-bricklet $uid set-current 4500
|
Download (example-simple-voltage.sh)
1 2 3 4 5 6 7 8 | #!/bin/sh
# connects to localhost:4223 by default, use --host and --port to change it
# change to your UID
uid=XYZ
# set a voltage of 3.3V
tinkerforge call industrial-analog-out-bricklet $uid set-voltage 3300
|
Possible exit codes for all tinkerforge commands are:
The common options of the call and dispatch commands are documented here. The specific command structure is shown below.
Parameters: |
|
---|
The call command is used to call a function of the Industrial Analog Out Bricklet. It can take several options:
Parameters: |
|
---|
The dispatch command is used to dispatch a callback of the Industrial Analog Out Bricklet. It can take several options:
Parameters: |
|
---|
The <function> to be called can take different options depending of its kind. All functions can take the following options:
Getter functions can take the following options:
Setter functions can take the following options:
The --expect-response option for setter functions allows to detect timeouts and other error conditions calls of setters as well. The device will then send a response for this purpose. If this option is not given for a setter function then no response is send and errors are silently ignored, because they cannot be detected.
Parameters: |
|
---|
The <callback> to be dispatched can take several options:
Output: | no output |
---|
Enables the output of voltage and current.
The default is disabled.
Output: | no output |
---|
Disables the output of voltage and current.
The default is disabled.
Output: |
|
---|
Returns true if output of voltage and current is enabled, false otherwise.
Parameters: |
|
---|---|
Output: | no output |
Sets the output voltage in mV.
Output: |
|
---|
Returns the voltage as set by set-voltage.
Parameters: |
|
---|---|
Output: | no output |
Sets the output current in µA.
Output: |
|
---|
Returns the current as set by set-current.
Parameters: |
|
---|---|
Output: | no output |
Configures the voltage and current range.
Possible voltage ranges are:
Possible current ranges are:
The resolution will always be 12 bit. This means, that the precision is higher with a smaller range.
The following symbols are available for this function:
Output: |
|
---|
Returns the configuration as set by set-configuration.
The following symbols are available for this function:
Output: |
|
---|
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 here.