Difference between revisions of "Component: Infrared (EBM020) (EBM Modules)"

From Flowcode Help
Jump to navigationJump to search
Line 1: Line 1:
 
+
{| style="width:50%"
 
 
{| width="50%"
 
 
|-
 
|-
| width="20%" style="color: gray;" | Author
+
| width="20%" style="color:gray;" | Author
 
| Matrix TSL
 
| Matrix TSL
 
|-
 
|-
| width="20%" style="color: gray;" | Version
+
| width="20%" style="color:gray;" | Version
| 1.0 (Release)
+
| 1.0
 
|-
 
|-
| width="20%" style="color: gray;" | Category
+
| width="20%" style="color:gray;" | Category
 
| EBM Modules
 
| EBM Modules
 
|}
 
|}
  
  
 +
==Infrared component==
 +
The Infrared sensor board contains both an IR transmitter and receiver. The transmitter is enabled via a digital  control signal and the receiver provides an analogue output. By enabling the transmitter and reading the  variable voltage output of the receiver it is possible to measure the distance of a reflecting object in the region  of 1cm to 10cm.
 +
 +
==Component Pack==
 +
 +
SENSORS
 +
 +
==Detailed description==
  
==[[File:Component Icon a6989ec5_8d9b_4c16_b06f_b55394465946.png|Image]] Infrared (EBM020) component==
+
''No detailed description exists yet for this component''
The Infrared sensor board contains both an IR transmitter and receiver. The transmitter is enabled via a digital
 
control signal and the receiver provides an analogue output. By enabling the transmitter and reading the
 
variable voltage output of the receiver it is possible to measure the distance of a reflecting object in the region
 
of 1cm to 10cm.
 
  
 
==Examples==
 
==Examples==
 +
 +
  
 
Sample program using the EBM020 - Infrared sensor.
 
Sample program using the EBM020 - Infrared sensor.
Line 32: Line 36:
 
==Downloadable macro reference==
 
==Downloadable macro reference==
  
===<span style="font-weight: normal;"><u><tt>SetTxOff</tt></u></span>===
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
Turns off the IR Transmitter
+
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetTxOff'''
 +
|-
 +
| colspan="2" | Turns off the IR Transmitter&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
'''Parameters'''
 
  
:''This macro has no parameters''
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetTxOn'''
 +
|-
 +
| colspan="2" | Turns on the IR Transmitter&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
  
'''Return value'''
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetDistanceValue'''
 +
|-
 +
| colspan="2" | Returns the calculated distance for the given ADC reading&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | adc
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
:''This call does not return a value''
 
  
 
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===<span style="font-weight: normal;"><u><tt>SetTxOn</tt></u></span>===
+
|-
Turns on the IR Transmitter
+
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetADCValue'''
'''Parameters'''
+
|-
 
+
| colspan="2" | Gets the raw ADC input value for the IR receiver&nbsp;
:''This macro has no parameters''
+
|-
 
+
|-
 
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
'''Return value'''
+
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
+
|}
:''This call does not return a value''
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>GetDistanceValue</tt></u></span>===
 
Returns the calculated distance for the given ADC reading
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|BYTE]] ''adc''
 
 
 
 
 
'''Return value'''
 
 
 
:[[Variable Types|UINT]]
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>GetADCValue</tt></u></span>===
 
Gets the raw ADC input value for the IR receiver
 
 
 
'''Parameters'''
 
 
 
:''This macro has no parameters''
 
 
 
 
 
'''Return value'''
 
 
 
:[[Variable Types|BYTE]]
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>Initialise</tt></u></span>===
 
Initialise the component by loading the default calibration table
 
 
 
'''Parameters'''
 
 
 
:''This macro has no parameters''
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
  
  
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
 +
|-
 +
| colspan="2" | Initialise the component by loading the default calibration table&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
==Simulation macro reference==
 
  
''This component does not contain any simulation macros''
 
  
  
 
==Property reference==
 
==Property reference==
<span style="font-weight: normal;"><u>Input ADC Channel</u></span>
 
  
This property is of type ''Single analog pin'' and can be referenced with the variable name ''CHANNEL''.
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
+
|-
Analog input channel for the IR receiver
+
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
<span style="font-weight: normal;"><u>Output Enable Pin</u></span>
+
|-
 
+
|-
This property is of type ''Single digital pin'' and can be referenced with the variable name ''CONTROL''.
+
| width="10%" align="center" | [[File:Fc9-type-6-icon.png]]
 
+
| width="90%" | Input ADC Channel
Pin used to control the IR Transmitter
+
|-
 
+
| colspan="2" | Analog input channel for the IR receiver&nbsp;
<span style="font-weight: normal;"><u>Point 1 ADC Value</u></span>
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''P1ADC''.
+
| width="90%" | Output Enable Pin
 
+
|-
The ADC value that would give the Point 1 Distance.
+
| colspan="2" | Pin used to control the IR Transmitter&nbsp;
 
+
|-
If the ADC value is 0 the point is ignored.
+
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 
+
| width="90%" | Point 1 ADC Value
<span style="font-weight: normal;"><u>Point 1 Distance (mm)</u></span>
+
|-
 
+
| colspan="2" | The ADC value that would give the Point 1 Distance. If the ADC value is 0 the point is ignored. &nbsp;
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''P1VALUE''.
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
The distance returned for an ADC reading given by Point 1 ADC value
+
| width="90%" | Point 1 Distance (mm)
 
+
|-
<span style="font-weight: normal;"><u>Point 2 ADC Value</u></span>
+
| colspan="2" | The distance returned for an ADC reading given by Point 1 ADC value&nbsp;
 
+
|-
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''P2ADC''.
+
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 
+
| width="90%" | Point 2 ADC Value
''<span style="color:red;">No additional information</span>''
+
|-
 
+
| colspan="2" | &nbsp;
 
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
<span style="font-weight: normal;"><u>Point 2 Distance (mm)</u></span>
+
| width="90%" | Point 2 Distance (mm)
 
+
|-
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''P2VALUE''.
+
| colspan="2" | &nbsp;
 
+
|-
''<span style="color:red;">No additional information</span>''
+
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 
+
| width="90%" | Point 3 ADC Value
 
+
|-
 
+
| colspan="2" | &nbsp;
<span style="font-weight: normal;"><u>Point 3 ADC Value</u></span>
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''P3ADC''.
+
| width="90%" | Point 3 Distance (mm)
 
+
|-
''<span style="color:red;">No additional information</span>''
+
| colspan="2" | &nbsp;
 
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 
+
| width="90%" | Point 4 ADC Value
<span style="font-weight: normal;"><u>Point 3 Distance (mm)</u></span>
+
|-
 
+
| colspan="2" | &nbsp;
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''P3VALUE''.
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
''<span style="color:red;">No additional information</span>''
+
| width="90%" | Point 4 Distance (mm)
 
+
|-
 
+
| colspan="2" | &nbsp;
 
+
|-
<span style="font-weight: normal;"><u>Point 4 ADC Value</u></span>
+
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
 
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connections'''  
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''P4ADC''.
+
|-
 
+
|-
''<span style="color:red;">No additional information</span>''
+
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
 
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Simulations'''  
 
+
|-
 
+
|}
<span style="font-weight: normal;"><u>Point 4 Distance (mm)</u></span>
 
 
 
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''P4VALUE''.
 
 
 
''<span style="color:red;">No additional information</span>''
 

Revision as of 16:23, 7 January 2022

Author Matrix TSL
Version 1.0
Category EBM Modules


Infrared component

The Infrared sensor board contains both an IR transmitter and receiver. The transmitter is enabled via a digital control signal and the receiver provides an analogue output. By enabling the transmitter and reading the variable voltage output of the receiver it is possible to measure the distance of a reflecting object in the region of 1cm to 10cm.

Component Pack

SENSORS

Detailed description

No detailed description exists yet for this component

Examples

Sample program using the EBM020 - Infrared sensor.

Transmits a signal and determines distance from reflected value

FC6 Icon.png EBM020 Example


Downloadable macro reference

Fc9-comp-macro.png SetTxOff
Turns off the IR Transmitter 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SetTxOn
Turns on the IR Transmitter 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png GetDistanceValue
Returns the calculated distance for the given ADC reading 
Fc9-u8-icon.png - BYTE adc
 
Fc9-u16-icon.png - UINT Return


Fc9-comp-macro.png GetADCValue
Gets the raw ADC input value for the IR receiver 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png Initialise
Initialise the component by loading the default calibration table 
Fc9-void-icon.png - VOID Return



Property reference

Fc9-prop-icon.png Properties
Fc9-type-6-icon.png Input ADC Channel
Analog input channel for the IR receiver 
Fc9-type-5-icon.png Output Enable Pin
Pin used to control the IR Transmitter 
Fc9-type-21-icon.png Point 1 ADC Value
The ADC value that would give the Point 1 Distance. If the ADC value is 0 the point is ignored.  
Fc9-type-21-icon.png Point 1 Distance (mm)
The distance returned for an ADC reading given by Point 1 ADC value 
Fc9-type-21-icon.png Point 2 ADC Value
 
Fc9-type-21-icon.png Point 2 Distance (mm)
 
Fc9-type-21-icon.png Point 3 ADC Value
 
Fc9-type-21-icon.png Point 3 Distance (mm)
 
Fc9-type-21-icon.png Point 4 ADC Value
 
Fc9-type-21-icon.png Point 4 Distance (mm)
 
Fc9-conn-icon.png Connections
Fc9-conn-icon.png Simulations