Difference between revisions of "Component: Load Cell (HX711) (Sensors)"
(XML import) |
(XML import) |
||
Line 1: | Line 1: | ||
− | |||
{| width="50%" | {| width="50%" | ||
Line 23: | Line 22: | ||
==Downloadable macro reference== | ==Downloadable macro reference== | ||
+ | |||
+ | ===<span style="font-weight: normal;"><u><tt>SetScaling</tt></u></span>=== | ||
+ | Sets the scaler for the samples to provide a meanningful value. | ||
+ | |||
+ | Default scaler is set to 1.0 | ||
+ | |||
+ | '''Parameters''' | ||
+ | |||
+ | :[[Variable Types|FLOAT]] ''Scaler'' | ||
+ | ::Unity Scale = 1.0 | ||
+ | |||
+ | |||
+ | '''Return value''' | ||
+ | |||
+ | :''This call does not return a value'' | ||
+ | |||
+ | |||
+ | ===<span style="font-weight: normal;"><u><tt>Zero</tt></u></span>=== | ||
+ | Zeros the reading at the current sample | ||
+ | |||
+ | '''Parameters''' | ||
+ | |||
+ | :''This macro has no parameters'' | ||
+ | |||
+ | |||
+ | '''Return value''' | ||
+ | |||
+ | :''This call does not return a value'' | ||
+ | |||
===<span style="font-weight: normal;"><u><tt>Sample</tt></u></span>=== | ===<span style="font-weight: normal;"><u><tt>Sample</tt></u></span>=== | ||
− | + | Allows the HX711 to be directly read using the specified scaling amount. | |
+ | |||
+ | '''Parameters''' | ||
+ | |||
+ | :''This macro has no parameters'' | ||
+ | |||
+ | |||
+ | '''Return value''' | ||
+ | |||
+ | :[[Variable Types|LONG]] | ||
+ | |||
+ | |||
+ | ===<span style="font-weight: normal;"><u><tt>SetSampleCount</tt></u></span>=== | ||
+ | Specifies the number of samples to perform when taking a reading. | ||
+ | |||
+ | The more samples the more filtered the signal will become from high frequency noise. | ||
'''Parameters''' | '''Parameters''' | ||
− | :[[Variable Types| | + | :[[Variable Types|BYTE]] ''NumSamples'' |
− | :: | + | ::Default 1. Range 1-20 |
+ | |||
+ | :[[Variable Types|UINT]] ''Delay'' | ||
+ | ::Time to wait between samples in milliseconds. | ||
+ | |||
− | + | '''Return value''' | |
− | |||
− | : | + | :''This call does not return a value'' |
− | |||
− | |||
− | |||
− | : | + | ===<span style="font-weight: normal;"><u><tt>Initialise</tt></u></span>=== |
− | : | + | Sets up the I/O ready for communications with the HX711 IC and performs an initial sample to set the channel and gain. |
+ | |||
+ | Must be called before calling other HX711 component macros. | ||
+ | |||
+ | '''Parameters''' | ||
+ | |||
+ | :''This macro has no parameters'' | ||
'''Return value''' | '''Return value''' | ||
− | : | + | :''This call does not return a value'' |
Line 57: | Line 106: | ||
==Property reference== | ==Property reference== | ||
− | <span style="font-weight: normal;"><u> | + | <span style="font-weight: normal;"><u>Input Channel</u></span> |
+ | |||
+ | This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''InputChannel''. | ||
+ | |||
+ | Selects which channel to sample A or B. | ||
+ | |||
+ | Gain settings are channel specific. | ||
+ | |||
+ | A Gain can be 128x or 64x | ||
+ | |||
+ | B Gain is fixed at 32x | ||
+ | |||
+ | <span style="font-weight: normal;"><u>Input Gain</u></span> | ||
+ | |||
+ | This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''InputGain''. | ||
+ | |||
+ | Gain settings are channel specific. | ||
+ | |||
+ | A Gain can be 128x or 64x | ||
− | + | B Gain is fixed at 32x | |
− | + | <span style="font-weight: normal;"><u>Data</u></span> | |
+ | This property is of type ''Single digital pin'' and can be referenced with the variable name ''Data''. | ||
+ | Data pin - connected to HX711 Data Out pin. | ||
− | <span style="font-weight: normal;"><u> | + | <span style="font-weight: normal;"><u>Clock</u></span> |
− | This property is of type ''Single digital pin'' and can be referenced with the variable name '' | + | This property is of type ''Single digital pin'' and can be referenced with the variable name ''Clock''. |
− | + | Clock pin - connected to HX711 SCK pin. |
Revision as of 10:26, 7 September 2018
Author | Matrix TSL |
Version | 1.0 (Release) |
Category | Sensors |
Contents
Load Cell (HX711) component
The HX711 load cell amplifier is used to get measurable data out from a load cell or strain gauge.
Examples
No additional examples
Downloadable macro reference
SetScaling
Sets the scaler for the samples to provide a meanningful value.
Default scaler is set to 1.0
Parameters
- FLOAT Scaler
- Unity Scale = 1.0
Return value
- This call does not return a value
Zero
Zeros the reading at the current sample
Parameters
- This macro has no parameters
Return value
- This call does not return a value
Sample
Allows the HX711 to be directly read using the specified scaling amount.
Parameters
- This macro has no parameters
Return value
SetSampleCount
Specifies the number of samples to perform when taking a reading.
The more samples the more filtered the signal will become from high frequency noise.
Parameters
- BYTE NumSamples
- Default 1. Range 1-20
- UINT Delay
- Time to wait between samples in milliseconds.
Return value
- This call does not return a value
Initialise
Sets up the I/O ready for communications with the HX711 IC and performs an initial sample to set the channel and gain.
Must be called before calling other HX711 component macros.
Parameters
- This macro has no parameters
Return value
- This call does not return a value
Simulation macro reference
This component does not contain any simulation macros
Property reference
Input Channel
This property is of type Fixed list of ints and can be referenced with the variable name InputChannel.
Selects which channel to sample A or B.
Gain settings are channel specific.
A Gain can be 128x or 64x
B Gain is fixed at 32x
Input Gain
This property is of type Fixed list of ints and can be referenced with the variable name InputGain.
Gain settings are channel specific.
A Gain can be 128x or 64x
B Gain is fixed at 32x
Data
This property is of type Single digital pin and can be referenced with the variable name Data.
Data pin - connected to HX711 Data Out pin.
Clock
This property is of type Single digital pin and can be referenced with the variable name Clock.
Clock pin - connected to HX711 SCK pin.