Difference between revisions of "Component: MIAC Basic (MIAC: Addon Modules)"
From Flowcode Help
Jump to navigationJump to search (XML import) |
|||
| (11 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
| − | + | {| style="width:50%" | |
| − | |||
| − | {| | ||
|- | |- | ||
| − | | width="20%" style="color: gray;" | Author | + | | width="20%" style="color:gray;" | Author |
| − | | | + | | |
|- | |- | ||
| − | | width="20%" style="color: gray;" | Version | + | | width="20%" style="color:gray;" | Version |
| − | | 1.0 | + | | 1.0 |
|- | |- | ||
| − | | width="20%" style="color: gray;" | Category | + | | width="20%" style="color:gray;" | Category |
| MIAC: Addon Modules | | MIAC: Addon Modules | ||
|} | |} | ||
| − | + | ==MIAC Basic component== | |
| − | == | ||
Basic Addon expansion module for MIAC System | Basic Addon expansion module for MIAC System | ||
| − | == | + | ==Component Source Code== |
| − | |||
| + | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_ma_basic.fcfx FC_Comp_Source_ma_basic.fcfx] | ||
| − | = | + | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_ma_basic.fcfx FC_Comp_Source_ma_basic.fcfx] |
| − | === | + | ==Detailed description== |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | '' | + | ''No detailed description exists yet for this component'' |
| − | + | ==Examples== | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | ''<span style="color:red;">No additional examples</span>'' | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | === | + | ==Macro reference== |
| − | |||
| − | ''' | + | ===AnalogInput=== |
| + | {| 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 | ||
| + | |- | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | Terminal | ||
| + | |- | ||
| + | | colspan="2" | Terminal number to be read | ||
| + | |- | ||
| + | | 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'' | ||
| + | |} | ||
| − | |||
| − | |||
| − | :[[ | + | ===DigitalInput=== |
| − | + | {| 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 | ||
| + | |- | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | Terminal | ||
| + | |- | ||
| + | | colspan="2" | | ||
| + | |- | ||
| + | | 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 | + | ===DigitalOutput=== |
| + | {| 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) | ||
| + | |- | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | Terminal | ||
| + | |- | ||
| + | | colspan="2" | | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | Value | ||
| + | |- | ||
| + | | colspan="2" | | ||
| + | |- | ||
| + | | 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'' | ||
| + | |} | ||
| − | |||
| + | ===Initialize=== | ||
| + | {| 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 | ||
| + | |- | ||
| + | |- | ||
| + | | 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'' | ||
| + | |} | ||
| − | |||
| − | |||
| − | ''' | + | ===LED_Control=== |
| + | {| 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;" | '''LED_Control''' | ||
| + | |- | ||
| + | | colspan="2" | Sets the indicator LED On (State=1) or Off (State=0) | ||
| + | |- | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | State | ||
| + | |- | ||
| + | | 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'' | ||
| + | |} | ||
| − | |||
| + | ===MIAC_Module_GetData=== | ||
| + | {| 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" | | ||
| + | |- | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | Index | ||
| + | |- | ||
| + | | colspan="2" | | ||
| + | |- | ||
| + | | 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'' | ||
| + | |} | ||
| − | |||
| − | :[[ | + | ===MIAC_Module_Init=== |
| + | {| 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" | | ||
| + | |- | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | ||
| + | | width="90%" | CAN_ID | ||
| + | |- | ||
| + | | 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'' | ||
| + | |} | ||
| + | ===MIAC_Module_Message=== | ||
| + | {| 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_Message''' | ||
| + | |- | ||
| + | | colspan="2" | | ||
| + | |- | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | ||
| + | | width="90%" | CAN_ID | ||
| + | |- | ||
| + | | colspan="2" | | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | ||
| + | | width="90%" | CMD_ID | ||
| + | |- | ||
| + | | colspan="2" | | ||
| + | |- | ||
| + | | 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'' | ||
| + | |} | ||
| − | |||
| − | '' | + | ===MIAC_Module_PushData=== |
| + | {| 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" | | ||
| + | |- | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | Data | ||
| + | |- | ||
| + | | 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'' | ||
| + | |} | ||
| − | == | + | ===MIAC_Module_SetData=== |
| − | + | {| 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" | | ||
| + | |- | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | Count | ||
| + | |- | ||
| + | | colspan="2" | | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | D0 | ||
| + | |- | ||
| + | | colspan="2" | | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | D1 | ||
| + | |- | ||
| + | | colspan="2" | | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | D2 | ||
| + | |- | ||
| + | | colspan="2" | | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | D3 | ||
| + | |- | ||
| + | | colspan="2" | | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | D4 | ||
| + | |- | ||
| + | | colspan="2" | | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | D5 | ||
| + | |- | ||
| + | | 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'' | ||
| + | |} | ||
| − | |||
| − | '' | + | ===PWM_Disable=== |
| + | {| 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 | ||
| + | |- | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | Channel | ||
| + | |- | ||
| + | | colspan="2" | PWM Channel 1 or 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'' | ||
| + | |} | ||
| + | ===PWM_Enable=== | ||
| + | {| 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 | ||
| + | |- | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | Channel | ||
| + | |- | ||
| + | | colspan="2" | PWM Channel 1 or 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'' | ||
| + | |} | ||
| − | |||
| − | + | ===PWM_SetDuty=== | |
| + | {| 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 | ||
| + | |- | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | Channel | ||
| + | |- | ||
| + | | colspan="2" | PWM Channel 1 or 2 | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | Duty | ||
| + | |- | ||
| + | | colspan="2" | Duty cycle (8 bit value) | ||
| + | |- | ||
| + | | 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'' | ||
| + | |} | ||
| − | |||
| + | ==Property reference== | ||
| − | + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |
| − | + | |- | |
| − | + | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] | |
| − | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' | |
| − | + | |- | |
| − | + | |- | |
| − | + | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | |
| − | + | | width="90%" | Module Type | |
| − | + | |- | |
| − | + | | colspan="2" | | |
| − | + | |- | |
| − | + | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | |
| − | + | | width="90%" | Module Address | |
| − | + | |- | |
| − | + | | colspan="2" | | |
| − | + | |- | |
| − | + | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | |
| − | + | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | PWM | |
| − | + | |- | |
| − | + | |- | |
| − | + | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]] | |
| − | + | | width="90%" | Period Overflow | |
| − | + | |- | |
| − | + | | colspan="2" | | |
| − | + | |- | |
| − | + | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | |
| − | + | | width="90%" | Prescaler | |
| − | + | |- | |
| − | + | | colspan="2" | | |
| − | + | |- | |
| + | | width="10%" align="center" | [[File:Fc9-type-15-icon.png]] | ||
| + | | width="90%" | Frequency (KHz) | ||
| + | |- | ||
| + | | colspan="2" | | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-type-15-icon.png]] | ||
| + | | width="90%" | Period (uS) | ||
| + | |- | ||
| + | | colspan="2" | | ||
| + | |} | ||
Latest revision as of 13:13, 7 February 2023
| Author | |
| Version | 1.0 |
| Category | MIAC: Addon Modules |
Contents
MIAC Basic component
Basic Addon expansion module for MIAC System
Component Source Code
Please click here to download the component source project: FC_Comp_Source_ma_basic.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_ma_basic.fcfx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
AnalogInput
| AnalogInput | |
| Read the ADC value of a Terminal Returns 12 bit ADC reading | |
| Terminal | |
| Terminal number to be read | |
| Return | |
DigitalInput
| DigitalInput | |
| Read the value of a terminal | |
| Terminal | |
| Return | |
DigitalOutput
| DigitalOutput | |
| Set a Terminal Output to High (Value=1) or Low (Value=0) | |
| Terminal | |
| Value | |
| Return | |
Initialize
| Initialize | |
| Forces a software reset on the module | |
| Return | |
LED_Control
| LED_Control | |
| Sets the indicator LED On (State=1) or Off (State=0) | |
| State | |
| Return | |
MIAC_Module_GetData
| MIAC_Module_GetData | |
| Index | |
| Return | |
MIAC_Module_Init
| MIAC_Module_Init | |
| CAN_ID | |
| Return | |
MIAC_Module_Message
| MIAC_Module_Message | |
| CAN_ID | |
| CMD_ID | |
| Return | |
MIAC_Module_PushData
| MIAC_Module_PushData | |
| Data | |
| Return | |
MIAC_Module_SetData
| MIAC_Module_SetData | |
| Count | |
| D0 | |
| D1 | |
| D2 | |
| D3 | |
| D4 | |
| D5 | |
| Return | |
PWM_Disable
| PWM_Disable | |
| Disable the PWM on Channel 1 or 2 | |
| Channel | |
| PWM Channel 1 or 2 | |
| Return | |
PWM_Enable
| PWM_Enable | |
| Enable the PWM on Channel 1 or 2 | |
| Channel | |
| PWM Channel 1 or 2 | |
| Return | |
PWM_SetDuty
| PWM_SetDuty | |
| Sets the PWM Duty cycle on Channel 1 or 2 | |
| Channel | |
| PWM Channel 1 or 2 | |
| Duty | |
| Duty cycle (8 bit value) | |
| Return | |
Property reference
| Properties | |
| Module Type | |
| Module Address | |
| PWM | |
| Period Overflow | |
| Prescaler | |
| Frequency (KHz) | |
| Period (uS) | |