Jump to content

Component: Simulation External Input (Runtime Tools): Difference between revisions

From Flowcode Help
No edit summary
m Text replacement - "width="90%" style="background-color:#D8C9D8; color:#4B008D;"" to "width="90%" class="mtx-class-macrohead""
 
(15 intermediate revisions by 2 users not shown)
Line 14: Line 14:
==Simulation External Input component==
==Simulation External Input component==
A simulation only component designed to allow a single digital pin to be toggled at a set frequency. Allows things like switch presses or external square waves to be used with the simulation.
A simulation only component designed to allow a single digital pin to be toggled at a set frequency. Allows things like switch presses or external square waves to be used with the simulation.
==Component Source Code==
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_Sim_External_Input.fcfx FC_Comp_Source_Sim_External_Input.fcfx]
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_Sim_External_Input.fcfx FC_Comp_Source_Sim_External_Input.fcfx]


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




Line 26: Line 48:


==Examples==
==Examples==




Line 37: Line 75:




==Downloadable macro reference==


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
 
 
 
 
 
 
 
 
==Macro reference==
 
===Control_Pulse===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Control_Pulse'''
| width="90%" class="mtx-class-macrohead" | '''Control_Pulse'''
|-
|-
| colspan="2" | Controls if the toggle input is enabled or disabled allowing you to stop and start the waveform. 
| colspan="2" | Controls if the toggle input is enabled or disabled allowing you to stop and start the waveform. 
Line 57: Line 106:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===Get_Pulse_Count===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Get_Pulse_Count'''
| width="90%" class="mtx-class-macrohead" | '''Get_Pulse_Count'''
|-
|-
| colspan="2" | Reads the number of pulses remaining in the current run. The Pulse Count property needs to have an initial value > 0 to switch on the pulse counting mode. 
| colspan="2" | Reads the number of pulses remaining in the current run. The Pulse Count property needs to have an initial value > 0 to switch on the pulse counting mode. 
Line 70: Line 120:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===Set_Frequency===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Set_Space'''
| width="90%" class="mtx-class-macrohead" | '''Set_Frequency'''
|-
|-
| colspan="2" | Overrides the component property setting allowing for a variable frequency input or adjustable Space timings. 
| colspan="2" | Allows the frequency to be changed on the fly 
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | Delay
| width="90%" | Frequency
|-
|-
| colspan="2" | Delay between transitiions in milliseconds. 
| colspan="2" |  
|-
|-
| 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 88: Line 139:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===Set_Mark===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Set_Pulse_Count'''
| width="90%" class="mtx-class-macrohead" | '''Set_Mark'''
|-
|-
| colspan="2" | Overrides the number of pulses. The Pulse Count property needs to have an initial value > 0 to switch on the pulse counting mode. 
| colspan="2" | Overrides the component property setting allowing for a variable frequency input or adjustable Mark timings. 
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | PulseCount
| width="90%" | Delay
|-
|-
| colspan="2" | Number of pulses to output 
| colspan="2" | Delay between transitiions in milliseconds. 
|-
|-
| 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 106: Line 158:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===Set_Pulse_Count===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Set_Frequency'''
| width="90%" class="mtx-class-macrohead" | '''Set_Pulse_Count'''
|-
|-
| colspan="2" | Allows the frequency to be changed on the fly 
| colspan="2" | Overrides the number of pulses. The Pulse Count property needs to have an initial value > 0 to switch on the pulse counting mode. 
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| width="90%" | Frequency
| width="90%" | PulseCount
|-
|-
| colspan="2" |  
| colspan="2" | Number of pulses to output 
|-
|-
| 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 124: Line 177:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===Set_Space===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Set_Mark'''
| width="90%" class="mtx-class-macrohead" | '''Set_Space'''
|-
|-
| colspan="2" | Overrides the component property setting allowing for a variable frequency input or adjustable Mark timings. 
| colspan="2" | Overrides the component property setting allowing for a variable frequency input or adjustable Space timings. 
|-
|-
|-
|-
Line 140: Line 194:
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




==Property reference==
==Property reference==


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
| width="90%" class="mtx-class-macrohead" | '''Properties'''  
|-
|-
|-
|-
Line 191: Line 243:
|-
|-
| colspan="2" | Number of pulses to output. 0 = Run forever. > 0 = Output the selected number of pulses 
| colspan="2" | Number of pulses to output. 0 = Run forever. > 0 = Output the selected number of pulses 
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connections'''
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Simulations'''
|-
|}
|}

Latest revision as of 14:23, 13 July 2026

Author Matrix TSL
Version 1.1
Category Runtime Tools


Simulation External Input component

A simulation only component designed to allow a single digital pin to be toggled at a set frequency. Allows things like switch presses or external square waves to be used with the simulation.

Component Source Code

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

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

Detailed description

No detailed description exists yet for this component

Examples

No additional examples







Macro reference

Control_Pulse

Control_Pulse
Controls if the toggle input is enabled or disabled allowing you to stop and start the waveform. 
- BYTE State
0=Disabled, 1=Enabled 
- VOID Return


Get_Pulse_Count

Get_Pulse_Count
Reads the number of pulses remaining in the current run. The Pulse Count property needs to have an initial value > 0 to switch on the pulse counting mode. 
- ULONG Return


Set_Frequency

Set_Frequency
Allows the frequency to be changed on the fly 
- FLOAT Frequency
 
- VOID Return


Set_Mark

Set_Mark
Overrides the component property setting allowing for a variable frequency input or adjustable Mark timings. 
- UINT Delay
Delay between transitiions in milliseconds. 
- VOID Return


Set_Pulse_Count

Set_Pulse_Count
Overrides the number of pulses. The Pulse Count property needs to have an initial value > 0 to switch on the pulse counting mode. 
- ULONG PulseCount
Number of pulses to output 
- VOID Return


Set_Space

Set_Space
Overrides the component property setting allowing for a variable frequency input or adjustable Space timings. 
- UINT Delay
Delay between transitiions in milliseconds. 
- VOID Return


Property reference

Properties
Pin
Pin to toggle - connected to the external waveform on the target hardware. 
Startup Mode
Controls if the pulses start when the simulation is started or when the simulation Control_Pulse macro is called. 
Mode
 
Frequency (Hz)
Frequency to try and acheive. 
Period Delay (ms)
Delay in milliseconds for a whole period of 0 and 1. 
Mark Delay (ms)
Delay in milliseconds to wait to toggle the pin. Note that Windows can only acheive timings of 10ms or more. 
Space Delay (ms)
 
Pulse Count
Number of pulses to output. 0 = Run forever. > 0 = Output the selected number of pulses