Jump to content

Component: DAC (Internal) (Analog Output): Difference between revisions

From Flowcode Help
No edit summary
No edit summary
 
(18 intermediate revisions by the same user not shown)
Line 16: Line 16:


==Detailed description==
==Detailed description==


''No detailed description exists yet for this component''
''No detailed description exists yet for this component''


==Examples==
==Examples==




Line 25: Line 73:




==Downloadable macro reference==


{| 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;" | '''SetOutput'''
|-
| colspan="2" | Sets the output voltage of the DAC 
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | DAC_Value
|-
| colspan="2" | The value to output to the DAC 
|-
| 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''
|}




{| 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;" | '''GetValue'''
|-
| colspan="2" | Gets the Name property value 
|-
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | Name
|-
| colspan="2" | The name of the property 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}




==Macro reference==
===Disable===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
Line 76: Line 103:




===Enable===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
Line 89: Line 117:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===GetList===
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetValue'''
|-
| colspan="2" | Sets the Value for the named property 
|-
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | Name
|-
| colspan="2" | Name of property to update 
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | Value
|-
| colspan="2" | The new value for the property 
|-
| 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''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
Line 130: Line 136:




===GetValue===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetPivotPos'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetValue'''
|-
|-
| colspan="2" | Sets the position of the object the lever rotates around  
| colspan="2" | Gets the Name property value 
|-
|-
|-
|-
| width="10%" align="center" | [[File:]] -  
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | PositionHandle
| width="90%" | Name
|-
|-
| colspan="2" | A handle to the position of the depressed location 
| colspan="2" | The name of the property 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




===SetOutput===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetAutoReset'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetOutput'''
|-
|-
| colspan="2" | Sets the state of the auto-reset flag If the flag is true (it is by default) then Button Helper will reset the state of each button on stop  
| colspan="2" | Sets the output voltage of the DAC 
|-
|-
|-
|-
| width="10%" align="center" | [[File:]] -  
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | State
| width="90%" | DAC_Value
|-
|-
| colspan="2" | Set true to reset to off on sim stop, else false to retain state 
| colspan="2" | The value to output to the DAC 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 166: Line 174:




===SetValue===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetLatching'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetValue'''
|-
|-
| colspan="2" | Sets whether the button is depressed when the mouse is released 
| colspan="2" | Sets the Value for the named property 
|-
|-
| width="10%" align="center" | [[File:]] -
| width="90%" | Enabled
|-
| colspan="2" |  
|-
| 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''
|}
 
 
{| 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;" | '''Unregister'''
|-
| colspan="2" | Removes the object to the list if present 
|-
|-
| width="10%" align="center" | [[File:]] -
| width="90%" | Target
|-
| colspan="2" |  
|-
| 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''
|}
 
 
{| 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;" | '''SetMovementFor'''
|-
| colspan="2" | Sets the movement in units or PI/16 steps for the button 
|-
|-
| width="10%" align="center" | [[File:]] -
| width="90%" | Target
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:]] -
| width="90%" | Move
|-
| colspan="2" | Movement to set to, default 4 
|-
| 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''
|}
 
 
{| 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;" | '''GetList'''
|-
| colspan="2" | Gets Named property List 
|-
|-
|-
|-
Line 236: Line 186:
| width="90%" | Name
| width="90%" | Name
|-
|-
| colspan="2" |  
| colspan="2" | Name of property to update 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| 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;" | '''GetList'''
|-
| colspan="2" | returns Named property list 
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | Name
| width="90%" | Value
|-
|-
| colspan="2" |  
| colspan="2" | The new value for the property 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
| 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''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




Line 280: Line 215:
|-
|-
| colspan="2" | DAC Output Pin 
| colspan="2" | DAC Output Pin 
|-
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| width="90%" | Alt Pin
|-
| colspan="2" |  
|-
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
Line 306: Line 246:
| colspan="2" | Specifies the Resolution per digital bit in terms of Voltage. 
| colspan="2" | Specifies the Resolution per digital bit in terms of Voltage. 
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connections'''
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Simulations'''
|-
|-
|-
|-
Line 319: Line 255:
| colspan="2" | Selects if the scope traces are automatically generated or not 
| colspan="2" | Selects if the scope traces are automatically generated or not 
|}
|}
==Component Source Code==
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_DAC.fcfx FC_Comp_Source_DAC.fcfx]
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_DAC.fcfx FC_Comp_Source_DAC.fcfx]

Latest revision as of 16:45, 25 June 2026

Author Matrix TSL
Version 2.0
Category Analog Output


DAC (Internal) component

Provides access to the onboard digital to analog converter (DAC) peripheral allowing for simple analogue output. Often the DAC output will be very low current and will need amplification using external circuitry to drive anything useful.

Detailed description

No detailed description exists yet for this component

Examples

No additional examples









Macro reference

Disable

Disable
Disables the DAC output. 
- VOID Return


Enable

Enable
Enables the DAC Output. 
- VOID Return


GetList

GetList
 
- STRING Name
 
- STRING Return


GetValue

GetValue
Gets the Name property value 
- STRING Name
The name of the property 
- STRING Return


SetOutput

SetOutput
Sets the output voltage of the DAC 
- UINT DAC_Value
The value to output to the DAC 
- VOID Return


SetValue

SetValue
Sets the Value for the named property 
- STRING Name
Name of property to update 
- STRING Value
The new value for the property 
- VOID Return


Property reference

Properties
Channel
DAC Channel number 
DAC Output Pin
DAC Output Pin 
Alt Pin
 
Vref Option
Selects the maximum reference value for the DAC 
Vref Voltage
Reference Voltage, Used to calculate the Voltage resolution. 
Control Bits
Number of digital control bits 
Resolution
Maximum output resolution based on number of control bits. 
Voltage Resolution
Specifies the Resolution per digital bit in terms of Voltage. 
Simulation
Scope Traces
Selects if the scope traces are automatically generated or not 

Component Source Code

Please click here to download the component source project: FC_Comp_Source_DAC.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_DAC.fcfx