Component: Potentiometer (Analog Input)
Author | Matrix TSL |
Version | 1.0 |
Category | Analog Input |
Contents
Potentiometer component
Component Source Code
Please click here to download the component source project: FC_Comp_Source_Potentiometer.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_Potentiometer.fcfx
Detailed description
No detailed description exists yet for this component
Examples
A simple example that shows how to use some common functions of the potentiometer in conjunction with an LCD.
Filtering ADC Inputs
Simple example which uses a filtering technique to provide a digital low pass filter on the ADC readings. The output of the filter is 50% the ADC reading and 50% the previous reading.
In this example the output of the filter is 25% the ADC reading and 75% the previous reading.
Analogue Inputs Window
The Analogue inputs window available from the View ribbon, allows you to see the values for all of the analogue inputs which are active in your program. They can also be manually altered by dragging the mouse along one of the sliders.
Data Recorder
An ADC based component will automatically add a trace to the data recorder window allowing you to get a view of the analogue data over time during simulation.
Macro reference
GetAverageByte
GetAverageByte | |
Read the ADC as a byte | |
- BYTE | NumSamples |
- BYTE | DelayUs |
- BYTE | Return |
GetAverageInt
GetAverageInt | |
Read the ADC at full bit depth | |
- BYTE | NumSamples |
- BYTE | DelayUs |
- UINT | Return |
GetByte
GetByte | |
Read the ADC as a byte | |
- BYTE | Return |
GetInt
GetInt | |
Read the ADC at full bit depth | |
- UINT | Return |
GetString
GetString | |
Reads the ADC as a direct voltage | |
- STRING | Return |
GetVoltage
GetVoltage | |
Reads the ADC as a direct voltage | |
- FLOAT | Return |