Skip to content

Instantly share code, notes, and snippets.

@sampottinger
Forked from anonymous/sample_ljsl.html
Last active December 26, 2015 08:29
Show Gist options
  • Save sampottinger/7122519 to your computer and use it in GitHub Desktop.
Save sampottinger/7122519 to your computer and use it in GitHub Desktop.
<div id="test-section">
<p>An analog input converts a voltage level into a digital value that can be stored and processed in a computer. Why would you want to measure voltages? There are a multitude of sensors available which convert things like temperature, pressure, etc. into voltages. The voltages can then be easily measured by various kinds of hardware, such as a LabJack T7, and then read into a computer. The computer can then convert the voltage value into it's original type (temperature, pressure, etc) and the value can then be stored in a file, emailed to someone, or used to control something else outside of the computer. The T7 exposes analog inputs through MODBUS registers as demonstrated below.</p>
<p>
First, information about configuration:
@registers(AIN Configuration Registers):AIN#(0:10)_RANGE,AIN#(0:10)_NEGATIVE_CH,AIN#(0:10)_RESOLUTION_INDEX
</p>
<p>
Now, information about reading voltage levels:
@registers:AIN#(0:10)
</p>
<p>
And of course...
@registers:DEVICE_NAME_DEFAULT,AIN0
</p>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment