Difference between revisions of "Component: Simulation External Input (Runtime Tools)"
From Flowcode Help
Jump to navigationJump to searchLine 16: | Line 16: | ||
==Component Source Code== | ==Component Source Code== | ||
+ | |||
+ | Please click here to download the component source project: [https://www.flowcode.co.uk/wikicopy/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] | 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 40: | Line 44: | ||
==Examples== | ==Examples== | ||
+ | |||
+ | |||
Line 62: | Line 68: | ||
==Macro reference== | ==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;" | '''Control_Pulse''' | ||
+ | |- | ||
+ | | colspan="2" | Controls if the toggle input is enabled or disabled allowing you to stop and start the waveform. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | State | ||
+ | |- | ||
+ | | colspan="2" | 0=Disabled, 1=Enabled | ||
+ | |- | ||
+ | | 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;" | '''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. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u32-icon.png]] - ULONG | ||
+ | | 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;" | '''Set_Space''' | ||
+ | |- | ||
+ | | colspan="2" | Overrides the component property setting allowing for a variable frequency input or adjustable Space timings. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | ||
+ | | width="90%" | Delay | ||
+ | |- | ||
+ | | colspan="2" | Delay between transitiions in milliseconds. | ||
+ | |- | ||
+ | | 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;" | '''Set_Pulse_Count''' | ||
+ | |- | ||
+ | | 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-u32-icon.png]] - ULONG | ||
+ | | width="90%" | PulseCount | ||
+ | |- | ||
+ | | colspan="2" | Number of pulses to output | ||
+ | |- | ||
+ | | 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;" | '''Set_Frequency''' | ||
+ | |- | ||
+ | | colspan="2" | Allows the frequency to be changed on the fly | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT | ||
+ | | width="90%" | Frequency | ||
+ | |- | ||
+ | | 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;" | '''Set_Mark''' | ||
+ | |- | ||
+ | | colspan="2" | Overrides the component property setting allowing for a variable frequency input or adjustable Mark timings. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | ||
+ | | width="90%" | Delay | ||
+ | |- | ||
+ | | colspan="2" | Delay between transitiions in milliseconds. | ||
+ | |- | ||
+ | | 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'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ==Property reference== | ||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]] | ||
+ | | width="90%" | Pin | ||
+ | |- | ||
+ | | colspan="2" | Pin to toggle - connected to the external waveform on the target hardware. | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | Startup Mode | ||
+ | |- | ||
+ | | colspan="2" | Controls if the pulses start when the simulation is started or when the simulation Control_Pulse macro is called. | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | Mode | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-15-icon.png]] | ||
+ | | width="90%" | Frequency (Hz) | ||
+ | |- | ||
+ | | colspan="2" | Frequency to try and acheive. | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]] | ||
+ | | width="90%" | Period Delay (ms) | ||
+ | |- | ||
+ | | colspan="2" | Delay in milliseconds for a whole period of 0 and 1. | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]] | ||
+ | | width="90%" | Mark Delay (ms) | ||
+ | |- | ||
+ | | colspan="2" | Delay in milliseconds to wait to toggle the pin. Note that Windows can only acheive timings of 10ms or more. | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]] | ||
+ | | width="90%" | Space Delay (ms) | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]] | ||
+ | | width="90%" | Pulse Count | ||
+ | |- | ||
+ | | colspan="2" | Number of pulses to output. 0 = Run forever. > 0 = Output the selected number of pulses | ||
+ | |}==Macro reference== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
Revision as of 15:24, 20 January 2023
Author | Matrix TSL |
Version | 1.1 |
Category | Runtime Tools |
Contents
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 |
Controls if the toggle input is enabled or disabled allowing you to stop and start the waveform. | |
![]() |
State |
0=Disabled, 1=Enabled | |
![]() |
Return |
![]() |
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. | |
![]() |
Return |
![]() |
Set_Space |
Overrides the component property setting allowing for a variable frequency input or adjustable Space timings. | |
![]() |
Delay |
Delay between transitiions in milliseconds. | |
![]() |
Return |
![]() |
Set_Frequency |
Allows the frequency to be changed on the fly | |
![]() |
Frequency |
![]() |
Return |
![]() |
Set_Mark |
Overrides the component property setting allowing for a variable frequency input or adjustable Mark timings. | |
![]() |
Delay |
Delay between transitiions in milliseconds. | |
![]() |
Return |
Property reference
==Macro reference==
![]() |
Control_Pulse |
Controls if the toggle input is enabled or disabled allowing you to stop and start the waveform. | |
![]() |
State |
0=Disabled, 1=Enabled | |
![]() |
Return |
![]() |
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. | |
![]() |
Return |
![]() |
Set_Space |
Overrides the component property setting allowing for a variable frequency input or adjustable Space timings. | |
![]() |
Delay |
Delay between transitiions in milliseconds. | |
![]() |
Return |
![]() |
Set_Frequency |
Allows the frequency to be changed on the fly | |
![]() |
Frequency |
![]() |
Return |
![]() |
Set_Mark |
Overrides the component property setting allowing for a variable frequency input or adjustable Mark timings. | |
![]() |
Delay |
Delay between transitiions in milliseconds. | |
![]() |
Return |
Property reference
==Macro reference==
![]() |
Control_Pulse |
Controls if the toggle input is enabled or disabled allowing you to stop and start the waveform. | |
![]() |
State |
0=Disabled, 1=Enabled | |
![]() |
Return |
![]() |
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. | |
![]() |
Return |
![]() |
Set_Space |
Overrides the component property setting allowing for a variable frequency input or adjustable Space timings. | |
![]() |
Delay |
Delay between transitiions in milliseconds. | |
![]() |
Return |
![]() |
Set_Frequency |
Allows the frequency to be changed on the fly | |
![]() |
Frequency |
![]() |
Return |
![]() |
Set_Mark |
Overrides the component property setting allowing for a variable frequency input or adjustable Mark timings. | |
![]() |
Delay |
Delay between transitiions in milliseconds. | |
![]() |
Return |