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

From Flowcode Help
Jump to navigationJump to search
Line 15: Line 15:
 
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 Pack==
+
==Component Source Code==
  
FREE
+
Please click here for the component source code: [https://www.flowcode.co.uk/wikicopy/componentsource/FC_Comp_Source_Sim_External_Input.fcfx FC_Comp_Source_Sim_External_Input.fcfx]
  
 
==Detailed description==
 
==Detailed description==
 +
 +
  
  
Line 32: Line 34:
  
 
==Examples==
 
==Examples==
 +
 +
  
  
Line 199: Line 203:
 
|-
 
|-
 
| 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'''
 
|-
 
 
|}
 
|}

Revision as of 17:51, 9 November 2022

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 for the component source code: FC_Comp_Source_Sim_External_Input.fcfx

Detailed description

No detailed description exists yet for this component

Examples

No additional examples


Downloadable macro reference

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


Fc9-comp-macro.png 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. 
Fc9-u32-icon.png - ULONG Return


Fc9-comp-macro.png Set_Space
Overrides the component property setting allowing for a variable frequency input or adjustable Space timings. 
Fc9-u16-icon.png - UINT Delay
Delay between transitiions in milliseconds. 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png 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. 
Fc9-u32-icon.png - ULONG PulseCount
Number of pulses to output 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png Set_Frequency
Allows the frequency to be changed on the fly 
Fc9-f32-icon.png - FLOAT Frequency
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png Set_Mark
Overrides the component property setting allowing for a variable frequency input or adjustable Mark timings. 
Fc9-u16-icon.png - UINT Delay
Delay between transitiions in milliseconds. 
Fc9-void-icon.png - VOID Return



Property reference

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