Jump to content

Component: Timed Event Trigger (Runtime Tools): Difference between revisions

From Flowcode Help
Created page with "{| style="width:50%" |- | width="20%" style="color:gray;" | Author | Matrix TSL |- | width="20%" style="color:gray;" | Version | 1.0 |- | width="20%" style="color:gray..."
 
No edit summary
Line 16: Line 16:


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


''No detailed description exists yet for this component''
''No detailed description exists yet for this component''


==Examples==
==Examples==




Line 564: Line 568:
|-
|-
| colspan="2" | Initialise the comms to the Arduino board ready for commands to be sent. 
| colspan="2" | Initialise the comms to the Arduino board ready for commands to be sent. 
|-
|-
| 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;" | '''PWMEnable'''
|-
| colspan="2" | 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 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | EnableMask
|-
| colspan="2" | Range 0-63 or 0b00000 to 0b111111 
|-
| 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;" | '''Initialise'''
|-
| 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;" | '''LCDClear'''
|-
| colspan="2" | Clears the MIAC display 
|-
|-
| 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;" | '''LCDClear'''
|-
| colspan="2" | Clears the LCD 
|-
|-
|-
|-

Revision as of 10:37, 17 November 2021

Author Matrix TSL
Version 1.0
Category Runtime Tools


Timed Event Trigger component

Component that will check to see if a predetermined amount of time has passed. Useful for doing things on a regular basis, e.g. every minute or every hour.

Detailed description

No detailed description exists yet for this component

Examples

No additional examples


Downloadable macro reference

Reset
Resets the countdown timer 
- VOID Return


SetTimePeriod
Sets the time period in seconds. Ideally this should only be called when the timer is not running. Automatically stops, resets and restarts the timer if already running. 
- ULONG Time
Time period in units specified 
- BYTE Units
0=Seconds, 1=Minutes, 2=Hours 
- VOID Return


Stop
Stops the countdown timer running 
- VOID Return


CheckTrigger
Checks the state of the trigger to determine if the allocated amount of time has passed. Returns true if amount of time has passed, otherwise returns false. 
[[File:]] - Return


Start
Starts the countdown timer running. Automatically performs a reset if the event has already been triggered. 
- VOID Return


PWMDisable
Disable a PWM output 
- BYTE Channel
Range: 0-1 
- VOID Return


I2CStart
Put the I2C Module into Start mode 
- BYTE Channel
Channel Index: Range 0 - I2C Bus Count - 1 
- VOID Return


SPITransfer
Transfer a byte using the SPI bus 
- BYTE Channel
Channel Index: Range 0 - SPI Bus Count - 1 
- BYTE DataOut
 
- BYTE Return


I2CReceive
Receive a byte using the I2C bus 
- BYTE Channel
Channel Index: Range 0 - I2C Bus Count - 1 
[[File:]] - Last
Last byte to receive: Range 0-1 
- BYTE Return


I2CStop
Put the I2C Module into Stop mode 
- BYTE Channel
 
- VOID Return


WIFISetSSID
Assign the SSID and password for the network you wish to connect the board to. Stores the parameters into ROM for later USB free setup. 
- STRING SSID
Name of the network you wish to connect to 
- STRING Password
 
- VOID Return


ServoDisable
Disable a Servo output 
- BYTE Channel
Range: 0-5 
- VOID Return


SPIPrescaler
Modify the speed of the SPI bus 
- BYTE Channel
Channel Index: Range 0 - SPI Bus Count - 1 
- BYTE Prescaler
Range: 0-2 
- VOID Return


ServoEnable
Enable a Servo output 
- BYTE Channel
Range: 0-5 
- VOID Return


ADCSample10
Reads the voltage present on an Alanog pin as an 10-bit value range 0-1023 
- BYTE ADCChannel
Range: 0-5 
- UINT Return


I2CTransSend
Sends an I2C Transaction on the selected I2C channel. Returns the number of bytes sent. 
- BYTE Channel
Channel Index: Range 0 - I2C Bus Count - 1 
- BYTE Data
Data to send 
- UINT Count
Number of bytes to send out, MS bit 0x8000 signifies no Stop if set 
- UINT Return


I2CTransInit
Initialises the I2C Transaction mode with the 7-bit device address 
- BYTE Channel
Channel Index: Range 0 - I2C Bus Count - 1 
- BYTE DeviceAddress
7-bit Device Address 
- BYTE Baud
0=100KHz, 1=400KHz, 2=1MHz 
- VOID Return


IOSetOutputPin
Sets the selected digital pin to an output and assigns the output state. 
- BYTE Pin
Range: 0-17 
[[File:]] - State
Range: 0-1 
- VOID Return


ServoSetPosition8
Sets the position as an 8-bit value 
- BYTE Channel
Range: 0-1 
- BYTE Position
Range: 0-255 
- VOID Return


UARTReceive
Receives a data byte from the UART. Recommend calling the UARTCheckRx function first to ensure data is available. 
- BYTE Channel
Channel Index: Range 0 - UART Bus Count - 1 
- BYTE Return


SPIInitialise
Initialsie the SPI module ready for communications 
- BYTE Channel
Channel Index: Range 0 - SPI Bus Count - 1 
- VOID Return


WIFIGetIP
Gets the IP address of the board. Allows you to setup and get the assigned address via USB before using over WIFI, Use the WIFIIsConnected first to check the WIFI is active.  
- STRING Return


I2CSend
Transmit a byte using the I2C bus 
- BYTE Channel
Channel Index: Range 0 - I2C Bus Count - 1 
- BYTE DataOut
 
[[File:]] - Return


UARTSend
Send a byte via the UART module 
- BYTE Channel
Channel Index: Range 0 - UART Bus Count - 1 
- BYTE Data
Data Byte to send. Range: 0-255 
- VOID Return


PWMSetPrescaler
Sets the prescaler for the PWM output 
- BYTE Prescaler
 
- VOID Return


PWMSetDuty8
Sets the duty for the PWM output 
- BYTE Channel
Range: 0-1 
- BYTE Duty
Range: 0-255 
- VOID Return


PWMEnable
Enable a PWM output 
- BYTE Channel
Range: 0-1 
- VOID Return


Initialise
Initialise the comms to the Arduino board ready for commands to be sent. 
- VOID 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


LCDClear
Clears the MIAC display 
- VOID Return


LCDClear
Clears the LCD 
- VOID Return



Property reference

Properties
Time Period Units
Units of time to wait for 
Time Period Value
Number of time periods to wait before firing 
Call a macro
Decides if a user macro wil be called when the event time period is over. No - requires the use of polling in your application by calling the CheckTrigger component macro. Yes - Automatically calls the selected user macro 
Auto Reset
Yes: Automatically resets and restarts the timer when running and actioned. No: Waits for the user to restart the timer running by calling the Start macro. 
Connections
Simulations