Component: Simulation External Input (Simulation)

From Flowcode Help
Jump to navigationJump to search


Author Matrix TSL
Version 1.0 (Release)
Category Simulation


Image 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.

Examples

No additional examples


Downloadable macro reference

This component does not contain any downloadable macros

Simulation macro reference

Control_Pulse

Controls if the toggle input is enabled or disabled allowing you to stop and start the waveform.

Parameters

BYTE State
0=Disabled, 1=Enabled


Return value

This call does not return a value


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.

Parameters

This macro has no parameters


Return value

ULONG


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.

Parameters

ULONG PulseCount
Number of pulses to output


Return value

This call does not return a value


Set_Space

Overrides the component property setting allowing for a variable frequency input

or adjustable Space timings.

Parameters

UINT Delay
Delay between transitiions in milliseconds.


Return value

This call does not return a value


Set_Mark

Overrides the component property setting allowing for a variable frequency input

or adjustable Mark timings.

Parameters

UINT Delay
Delay between transitiions in milliseconds.


Return value

This call does not return a value



Property reference

Pin

This property is of type Single digital pin and can be referenced with the variable name Pin.

Pin to toggle - connected to the external waveform on the target hardware.

Startup Mode

This property is of type Fixed list of ints and can be referenced with the variable name StartupMode.

Controls if the pulses start when the simulation is started or when the simulation Control_Pulse macro is called.

Mode

This property is of type Fixed list of ints and can be referenced with the variable name Mode.

No additional information


Frequency (Hz)

This property is of type Floating point and can be referenced with the variable name Frequency.

Frequency to try and acheive.

Period Delay (ms)

This property is of type Unsigned integer and can be referenced with the variable name Period.

Delay in milliseconds for a whole period of 0 and 1.

Mark Delay (ms)

This property is of type Unsigned integer and can be referenced with the variable name DelayMark.

Delay in milliseconds to wait to toggle the pin.

Note that Windows can only acheive timings of 10ms or more.

Space Delay (ms)

This property is of type Unsigned integer and can be referenced with the variable name DelaySpace.

No additional information


Pulse Count

This property is of type Unsigned integer and can be referenced with the variable name PulseCount.

Number of pulses to output.

0 = Run forever.

> 0 = Output the selected number of pulses