Jump to content

Component: MIAC Basic (MIAC: Addon Modules): Difference between revisions

From Flowcode Help
XML import
 
No edit summary
Line 1: Line 1:
 
{| style="width:50%"
 
{| width="50%"
|-
|-
| width="20%" style="color: gray;" | Author
| width="20%" style="color:gray;" | Author
| [http://www.matrixtsl.com Matrix TSL]
|  
|-
|-
| width="20%" style="color: gray;" | Version
| width="20%" style="color:gray;" | Version
| 1.0 (Release)
| 1.0
|-
|-
| width="20%" style="color: gray;" | Category
| width="20%" style="color:gray;" | Category
| MIAC: Addon Modules
| MIAC: Addon Modules
|}
|}




 
==MIAC Basic component==
==[[File:Component Icon 8c6ad2c7_f4a7_4584_a376_ec7fed05e5d3.png|Image]] MIAC Basic component==
Basic Addon expansion module for MIAC System
Basic Addon expansion module for MIAC System


==Examples==
==Component Pack==
''<span style="color:red;">No additional examples</span>''


FREE


==Downloadable macro reference==
==Detailed description==


===<span style="font-weight: normal;"><u><tt>PWM_Enable</tt></u></span>===
''No detailed description exists yet for this component''
Enable the PWM on Channel 1 or 2


'''Parameters'''
==Examples==


:[[Variable Types|BYTE]] ''Channel''
::PWM Channel 1 or 2


''<span style="color:red;">No additional examples</span>''


'''Return value'''


:''This call does not return a value''
==Downloadable 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;" | '''PWM_Enable'''
|-
| colspan="2" | Enable the PWM on Channel 1 or 2&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | PWM Channel 1 or 2&nbsp;
|-
| 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''
|}


===<span style="font-weight: normal;"><u><tt>LED_Control</tt></u></span>===
Sets the indicator LED On (State=1) or Off (State=0)


'''Parameters'''
{| 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;" | '''MIAC_Module_SetData'''
|-
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Count
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | D0
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | D1
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | D2
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | D3
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | D4
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | D5
|-
| colspan="2" | &nbsp;
|-
| 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''
|}


:[[Variable Types|BYTE]] ''State''


{| 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;" | '''MIAC_Module_Init'''
|-
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | CAN_ID
|-
| colspan="2" | &nbsp;
|-
| 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''
|}


'''Return value'''


:''This call does not return a value''
{| 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;" | '''MIAC_Module_GetData'''
|-
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Index
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}




===<span style="font-weight: normal;"><u><tt>PWM_Disable</tt></u></span>===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
Disable the PWM on Channel 1 or 2
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MIAC_Module_Message'''
|-
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | CAN_ID
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | CMD_ID
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


'''Parameters'''


:[[Variable Types|BYTE]] ''Channel''
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
::PWM Channel 1 or 2
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''LED_Control'''
|-
| colspan="2" | Sets the indicator LED On (State=1) or Off (State=0)&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | State
|-
| colspan="2" | &nbsp;
|-
| 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''
|}




'''Return value'''
{| 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;" | '''MIAC_Module_PushData'''
|-
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Data
|-
| colspan="2" | &nbsp;
|-
| 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''
|}


:''This call does not return a value''


{| 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;" | '''PWM_Disable'''
|-
| colspan="2" | Disable the PWM on Channel 1 or 2&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | PWM Channel 1 or 2&nbsp;
|-
| 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''
|}


===<span style="font-weight: normal;"><u><tt>DigitalOutput</tt></u></span>===
Set a Terminal Output to High (Value=1) or Low (Value=0)


'''Parameters'''
{| 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;" | '''DigitalOutput'''
|-
| colspan="2" | Set a Terminal Output to High (Value=1) or Low (Value=0)&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Terminal
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Value
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


:[[Variable Types|BYTE]] ''Terminal''


:[[Variable Types|BYTE]] ''Value''
{| 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;" | '''AnalogInput'''
|-
| colspan="2" | Read the ADC value of a Terminal Returns 12 bit ADC reading&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Terminal
|-
| colspan="2" | Terminal number to be read&nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}




'''Return value'''
{| 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;" | '''Initialize'''
|-
| colspan="2" | Forces a software reset on the module&nbsp;
|-
|-
| 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''
|}


:[[Variable Types|BYTE]]


{| 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;" | '''PWM_SetDuty'''
|-
| colspan="2" | Sets the PWM Duty cycle on Channel 1 or 2&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | PWM Channel 1 or 2&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Duty
|-
| colspan="2" | Duty cycle (8 bit value)&nbsp;
|-
| 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''
|}


===<span style="font-weight: normal;"><u><tt>AnalogInput</tt></u></span>===
Read the ADC value of a Terminal
Returns 12 bit ADC reading
'''Parameters'''
:[[Variable Types|BYTE]] ''Terminal''
::Terminal number to be read
'''Return value'''
:[[Variable Types|UINT]]
===<span style="font-weight: normal;"><u><tt>Initialize</tt></u></span>===
Forces a software reset on the module
'''Parameters'''
:''This macro has no parameters''
'''Return value'''
:''This call does not return a value''
===<span style="font-weight: normal;"><u><tt>PWM_SetDuty</tt></u></span>===
Sets the PWM Duty cycle on Channel 1 or 2
'''Parameters'''
:[[Variable Types|BYTE]] ''Channel''
::PWM Channel 1 or 2
:[[Variable Types|BYTE]] ''Duty''
::Duty cycle (8 bit value)
'''Return value'''
:''This call does not return a value''
===<span style="font-weight: normal;"><u><tt>DigitalInput</tt></u></span>===
Read the value of a terminal
'''Parameters'''
:[[Variable Types|BYTE]] ''Terminal''


{| 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;" | '''DigitalInput'''
|-
| colspan="2" | Read the value of a terminal &nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Terminal
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


'''Return value'''


:[[Variable Types|BYTE]]
==Simulation macro reference==
''This component does not contain any simulation macros''




==Property reference==
==Property reference==
<span style="font-weight: normal;"><u>Module Type</u></span>


This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''MODULE_TYPE''.
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
''<span style="color:red;">No additional information</span>''
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
 
|-
 
|-
<span style="font-weight: normal;"><u>Module Address</u></span>
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="90%" | Module Type
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''ORDINAL''.
|-
 
| colspan="2" | &nbsp;
''<span style="color:red;">No additional information</span>''
|-
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="90%" | Module Address
 
|-
<span style="font-weight: normal;"><u>Period Overflow</u></span>
| colspan="2" | &nbsp;
 
|-
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''PERIOD''.
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 
| width="90%" | Period Overflow
''<span style="color:red;">No additional information</span>''
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
<span style="font-weight: normal;"><u>Prescaler</u></span>
| width="90%" | Prescaler
 
|-
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''PRESCALER''.
| colspan="2" | &nbsp;
 
|-
''<span style="color:red;">No additional information</span>''
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
 
| width="90%" | Frequency (KHz)
 
|-
 
| colspan="2" | &nbsp;
<span style="font-weight: normal;"><u>Frequency (KHz)</u></span>
|-
 
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
This property is of type ''Floating point'' and can be referenced with the variable name ''PWM_FREQ''.
| width="90%" | Period (uS)
 
|-
''<span style="color:red;">No additional information</span>''
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connections'''  
<span style="font-weight: normal;"><u>Period (uS)</u></span>
|-
 
|-
This property is of type ''Floating point'' and can be referenced with the variable name ''PWM_PERIOD''.
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Simulations'''
''<span style="color:red;">No additional information</span>''
|-
|}

Revision as of 16:20, 7 January 2022

Author
Version 1.0
Category MIAC: Addon Modules


MIAC Basic component

Basic Addon expansion module for MIAC System

Component Pack

FREE

Detailed description

No detailed description exists yet for this component

Examples

No additional examples


Downloadable macro reference

PWM_Enable
Enable the PWM on Channel 1 or 2 
- BYTE Channel
PWM Channel 1 or 2 
- VOID Return


MIAC_Module_SetData
 
- BYTE Count
 
- BYTE D0
 
- BYTE D1
 
- BYTE D2
 
- BYTE D3
 
- BYTE D4
 
- BYTE D5
 
- VOID Return


MIAC_Module_Init
 
- UINT CAN_ID
 
- VOID Return


MIAC_Module_GetData
 
- BYTE Index
 
- BYTE Return


MIAC_Module_Message
 
- UINT CAN_ID
 
- UINT CMD_ID
 
- BYTE Return


LED_Control
Sets the indicator LED On (State=1) or Off (State=0) 
- BYTE State
 
- VOID Return


MIAC_Module_PushData
 
- BYTE Data
 
- VOID Return


PWM_Disable
Disable the PWM on Channel 1 or 2 
- BYTE Channel
PWM Channel 1 or 2 
- VOID Return


DigitalOutput
Set a Terminal Output to High (Value=1) or Low (Value=0) 
- BYTE Terminal
 
- BYTE Value
 
- BYTE Return


AnalogInput
Read the ADC value of a Terminal Returns 12 bit ADC reading 
- BYTE Terminal
Terminal number to be read 
- UINT Return


Initialize
Forces a software reset on the module 
- VOID Return


PWM_SetDuty
Sets the PWM Duty cycle on Channel 1 or 2 
- BYTE Channel
PWM Channel 1 or 2 
- BYTE Duty
Duty cycle (8 bit value) 
- VOID Return


DigitalInput
Read the value of a terminal  
- BYTE Terminal
 
- BYTE Return



Property reference

Properties
Module Type
 
Module Address
 
Period Overflow
 
Prescaler
 
Frequency (KHz)
 
Period (uS)
 
Connections
Simulations