Jump to content

Component: MIAC (PIC) (Misc): Difference between revisions

From Flowcode Help
No edit summary
m Text replacement - "width="90%" style="background-color:#D8C9D8; color:#4B008D;"" to "width="90%" class="mtx-class-macrohead""
 
(3 intermediate revisions by the same user not shown)
Line 99: Line 99:


===DisplayClear===
===DisplayClear===
{| 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;" | '''DisplayClear'''
| width="90%" class="mtx-class-macrohead" | '''DisplayClear'''
|-
|-
| colspan="2" | Clears the display to white space 
| colspan="2" | Clears the display to white space 
Line 113: Line 113:


===DisplayCommand===
===DisplayCommand===
{| 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;" | '''DisplayCommand'''
| width="90%" class="mtx-class-macrohead" | '''DisplayCommand'''
|-
|-
| colspan="2" | Sends the given command to the display 
| colspan="2" | Sends the given command to the display 
Line 132: Line 132:


===DisplayCursor===
===DisplayCursor===
{| 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;" | '''DisplayCursor'''
| width="90%" class="mtx-class-macrohead" | '''DisplayCursor'''
|-
|-
| colspan="2" | Moves the display cursor to the given position. If the cursor is set to the origin at x=0, y=0, then the next character sent to the display will appear in the top left corner.  
| colspan="2" | Moves the display cursor to the given position. If the cursor is set to the origin at x=0, y=0, then the next character sent to the display will appear in the top left corner.  
Line 156: Line 156:


===DisplayStart===
===DisplayStart===
{| 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;" | '''DisplayStart'''
| width="90%" class="mtx-class-macrohead" | '''DisplayStart'''
|-
|-
| colspan="2" | Initialise the display ready for use 
| colspan="2" | Initialise the display ready for use 
Line 170: Line 170:


===GetKeypad===
===GetKeypad===
{| 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;" | '''GetKeypad'''
| width="90%" class="mtx-class-macrohead" | '''GetKeypad'''
|-
|-
| colspan="2" | Returns the key code of the key that is pressed, otherwise if nothing is pressed then returns 255 
| colspan="2" | Returns the key code of the key that is pressed, otherwise if nothing is pressed then returns 255 
Line 184: Line 184:


===InputANALOG===
===InputANALOG===
{| 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;" | '''InputANALOG'''
| width="90%" class="mtx-class-macrohead" | '''InputANALOG'''
|-
|-
| colspan="2" | Returns the 8 bit value for the analogue input requested by parameter InputID  (Inputs 1 to 8) 
| colspan="2" | Returns the 8 bit value for the analogue input requested by parameter InputID  (Inputs 1 to 8) 
Line 203: Line 203:


===InputANALOG_10Bit===
===InputANALOG_10Bit===
{| 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;" | '''InputANALOG_10Bit'''
| width="90%" class="mtx-class-macrohead" | '''InputANALOG_10Bit'''
|-
|-
| colspan="2" | Returns the 10 bit value for the analogue input requested by parameter InputID  (Inputs 1 to 8)  
| colspan="2" | Returns the 10 bit value for the analogue input requested by parameter InputID  (Inputs 1 to 8)  
Line 222: Line 222:


===InputDIGITAL===
===InputDIGITAL===
{| 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;" | '''InputDIGITAL'''
| width="90%" class="mtx-class-macrohead" | '''InputDIGITAL'''
|-
|-
| colspan="2" | Returns the digital state of the input requested by parameter InputID  (Inputs 1 to 8)  
| colspan="2" | Returns the digital state of the input requested by parameter InputID  (Inputs 1 to 8)  
Line 241: Line 241:


===OutputOFF===
===OutputOFF===
{| 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;" | '''OutputOFF'''
| width="90%" class="mtx-class-macrohead" | '''OutputOFF'''
|-
|-
| colspan="2" | Outputs a digital low state on the output requested by parameter TransID  (Outputs 1 to 4)  
| colspan="2" | Outputs a digital low state on the output requested by parameter TransID  (Outputs 1 to 4)  
Line 260: Line 260:


===OutputON===
===OutputON===
{| 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;" | '''OutputON'''
| width="90%" class="mtx-class-macrohead" | '''OutputON'''
|-
|-
| colspan="2" | Outputs a digital high state on the output requested by parameter TransID  (Outputs 1 to 4)  
| colspan="2" | Outputs a digital high state on the output requested by parameter TransID  (Outputs 1 to 4)  
Line 279: Line 279:


===PrintASCII===
===PrintASCII===
{| 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;" | '''PrintASCII'''
| width="90%" class="mtx-class-macrohead" | '''PrintASCII'''
|-
|-
| colspan="2" | Prints the given character to the display at the current cursor position and increments the cursor position. 
| colspan="2" | Prints the given character to the display at the current cursor position and increments the cursor position. 
Line 298: Line 298:


===PrintFormattedNumber===
===PrintFormattedNumber===
{| 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;" | '''PrintFormattedNumber'''
| width="90%" class="mtx-class-macrohead" | '''PrintFormattedNumber'''
|-
|-
| colspan="2" | Will allow you to print a number up to 32-bits with signed or unsigned formatting. Signed = -2147483648 to 2147483647 Unsigned = 0 to 4294967295 
| colspan="2" | Will allow you to print a number up to 32-bits with signed or unsigned formatting. Signed = -2147483648 to 2147483647 Unsigned = 0 to 4294967295 
Line 322: Line 322:


===PrintNumber===
===PrintNumber===
{| 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;" | '''PrintNumber'''
| width="90%" class="mtx-class-macrohead" | '''PrintNumber'''
|-
|-
| colspan="2" | Prints the given number to the display starting at the current cursor position and moves the cursor position. 
| colspan="2" | Prints the given number to the display starting at the current cursor position and moves the cursor position. 
Line 341: Line 341:


===PrintString===
===PrintString===
{| 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;" | '''PrintString'''
| width="90%" class="mtx-class-macrohead" | '''PrintString'''
|-
|-
| colspan="2" | Prints the given character string to the display at the current cursor position and moves the cursor position. 
| colspan="2" | Prints the given character string to the display at the current cursor position and moves the cursor position. 
Line 360: Line 360:


===RelayOFF===
===RelayOFF===
{| 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;" | '''RelayOFF'''
| width="90%" class="mtx-class-macrohead" | '''RelayOFF'''
|-
|-
| colspan="2" | Turns off the requested relay given by parameter RelayID, values 1 to 4 
| colspan="2" | Turns off the requested relay given by parameter RelayID, values 1 to 4 
Line 379: Line 379:


===RelayON===
===RelayON===
{| 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;" | '''RelayON'''
| width="90%" class="mtx-class-macrohead" | '''RelayON'''
|-
|-
| colspan="2" | Turns on the requested relay given by parameter RelayID, values 1 to 4 
| colspan="2" | Turns on the requested relay given by parameter RelayID, values 1 to 4 
Line 399: Line 399:
==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'''  
|-
|-
|}
|}

Latest revision as of 14:23, 13 July 2026

Author Matrix Ltd
Version 1.7
Category Misc


MIAC (PIC) component

MIAC - Matrix Industrial Automotive Controller PLC type module based on a PIC18F4455 device, produced by Matrix Component includes functions to drive the functionality of the MIAC and MIAC system.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_MIAC.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_MIAC.fcfx

Detailed description

No detailed description exists yet for this component

Examples

Analogue Input

Basic example of how to read an analogue input on the MIAC and display it on the LCD. MIAC ADC LCD

Keypad Input

Basic example of how to read the keypad and display the value on the LCD. MIAC Keypad For reference the numbering of the MIAC keypad looks like this.


Output Control

Basic example of how to control all of the individual outputs on the MIAC using the keypad.

Note that for the transistor outputs to come on you must wire a connection from the +V terminal to the M terminal.

If you are driving high current outputs then you can instead supply separate DC power to the M terminal. MIAC Outputs


MIAC Interrupt Controlled Clock

Basic example of how to create a timer interrupt based clock. MIAC Clock






Macro reference

DisplayClear

DisplayClear
Clears the display to white space 
- VOID Return


DisplayCommand

DisplayCommand
Sends the given command to the display 
- BYTE Cmd
 
- VOID Return


DisplayCursor

DisplayCursor
Moves the display cursor to the given position. If the cursor is set to the origin at x=0, y=0, then the next character sent to the display will appear in the top left corner.  
- BYTE x
Position of the cursor in characters from left to right. 
- BYTE y
The line to move the cursor to. 
- VOID Return


DisplayStart

DisplayStart
Initialise the display ready for use 
- VOID Return


GetKeypad

GetKeypad
Returns the key code of the key that is pressed, otherwise if nothing is pressed then returns 255 
- BYTE Return


InputANALOG

InputANALOG
Returns the 8 bit value for the analogue input requested by parameter InputID (Inputs 1 to 8) 
- BYTE InputID
The input to read from 1 to 8. 
- BYTE Return


InputANALOG_10Bit

InputANALOG_10Bit
Returns the 10 bit value for the analogue input requested by parameter InputID (Inputs 1 to 8)  
- BYTE InputID
The input to read from 1 to 8. 
- INT Return


InputDIGITAL

InputDIGITAL
Returns the digital state of the input requested by parameter InputID (Inputs 1 to 8)  
- BYTE InputID
The input number from 1 to 8. 
- BYTE Return


OutputOFF

OutputOFF
Outputs a digital low state on the output requested by parameter TransID (Outputs 1 to 4)  
- BYTE TransID
1 to 4 (Outputs A to D) 
- VOID Return


OutputON

OutputON
Outputs a digital high state on the output requested by parameter TransID (Outputs 1 to 4)  
- BYTE TransID
1 to 4 (Outputs A to D) 
- VOID Return


PrintASCII

PrintASCII
Prints the given character to the display at the current cursor position and increments the cursor position. 
- BYTE Char
ASCII code of the character to print. 
- VOID Return


PrintFormattedNumber

PrintFormattedNumber
Will allow you to print a number up to 32-bits with signed or unsigned formatting. Signed = -2147483648 to 2147483647 Unsigned = 0 to 4294967295 
- ULONG Number
Enter the number or variable to print to the LCD 
- BOOL Format
0=Signed, 1=Unsigned 
- VOID Return


PrintNumber

PrintNumber
Prints the given number to the display starting at the current cursor position and moves the cursor position. 
- INT n
 
- VOID Return


PrintString

PrintString
Prints the given character string to the display at the current cursor position and moves the cursor position. 
- STRING Str
The string to send to the display. 
- VOID Return


RelayOFF

RelayOFF
Turns off the requested relay given by parameter RelayID, values 1 to 4 
- BYTE RelayID
The relay to turn off. From 1 to 4. 
- VOID Return


RelayON

RelayON
Turns on the requested relay given by parameter RelayID, values 1 to 4 
- BYTE RelayID
The relay to turn on from 1 to 4. 
- VOID Return


Property reference

Properties