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.
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Downloadable macro reference
|
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
|
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_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
|
|
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_Frequency
|
Allows the frequency to be changed on the fly
|
[[File:]] -
|
Frequency
|
|
- VOID
|
Return
|
|
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
|
|
SetFlowControl
|
Allows the Flowcontrol signals to be enabled or disabled.
|
- BYTE
|
State
|
A value of 0 disables flow control, 1 or above willl enable flow control.
|
- VOID
|
Return
|
|
OpenPort
|
Opens the currently selected COM port, allowing data to be sent and received.
|
- VOID
|
Return
|
|
SetProp
|
Allows the COM port property to be set from a parent component.
|
- STRING
|
PropName
|
|
- ULONG
|
PropVal
|
|
- VOID
|
Return
|
|
GetProp
|
Allows the property filter for the COM port list to be copied to a parent component.
|
- STRING
|
PropName
|
|
- STRING
|
Return
|
|
GetConsoleHandle
|
Gets the handle to the console allowing data displaying on the panel etc.
|
[[File:]] -
|
Return
|
|
SendByteArray
|
Sends an array of bytes to the COM port.
|
- BYTE
|
Data
|
Data byte array to send
|
- UINT
|
Length
|
Number of bytes to send
|
- VOID
|
Return
|
|
ReceiveBinary16Bit
|
Receives a binary 16-bit value split across two bytes.
|
[[File:]] -
|
MSBfirst
|
0=Least significant byte first, 1=Most significant byte first
|
- BYTE
|
Timeout
|
Max amount of time in ms to wait between bytes
|
- UINT
|
Return
|
|
ReceiveFloat
|
Attempts to receive a floating point number as ASCII characters and convert back into a numeric value. Note this function will receive until a timeout or a none numeric char is received, the none numeric char will be lost.
|
- BYTE
|
Timeout
|
Max time in ms to wait in between bytes
|
[[File:]] -
|
IgnoreData
|
0=Dont ignore any data, 1=Ignore any initial none numeric data
|
[[File:]] -
|
Return
|
|
SendFloat
|
Sends out a floating point number as an ASCII String from the UART interface.
|
[[File:]] -
|
Number
|
|
- VOID
|
Return
|
|
SendHexNumber
|
Sends out a number as an ASCII hexadecimal String from the UART interface.
|
- ULONG
|
Number
|
|
- BYTE
|
NumChars
|
Number of characters in the string data, 0 for auto, 2 for 0x00, 4 for 0x0000
|
[[File:]] -
|
Prefix
|
Generate hexadecimal prefix 0x e.g. 1= 0xFF, 0= FF
|
- VOID
|
Return
|
|
SetFlowControl
|
Allows the Flowcontrol signals to be enabled or disabled.
|
- BYTE
|
State
|
A value of 0 disables flow control, 1 or above willl enable flow control.
|
- VOID
|
Return
|
|
OpenPort
|
Opens the currently selected COM port, allowing data to be sent and received.
|
- VOID
|
Return
|
|
ReceiveHexNumber
|
Attempts to receive a hex number as ASCII characters and convert back into a numeric value. Note this function will receive until a timeout or a none hexadecimal char is received, the none numeric char will be lost.
|
- BYTE
|
Timeout
|
Max time in ms to wait in between bytes
|
[[File:]] -
|
IgnoreData
|
0=Dont ignore any data, 1=Ignore any initial none numeric data
|
[[File:]] -
|
Prefix
|
Look for prefix before receiving, 1=0xFF, 0=FF
|
- ULONG
|
Return
|
|
SetProp
|
Allows the COM port property to be set from a parent component.
|
- STRING
|
PropName
|
|
- ULONG
|
PropVal
|
|
- VOID
|
Return
|
|
SendBinary32Bit
|
Sends out a 32-bit binary value split across four bytes.
|
- ULONG
|
Value
|
|
[[File:]] -
|
MSBfirst
|
0=Least significant byte first, 1=Most significant byte first
|
- VOID
|
Return
|
|
SendBinaryFloat
|
Sends out a 32-bit binary floating point value split across four bytes.
|
[[File:]] -
|
Value
|
|
[[File:]] -
|
MSBfirst
|
0=Least significant byte first, 1=Most significant byte first
|
- VOID
|
Return
|
|
GetProp
|
Allows the property filter for the COM port list to be copied to a parent component.
|
- STRING
|
PropName
|
|
- STRING
|
Return
|
|
ReceiveByteArray
|
Attempts to receive an array of bytes using the COM port Returns the number of bytes received.
|
- BYTE
|
Data
|
|
- UINT
|
MaxLength
|
Max number of bytes to try and read
|
- UINT
|
Timeout
|
Time to wait for incoming data in milliseconds
|
- UINT
|
Return
|
|
ReceiveString
|
Attempts to receive an string using the COM port Returns the number of bytes received.
|
- UINT
|
Timeout
|
Time to wait for incoming data in milliseconds
|
- UINT
|
MaxLength
|
Max number of bytes to try and read
|
- STRING
|
Return
|
|
PWMEnable
|
Allows pulse width modulated transistor outputs to be switched on or off. Bit 0 = Enable AB Bit 1 = A / Bit 2 = B Bit 3 = C / Bit 4 = D Bit 5 = Enable CD
|
- BYTE
|
EnableMask
|
Range 0-63 or 0b00000 to 0b111111
|
- VOID
|
Return
|
|
Initialise
|
|
- VOID
|
Return
|
|
GetProp
|
Allows the property filter for the COM port list to be copied to a parent component.
|
- STRING
|
PropName
|
|
- STRING
|
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
|
|
Connections
|
|
Simulations
|