The Analog In Universal hardware block allows you to connect a wide range of sensors and other devices to an Interstack’s stack.
It has eight universal analog inputs, each individually configurable for behavior and analog input voltage range plus a mode for 4 – 20mA current loop input. It outputs a 16 bit integer ( 0 to 65,535) representing the input voltage on one of its input channels. There are 10 different input ranges that can be selected, from +/- 0.64V DC all the way to +/- 10V DC (see details below). Sensors and devices often use widely different electrical interfaces. The most popular interfaces for sensors are 0 – 5V DC, 0 – 10V DC, and 4 – 20mA current loop.
There is a ten screw terminal connector on back for connecting wires to the block from the external devices. The connector block can also output 3.3V or 5V for powering an external device.
There are many vendors to purchase sensors that can be connected to Interstacks. Contact us at email@example.com for help.
You can individually change the function of each of the eight inputs of the Analog In Universal hardware block by editing their corresponding property in the “Property Editor” in the bottom right of Stackbuilder.
To set properties in Stackbuilder: Select the Analog In Universal block by clicking on it once. Click in the “Property Editor” in the bottom right, in the “Initial Value” column for the property you want to edit (if a character or string, use quotes). You typically need to set the input channel’s behavior via the HT1_Mode (through HT8_Mode) properties and the input voltage range via the HT1_input_voltage_range (through HT8_input_voltage_range) properties.
Property HT1_Mode specifies the function of input channel 1 (the leftmost connection, looking into the back of the block).
Analog In Universal Connector – Looking into back
DC Out is 3.3V if property V is 1 (default). 5V if property V is 0. Can supply 400 mA.
Analog input signals
For analog input signals, there are a number of signal processing features that can be enabled by setting the property for the I/O pin. The property set to 1 will simply read the input and output a number 0 -65,535 whenever requested by sending any message to the input terminal that corresponds to that pin. If set to 2, the value will be automatically sent if its value changes by greater than the corresponding hysteresis property e.g. ‘HT1_Hysteresis’’. If set to 3, a ‘1’ will be output if the value is greater than the comparison property e.g. ‘HT1_Threshold’. If set to 4, the value will be output every xxxx milliseconds based on the rate property for the pin e.g. ‘HT1_Rate’.
HT1_Mode through HT8_Mode (int): Define behavior of I/O1 – I/O 8
1 Analog input on demand. Output terminal will output an int (0 – 65,535) based on analog voltage of I/O pin when requested by sending any message to the corresponding input terminal.
2 Analog input send change. Will output analog value on any change while filtering based on the value of the HTx_Hysteresis (hysteresis) property for that pin.
3 Analog input with compare. Outputs a ‘1’ on change to above HTx_Threshold property. Outputs a ‘0’ on change to below comparison value property HTx_Threshold for that pin.
4 Analog input, send every x milliseconds based on update rate property HTx_Rate for that pin.
HT1_Hysteresis through HT8_Hysteresis (int): Hysterisis value for analog input send on change. default is 50.
Each input used as analog input has its own hysterisis property, hence HT1_Hysteresis through HT8_Hyesteresis.
If analog input signal is noisy, use a higher value to reduce automatic value update sends.
HT1_Threshold through HT8_Threshold (int): Comparison value for analog input compare mode. default is 32,000.
HT1_Rate through HT8_Rate (int): Update rate, in milliseconds (1000 is 1 second), for analog input update rate mode.
HT1_input_voltage_range through HT8_input_voltage_range: Sets the analog input voltage range or 4 – 20mA input for that channel.
0 Nothing. default
1 0-20mA current loop
6 +/- 10V
7 +/- 5V
8 +/- 2.5V
9 +/- 1.28V
10 +/- 0.64V
Voltage (int): 0 to set external power terminal to 5V. 1 for 3.3V (default).
Type (T) (uuid): Module Type
Version (F) (int): Firmware Version
“Properties” – in (List or Property Name string): To set property. Send property name, Value. For example [’N’,’netname’].
To get property, just send property name. For example. ’N’
“Presponse” – out (List or True) : On set, responds with True when done.
On get, responds with list. For example [’N’, ‘netname’].
Terminals Out 1 – 8. See above description of properties HT1_Mode – HT8_Mode.
If property defines pin as an active analog input, will output integer for pin’s analog value. Outputs an integer number 0 – 65,535.
If analog input with compare, outputs on change character ‘0’ if below compare value and ‘1’ if above.
In HTx_Mode equal to 1, any message to the corresponding input terminal will cause the analog value to be sampled and sent out the output terminal.
Refer to documentation on many other topics at interstacks.com/knowledge-base.
Please email firstname.lastname@example.org with any questions.