Jump to content

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

From Flowcode Help
No edit summary
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder""
 
(7 intermediate revisions by 2 users not shown)
Line 17: Line 17:
==Component Source Code==
==Component Source Code==


Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_temp/ma_basic.fcfx FC_Comp_Source_temp/ma_basic.fcfx]
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_temp/ma_basic.fcfx FC_Comp_Source_temp/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==
==Detailed description==
Line 57: Line 57:


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




Line 68: Line 72:


===AnalogInput===
===AnalogInput===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''AnalogInput'''
| width="90%" class="mtx-class-macrohead" | '''AnalogInput'''
|-
|-
| colspan="2" | Read the ADC value of a Terminal Returns 12 bit ADC reading&nbsp;
| colspan="2" | Read the ADC value of a Terminal Returns 12 bit ADC reading&nbsp;
Line 87: Line 91:


===DigitalInput===
===DigitalInput===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DigitalInput'''
| width="90%" class="mtx-class-macrohead" | '''DigitalInput'''
|-
|-
| colspan="2" | Read the value of a terminal &nbsp;
| colspan="2" | Read the value of a terminal &nbsp;
Line 106: Line 110:


===DigitalOutput===
===DigitalOutput===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DigitalOutput'''
| width="90%" class="mtx-class-macrohead" | '''DigitalOutput'''
|-
|-
| colspan="2" | Set a Terminal Output to High (Value=1) or Low (Value=0)&nbsp;
| colspan="2" | Set a Terminal Output to High (Value=1) or Low (Value=0)&nbsp;
Line 130: Line 134:


===Initialize===
===Initialize===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialize'''
| width="90%" class="mtx-class-macrohead" | '''Initialize'''
|-
|-
| colspan="2" | Forces a software reset on the module&nbsp;
| colspan="2" | Forces a software reset on the module&nbsp;
Line 144: Line 148:


===LED_Control===
===LED_Control===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''LED_Control'''
| width="90%" class="mtx-class-macrohead" | '''LED_Control'''
|-
|-
| colspan="2" | Sets the indicator LED On (State=1) or Off (State=0)&nbsp;
| colspan="2" | Sets the indicator LED On (State=1) or Off (State=0)&nbsp;
Line 163: Line 167:


===MIAC_Module_GetData===
===MIAC_Module_GetData===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MIAC_Module_GetData'''
| width="90%" class="mtx-class-macrohead" | '''MIAC_Module_GetData'''
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
Line 182: Line 186:


===MIAC_Module_Init===
===MIAC_Module_Init===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MIAC_Module_Init'''
| width="90%" class="mtx-class-macrohead" | '''MIAC_Module_Init'''
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
Line 201: Line 205:


===MIAC_Module_Message===
===MIAC_Module_Message===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MIAC_Module_Message'''
| width="90%" class="mtx-class-macrohead" | '''MIAC_Module_Message'''
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
Line 225: Line 229:


===MIAC_Module_PushData===
===MIAC_Module_PushData===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MIAC_Module_PushData'''
| width="90%" class="mtx-class-macrohead" | '''MIAC_Module_PushData'''
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
Line 244: Line 248:


===MIAC_Module_SetData===
===MIAC_Module_SetData===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MIAC_Module_SetData'''
| width="90%" class="mtx-class-macrohead" | '''MIAC_Module_SetData'''
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
Line 293: Line 297:


===PWM_Disable===
===PWM_Disable===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PWM_Disable'''
| width="90%" class="mtx-class-macrohead" | '''PWM_Disable'''
|-
|-
| colspan="2" | Disable the PWM on Channel 1 or 2&nbsp;
| colspan="2" | Disable the PWM on Channel 1 or 2&nbsp;
Line 312: Line 316:


===PWM_Enable===
===PWM_Enable===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PWM_Enable'''
| width="90%" class="mtx-class-macrohead" | '''PWM_Enable'''
|-
|-
| colspan="2" | Enable the PWM on Channel 1 or 2&nbsp;
| colspan="2" | Enable the PWM on Channel 1 or 2&nbsp;
Line 331: Line 335:


===PWM_SetDuty===
===PWM_SetDuty===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PWM_SetDuty'''
| width="90%" class="mtx-class-macrohead" | '''PWM_SetDuty'''
|-
|-
| colspan="2" | Sets the PWM Duty cycle on Channel 1 or 2&nbsp;
| colspan="2" | Sets the PWM Duty cycle on Channel 1 or 2&nbsp;
Line 352: Line 356:
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




==Property reference==
==Property reference==


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
| width="90%" class="mtx-class-macrohead" | '''Properties'''  
|-
|-
|-
|-
Line 374: Line 376:
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | PWM
| width="90%" class="mtx-class-propfolder" | PWM
|-
|-
|-
|-

Latest revision as of 14:37, 13 July 2026

Author
Version 1.0
Category MIAC: Addon Modules


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 
- BYTE Terminal
Terminal number to be read 
- UINT Return


DigitalInput

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


DigitalOutput

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


Initialize

Initialize
Forces a software reset on the module 
- VOID Return


LED_Control

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


MIAC_Module_GetData

MIAC_Module_GetData
 
- BYTE Index
 
- BYTE Return


MIAC_Module_Init

MIAC_Module_Init
 
- UINT CAN_ID
 
- VOID Return


MIAC_Module_Message

MIAC_Module_Message
 
- UINT CAN_ID
 
- UINT CMD_ID
 
- BYTE Return


MIAC_Module_PushData

MIAC_Module_PushData
 
- BYTE Data
 
- VOID Return


MIAC_Module_SetData

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


PWM_Disable

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


PWM_Enable

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


PWM_SetDuty

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


Property reference

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