Jump to content

Component: MIAC NXT / ECU (MIAC Module): Difference between revisions

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


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




Line 47: Line 49:




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


==Macro reference==


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
''<span style="color:red;">No additional examples</span>''
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''TransistorOutputState'''
|-
| colspan="2" | Allows one of the high speed transistor outputs ( A - F ) to be pulled to GND, Pulled to +V or disabled.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | Range: 1 - 6 where 1=A / 2=B / 3=C / 4=D / 5=E / 6=F&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | State
|-
| colspan="2" | 0 = Pull to Ground / 1 = Pull to +V / 2 = DisableOutput&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''
|}




{| 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;" | '''DisplayPrintFormattedNumber'''
|-
| 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&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| width="90%" | Number
|-
| colspan="2" | Enter the number or variable to print to the display&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | Format
|-
| colspan="2" | 0 = Signed, 1 = Unsigned&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''
|}




{| 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;" | '''DisplayPrintFloat'''
|-
| colspan="2" | Prints a formatted floating point number to the display&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | Number
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | DecimalPoints
|-
| colspan="2" | Number of decimal points to display&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''
|}




{| 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;" | '''DisplayGetCursorPosition'''
|-
| colspan="2" | Gets the current pixel position of the cursor within the coordinate space&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Axis
|-
| colspan="2" | 0=X, 1=Y&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''
|}




{| 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;" | '''ReadTransistorOutputCurrent'''
|-
| colspan="2" | Reads the current for one of the transistor outputs ( A - F ) Returns the current as a floating point number in amps&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | Range: 1 - 6 - 1=A / 2=B / 3=C / 4=D / 5=E / 6=F&nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT
| 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;" | '''RelayOutputState'''
|-
| colspan="2" | Allows one of the relay outputs ( Q1 - Q2 ) to be switched on or off.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | Range: 1 - 2 Where 1=Q1 / 2=Q2&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | State
|-
| colspan="2" | 0 = Relay Open Circuit / 1 = Relay Closed Circuit&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''
|}


==Macro reference==


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===DisplayClear===
{| 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;" | '''ReadUSBConnected'''
| width="90%" class="mtx-class-macrohead" | '''DisplayClear'''
|-
| colspan="2" | Checks to see if there is an active USB cable connected to the MIAC. Returns 1 if there is a USB cable present, otherwise returns 0.&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
| 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;" | '''InputAnalogByte'''
|-
| colspan="2" | Reads one of the input channels ( IN1 - IN8 ) as an analogue value with range 0-255&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | Range: 1 - 8&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''
|}
 
 
{| 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;" | '''ReadKeypad'''
|-
| colspan="2" | Directly reads the keypad for any current switch inputs. Returns the keypad switch states as a 9-bit value.  Bit0 = TopLeft, Bit1 = TopMiddle, Bit2 = TopRight, Bit3 = CenterLeft, etc..&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''
|}
 
 
{| 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;" | '''ReadEEPROM'''
|-
| colspan="2" | Read a single byte from the EEPROM.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Address
|-
| 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''
|}
 
 
{| 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;" | '''DisplayClear'''
|-
|-
| colspan="2" | Clears all text from the display&nbsp;
| colspan="2" | Clears all text from the display&nbsp;
Line 254: Line 79:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===DisplayClearLine===
|-
{| class="mtx-class-macrotable wikitable"
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DisplayPixel'''
|-
| colspan="2" | Sets or clears a pixel at location X, Y.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | X1
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Y1
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | State
|-
| colspan="2" | 0=Off / 1=On&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''
|}
 
 
{| 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;" | '''WriteEEPROM'''
|-
| colspan="2" | Write a single byte to a location in the EEPROM.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Address
|-
| 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''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| 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;" | '''DisplayClearLine'''
| width="90%" class="mtx-class-macrohead" | '''DisplayClearLine'''
|-
|-
| colspan="2" | Clears a single line of text from the display&nbsp;
| colspan="2" | Clears a single line of text from the display&nbsp;
Line 323: Line 98:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===DisplayCursor===
|-
{| class="mtx-class-macrotable wikitable"
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DisplayPrintASCII'''
|-
|-
| colspan="2" | Prints a single ASCII character to the display&nbsp;
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
|-
| width="90%" class="mtx-class-macrohead" | '''DisplayCursor'''
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Character
|-
| colspan="2" | Holds an ASCII value e.g. 'A'&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''
|}
 
 
{| 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;" | '''TransistorPWMDuty'''
|-
| colspan="2" | Sets the PWM duty on the selected channel&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | Range: 1-4 Where 1=A / 2=B / 3=C / 4=D&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | EnableOrState
|-
| colspan="2" | 1 = Enable / 0 = State&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Duty
|-
| colspan="2" | Range: 0 - 65535&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''
|}
 
 
{| 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;" | '''DisplayPrintString'''
|-
| colspan="2" | Prints a string of ASCII characters to the display&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | Text
|-
| colspan="2" | Enter the text or variable to print to the display&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''
|}
 
 
{| 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;" | '''Print'''
|-
| colspan="2" | This macro prints a string of characters to the Graphical LCD.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | Str
|-
| colspan="2" | String of characters to send to the display.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | X1
|-
| colspan="2" | X pixel coordinate to set the output string position.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Y1
|-
| colspan="2" | Y pixel coordinate to set the output string position.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Font
|-
| colspan="2" | Selects which Font to use Range: 0 to Font Count&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Transparent
|-
| colspan="2" | Specifies if the background of the text is drawn - 0 = Background colour is drawn, 1 = Background colour not drawn.&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''
|}
 
 
{| 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;" | '''TransistorPWMEnable'''
|-
| colspan="2" | Enables or disables PWM on the selected channel&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | Range: 1-4 Where 1=A / 2=B / 3=C / 4=D&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | EnableOrState
|-
| colspan="2" | PWM on Enable Pin or State Pin - 1 = Enable / 0 = State&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | OnOrOff
|-
| colspan="2" | 1 = Enabled / 0 = Disabled&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''
|}
 
 
{| 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;" | '''DisplayCursor'''
|-
|-
| colspan="2" | Moves the current pixel position of the cursor within the coordinate space&nbsp;
| colspan="2" | Moves the current pixel position of the cursor within the coordinate space&nbsp;
Line 476: Line 122:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===DisplayGetCursorPosition===
|-
{| class="mtx-class-macrotable wikitable"
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''InputDigital'''
|-
| colspan="2" | Reads one of the input channels ( IN1 - IN8 ) as a digital value with range 0-1&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | Range: 1 - 8&nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
| 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;" | '''DisplayPrintNumber'''
|-
| colspan="2" | Prints a number to the display as an ASCII string&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| width="90%" | Number
|-
| colspan="2" | Enter the number or variable to print to the display&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''
|}
 
 
{| 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;" | '''InputAnalogInt'''
|-
| colspan="2" | Reads one of the input channels ( IN1 - IN8 ) as an analogue value with range 0-4095&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | Range: 1 - 8&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''
|}
 
 
{| 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" | Starts up the MIAC IO and display. &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''
|}
 
 
 
 
==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" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Transistor Output PWM Settings
|-
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Prescaler Divide
|-
| colspan="2" | Allows the user to change the number of program cycles per PWM cycle count.  Note that all PWM channels based on the same timer will share the same prescaler.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
| width="90%" | Period Register
|-
| colspan="2" | Allows the user to change the number of counts for the whole PWM period. Note that all PWM channels based on the same timer will share the same period overflow. PIC/AVR Range: 0 - 255 16-bit PIC Range: 0 - 65535&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | PWM Timer
|-
| colspan="2" | Timer associated with PWM to drive the output.  Warning - All PWM channels linked to the same timer will share the same period and prescaler settings.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
| width="90%" | Frequency (Hz)
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Display Settings
|-
|-
| width="10%" align="center" | [[File:Fc9-type-1-icon.png]]
| width="90%" | Foreground Color
|-
| colspan="2" | Specifies the initial foreground color.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-1-icon.png]]
| width="90%" | Background Color
|-
| colspan="2" | Specifies the initial background color.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Font
|-
| colspan="2" | Font picker to decide which font to use on your display.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Character Spacing
|-
| colspan="2" | Sets the number of blank pixels between each character when printing text. Default 1.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Space Width
|-
| colspan="2" | Sets the number of horizontal pixels used to represent a space character.&nbsp;
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Pin Connections
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | CAN (2 x Internal + 1 x External MCP2515)
|-
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | C1 TX
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | C1 RX
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | C2 TX
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | C2 RX
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | C3 MOSI
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | C3 MISO
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | C3 SCK
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | C3 CS
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | C3 INT
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | C3 RES
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | LIN
|-
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | LIN TX
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | LIN RX
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | LIN Enable
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Bluetooth RN4678
|-
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | BT TX
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | BT RX
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | BT Reset
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Wifi ESP12S
|-
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | Wifi TX
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | Wifi RX
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | Wifi Reset
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Ethernet W5500
|-
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | ETH MOSI
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | ETH MISO
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | ETH SCK
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | ETH CS
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | ETH INT
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | ETH RES
|-
| colspan="2" | &nbsp;
|}==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;" | '''TransistorOutputState'''
|-
| colspan="2" | Allows one of the high speed transistor outputs ( A - F ) to be pulled to GND, Pulled to +V or disabled.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | Range: 1 - 6 where 1=A / 2=B / 3=C / 4=D / 5=E / 6=F&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | State
|-
| colspan="2" | 0 = Pull to Ground / 1 = Pull to +V / 2 = DisableOutput&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''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| 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;" | '''DisplayPrintFormattedNumber'''
| width="90%" class="mtx-class-macrohead" | '''DisplayGetCursorPosition'''
|-
| 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&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| width="90%" | Number
|-
| colspan="2" | Enter the number or variable to print to the display&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | Format
|-
| colspan="2" | 0 = Signed, 1 = Unsigned&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''
|}
 
 
{| 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;" | '''DisplayPrintFloat'''
|-
| colspan="2" | Prints a formatted floating point number to the display&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | Number
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | DecimalPoints
|-
| colspan="2" | Number of decimal points to display&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''
|}
 
 
{| 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;" | '''DisplayGetCursorPosition'''
|-
|-
| colspan="2" | Gets the current pixel position of the cursor within the coordinate space&nbsp;
| colspan="2" | Gets the current pixel position of the cursor within the coordinate space&nbsp;
Line 843: Line 141:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===DisplayPixel===
|-
{| class="mtx-class-macrotable wikitable"
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadTransistorOutputCurrent'''
|-
| colspan="2" | Reads the current for one of the transistor outputs ( A - F ) Returns the current as a floating point number in amps&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | Range: 1 - 6 - 1=A / 2=B / 3=C / 4=D / 5=E / 6=F&nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT
| 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;" | '''RelayOutputState'''
|-
| colspan="2" | Allows one of the relay outputs ( Q1 - Q2 ) to be switched on or off.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | Range: 1 - 2 Where 1=Q1 / 2=Q2&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | State
|-
| colspan="2" | 0 = Relay Open Circuit / 1 = Relay Closed Circuit&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''
|}
 
 
{| 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;" | '''ReadUSBConnected'''
|-
| colspan="2" | Checks to see if there is an active USB cable connected to the MIAC. Returns 1 if there is a USB cable present, otherwise returns 0.&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
| 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;" | '''InputAnalogByte'''
|-
| colspan="2" | Reads one of the input channels ( IN1 - IN8 ) as an analogue value with range 0-255&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | Range: 1 - 8&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''
|}
 
 
{| 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;" | '''ReadKeypad'''
|-
| colspan="2" | Directly reads the keypad for any current switch inputs. Returns the keypad switch states as a 9-bit value.  Bit0 = TopLeft, Bit1 = TopMiddle, Bit2 = TopRight, Bit3 = CenterLeft, etc..&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''
|}
 
 
{| 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;" | '''ReadEEPROM'''
|-
| colspan="2" | Read a single byte from the EEPROM.&nbsp;
|-
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" class="mtx-class-macrohead" | '''DisplayPixel'''
| width="90%" | Address
|-
| 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''
|}
 
 
{| 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;" | '''DisplayClear'''
|-
| colspan="2" | Clears all text from the display&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''
|}
 
 
{| 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;" | '''DisplayPixel'''
|-
|-
| colspan="2" | Sets or clears a pixel at location X, Y.&nbsp;
| colspan="2" | Sets or clears a pixel at location X, Y.&nbsp;
Line 987: Line 170:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===DisplayPrintASCII===
|-
{| class="mtx-class-macrotable wikitable"
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WriteEEPROM'''
|-
| colspan="2" | Write a single byte to a location in the EEPROM.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Address
|-
| 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''
|}
 
 
{| 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;" | '''DisplayClearLine'''
|-
|-
| colspan="2" | Clears a single line of text from the display&nbsp;
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
|-
| width="90%" class="mtx-class-macrohead" | '''DisplayPrintASCII'''
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Line
|-
| colspan="2" | Line to clear. Range 0 to CharacterHeight - 1&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''
|}
 
 
{| 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;" | '''DisplayPrintASCII'''
|-
|-
| colspan="2" | Prints a single ASCII character to the display&nbsp;
| colspan="2" | Prints a single ASCII character to the display&nbsp;
Line 1,046: Line 189:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===DisplayPrintFloat===
{| 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;" | '''TransistorPWMDuty'''
| width="90%" class="mtx-class-macrohead" | '''DisplayPrintFloat'''
|-
|-
| colspan="2" | Sets the PWM duty on the selected channel&nbsp;
| colspan="2" | Prints a formatted floating point number to the display&nbsp;
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | Channel
|-
| colspan="2" | Range: 1-4 Where 1=A / 2=B / 3=C / 4=D&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | EnableOrState
|-
| colspan="2" | 1 = Enable / 0 = State&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Duty
|-
| colspan="2" | Range: 0 - 65535&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''
|}
 
 
{| 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;" | '''DisplayPrintString'''
|-
| colspan="2" | Prints a string of ASCII characters to the display&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | Text
|-
| colspan="2" | Enter the text or variable to print to the display&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''
|}
 
 
{| 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;" | '''Print'''
|-
| colspan="2" | This macro prints a string of characters to the Graphical LCD.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | Str
|-
| colspan="2" | String of characters to send to the display.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | X1
|-
| colspan="2" | X pixel coordinate to set the output string position.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Y1
|-
| colspan="2" | Y pixel coordinate to set the output string position.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Font
|-
| colspan="2" | Selects which Font to use Range: 0 to Font Count&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Transparent
|-
| colspan="2" | Specifies if the background of the text is drawn - 0 = Background colour is drawn, 1 = Background colour not drawn.&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''
|}
 
 
{| 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;" | '''TransistorPWMEnable'''
|-
| colspan="2" | Enables or disables PWM on the selected channel&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | Range: 1-4 Where 1=A / 2=B / 3=C / 4=D&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | EnableOrState
|-
| colspan="2" | PWM on Enable Pin or State Pin - 1 = Enable / 0 = State&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | OnOrOff
|-
| colspan="2" | 1 = Enabled / 0 = Disabled&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''
|}
 
 
{| 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;" | '''DisplayCursor'''
|-
| colspan="2" | Moves the current pixel position of the cursor within the coordinate space&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | X
|-
| colspan="2" | Sets the pixel position on the X plane, 0 is the left most pixel&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Y
|-
| colspan="2" | Sets the pixel position on the Y plane, 0 is the top most pixel&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''
|}
 
 
{| 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;" | '''InputDigital'''
|-
| colspan="2" | Reads one of the input channels ( IN1 - IN8 ) as a digital value with range 0-1&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | Range: 1 - 8&nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
| 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;" | '''DisplayPrintNumber'''
|-
| colspan="2" | Prints a number to the display as an ASCII string&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| width="90%" | Number
| width="90%" | Number
|-
| colspan="2" | Enter the number or variable to print to the display&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''
|}
{| 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;" | '''InputAnalogInt'''
|-
| colspan="2" | Reads one of the input channels ( IN1 - IN8 ) as an analogue value with range 0-4095&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | Range: 1 - 8&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''
|}
{| 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" | Starts up the MIAC IO and display. &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''
|}
==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" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Transistor Output PWM Settings
|-
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Prescaler Divide
|-
| colspan="2" | Allows the user to change the number of program cycles per PWM cycle count.  Note that all PWM channels based on the same timer will share the same prescaler.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
| width="90%" | Period Register
|-
| colspan="2" | Allows the user to change the number of counts for the whole PWM period. Note that all PWM channels based on the same timer will share the same period overflow. PIC/AVR Range: 0 - 255 16-bit PIC Range: 0 - 65535&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | PWM Timer
|-
| colspan="2" | Timer associated with PWM to drive the output.  Warning - All PWM channels linked to the same timer will share the same period and prescaler settings.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
| width="90%" | Frequency (Hz)
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Display Settings
|-
|-
| width="10%" align="center" | [[File:Fc9-type-1-icon.png]]
| width="90%" | Foreground Color
|-
| colspan="2" | Specifies the initial foreground color.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-1-icon.png]]
| width="90%" | Background Color
|-
| colspan="2" | Specifies the initial background color.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Font
|-
| colspan="2" | Font picker to decide which font to use on your display.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Character Spacing
|-
| colspan="2" | Sets the number of blank pixels between each character when printing text. Default 1.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Space Width
|-
| colspan="2" | Sets the number of horizontal pixels used to represent a space character.&nbsp;
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Pin Connections
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | CAN (2 x Internal + 1 x External MCP2515)
|-
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | C1 TX
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | C1 RX
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | C2 TX
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | C2 RX
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | C3 MOSI
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | C3 MISO
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | C3 SCK
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | C3 CS
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | C3 INT
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | C3 RES
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | LIN
|-
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | LIN TX
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | LIN RX
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | LIN Enable
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Bluetooth RN4678
|-
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | BT TX
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | BT RX
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | BT Reset
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Wifi ESP12S
|-
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | Wifi TX
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | Wifi RX
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | Wifi Reset
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Ethernet W5500
|-
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | ETH MOSI
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | ETH MISO
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | ETH SCK
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | ETH CS
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | ETH INT
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | ETH RES
|-
| colspan="2" | &nbsp;
|}==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;" | '''TransistorOutputState'''
|-
| colspan="2" | Allows one of the high speed transistor outputs ( A - F ) to be pulled to GND, Pulled to +V or disabled.&nbsp;
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
| width="90%" | DecimalPoints
|-
|-
| colspan="2" | Range: 1 - 6 where 1=A / 2=B / 3=C / 4=D / 5=E / 6=F&nbsp;
| colspan="2" | Number of decimal points to display&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | State
|-
| colspan="2" | 0 = Pull to Ground / 1 = Pull to +V / 2 = DisableOutput&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 1,484: Line 213:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===DisplayPrintFormattedNumber===
{| 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;" | '''DisplayPrintFormattedNumber'''
| width="90%" class="mtx-class-macrohead" | '''DisplayPrintFormattedNumber'''
|-
|-
| 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&nbsp;
| 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&nbsp;
Line 1,507: Line 237:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===DisplayPrintNumber===
{| 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;" | '''DisplayPrintFloat'''
| width="90%" class="mtx-class-macrohead" | '''DisplayPrintNumber'''
|-
|-
| colspan="2" | Prints a formatted floating point number to the display&nbsp;
| colspan="2" | Prints a number to the display as an ASCII string&nbsp;
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| width="90%" | Number
| width="90%" | Number
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | Enter the number or variable to print to the display&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | DecimalPoints
|-
| colspan="2" | Number of decimal points to display&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 1,530: Line 256:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===DisplayPrintString===
{| 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;" | '''DisplayGetCursorPosition'''
| width="90%" class="mtx-class-macrohead" | '''DisplayPrintString'''
|-
|-
| colspan="2" | Gets the current pixel position of the cursor within the coordinate space&nbsp;
| colspan="2" | Prints a string of ASCII characters to the display&nbsp;
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | Axis
| width="90%" | Text
|-
|-
| colspan="2" | 0=X, 1=Y&nbsp;
| colspan="2" | Enter the text or variable to print to the display&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| 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''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===Initialise===
{| 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;" | '''ReadTransistorOutputCurrent'''
| width="90%" class="mtx-class-macrohead" | '''Initialise'''
|-
|-
| colspan="2" | Reads the current for one of the transistor outputs ( A - F ) Returns the current as a floating point number in amps&nbsp;
| colspan="2" | Starts up the MIAC IO and display. &nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
|-
| colspan="2" | Range: 1 - 6 - 1=A / 2=B / 3=C / 4=D / 5=E / 6=F&nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT
| 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;" | '''RelayOutputState'''
|-
| colspan="2" | Allows one of the relay outputs ( Q1 - Q2 ) to be switched on or off.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | Range: 1 - 2 Where 1=Q1 / 2=Q2&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | State
|-
| colspan="2" | 0 = Relay Open Circuit / 1 = Relay Closed Circuit&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 1,589: Line 289:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===InputAnalogByte===
|-
{| class="mtx-class-macrotable wikitable"
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadUSBConnected'''
|-
|-
| colspan="2" | Checks to see if there is an active USB cable connected to the MIAC. Returns 1 if there is a USB cable present, otherwise returns 0.&nbsp;
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
|-
| width="90%" class="mtx-class-macrohead" | '''InputAnalogByte'''
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
| 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;" | '''InputAnalogByte'''
|-
|-
| colspan="2" | Reads one of the input channels ( IN1 - IN8 ) as an analogue value with range 0-255&nbsp;
| colspan="2" | Reads one of the input channels ( IN1 - IN8 ) as an analogue value with range 0-255&nbsp;
Line 1,620: Line 308:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===InputAnalogInt===
{| 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;" | '''ReadKeypad'''
| width="90%" class="mtx-class-macrohead" | '''InputAnalogInt'''
|-
|-
| colspan="2" | Directly reads the keypad for any current switch inputs. Returns the keypad switch states as a 9-bit value.  Bit0 = TopLeft, Bit1 = TopMiddle, Bit2 = TopRight, Bit3 = CenterLeft, etc..&nbsp;
| colspan="2" | Reads one of the input channels ( IN1 - IN8 ) as an analogue value with range 0-4095&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''
|}
{| 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;" | '''ReadEEPROM'''
|-
| colspan="2" | Read a single byte from the EEPROM.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Address
|-
| 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''
|}
{| 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;" | '''DisplayClear'''
|-
| colspan="2" | Clears all text from the display&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''
|}
{| 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;" | '''DisplayPixel'''
|-
| colspan="2" | Sets or clears a pixel at location X, Y.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | X1
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Y1
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | State
|-
| colspan="2" | 0=Off / 1=On&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''
|}
{| 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;" | '''WriteEEPROM'''
|-
| colspan="2" | Write a single byte to a location in the EEPROM.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Address
|-
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Data
| width="90%" | Channel
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | Range: 1 - 8&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| 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''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===InputDigital===
{| 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;" | '''DisplayClearLine'''
| width="90%" class="mtx-class-macrohead" | '''InputDigital'''
|-
|-
| colspan="2" | Clears a single line of text from the display&nbsp;
| colspan="2" | Reads one of the input channels ( IN1 - IN8 ) as a digital value with range 0-1&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Line
|-
| colspan="2" | Line to clear. Range 0 to CharacterHeight - 1&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''
|}
 
 
{| 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;" | '''DisplayPrintASCII'''
|-
| colspan="2" | Prints a single ASCII character to the display&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Character
|-
| colspan="2" | Holds an ASCII value e.g. 'A'&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''
|}
 
 
{| 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;" | '''TransistorPWMDuty'''
|-
| colspan="2" | Sets the PWM duty on the selected channel&nbsp;
|-
|-
|-
|-
Line 1,762: Line 339:
| width="90%" | Channel
| width="90%" | Channel
|-
|-
| colspan="2" | Range: 1-4 Where 1=A / 2=B / 3=C / 4=D&nbsp;
| colspan="2" | Range: 1 - 8&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | EnableOrState
|-
| colspan="2" | 1 = Enable / 0 = State&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Duty
|-
| colspan="2" | Range: 0 - 65535&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''
|}
 
 
{| 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;" | '''DisplayPrintString'''
|-
| colspan="2" | Prints a string of ASCII characters to the display&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | Text
|-
| colspan="2" | Enter the text or variable to print to the display&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''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===Print===
{| 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;" | '''Print'''
| width="90%" class="mtx-class-macrohead" | '''Print'''
|-
|-
| colspan="2" | This macro prints a string of characters to the Graphical LCD.&nbsp;
| colspan="2" | This macro prints a string of characters to the Graphical LCD.&nbsp;
Line 1,835: Line 385:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===ReadEEPROM===
{| 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;" | '''TransistorPWMEnable'''
| width="90%" class="mtx-class-macrohead" | '''ReadEEPROM'''
|-
|-
| colspan="2" | Enables or disables PWM on the selected channel&nbsp;
| colspan="2" | Read a single byte from the EEPROM.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | Range: 1-4 Where 1=A / 2=B / 3=C / 4=D&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | EnableOrState
|-
| colspan="2" | PWM on Enable Pin or State Pin - 1 = Enable / 0 = State&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | OnOrOff
|-
| colspan="2" | 1 = Enabled / 0 = Disabled&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''
|}
 
 
{| 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;" | '''DisplayCursor'''
|-
| colspan="2" | Moves the current pixel position of the cursor within the coordinate space&nbsp;
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | X
| width="90%" | Address
|-
| colspan="2" | Sets the pixel position on the X plane, 0 is the left most pixel&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Y
|-
| colspan="2" | Sets the pixel position on the Y plane, 0 is the top most pixel&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''
|}
 
 
{| 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;" | '''InputDigital'''
|-
| colspan="2" | Reads one of the input channels ( IN1 - IN8 ) as a digital value with range 0-1&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | Range: 1 - 8&nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
| 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;" | '''DisplayPrintNumber'''
|-
| colspan="2" | Prints a number to the display as an ASCII string&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| width="90%" | Number
|-
| colspan="2" | Enter the number or variable to print to the display&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''
|}
 
 
{| 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;" | '''InputAnalogInt'''
|-
| colspan="2" | Reads one of the input channels ( IN1 - IN8 ) as an analogue value with range 0-4095&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | Range: 1 - 8&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''
|}
 
 
{| 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" | Starts up the MIAC IO and display. &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''
|}
 
 
 
 
==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" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Transistor Output PWM Settings
|-
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Prescaler Divide
|-
| colspan="2" | Allows the user to change the number of program cycles per PWM cycle count.  Note that all PWM channels based on the same timer will share the same prescaler.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
| width="90%" | Period Register
|-
| colspan="2" | Allows the user to change the number of counts for the whole PWM period. Note that all PWM channels based on the same timer will share the same period overflow. PIC/AVR Range: 0 - 255 16-bit PIC Range: 0 - 65535&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | PWM Timer
|-
| colspan="2" | Timer associated with PWM to drive the output.  Warning - All PWM channels linked to the same timer will share the same period and prescaler settings.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
| width="90%" | Frequency (Hz)
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Display Settings
|-
|-
| width="10%" align="center" | [[File:Fc9-type-1-icon.png]]
| width="90%" | Foreground Color
|-
| colspan="2" | Specifies the initial foreground color.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-1-icon.png]]
| width="90%" | Background Color
|-
| colspan="2" | Specifies the initial background color.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Font
|-
| colspan="2" | Font picker to decide which font to use on your display.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Character Spacing
|-
| colspan="2" | Sets the number of blank pixels between each character when printing text. Default 1.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Space Width
|-
| colspan="2" | Sets the number of horizontal pixels used to represent a space character.&nbsp;
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Pin Connections
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | CAN (2 x Internal + 1 x External MCP2515)
|-
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | C1 TX
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | C1 RX
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | C2 TX
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | C2 RX
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | C3 MOSI
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | C3 MISO
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | C3 SCK
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | C3 CS
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | C3 INT
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | C3 RES
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | LIN
|-
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | LIN TX
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | LIN RX
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | LIN Enable
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Bluetooth RN4678
|-
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | BT TX
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | BT RX
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | BT Reset
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Wifi ESP12S
|-
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | Wifi TX
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | Wifi RX
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | Wifi Reset
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Ethernet W5500
|-
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | ETH MOSI
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | ETH MISO
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | ETH SCK
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | ETH CS
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | ETH INT
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | ETH RES
|-
| colspan="2" | &nbsp;
|}==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;" | '''TransistorOutputState'''
|-
| colspan="2" | Allows one of the high speed transistor outputs ( A - F ) to be pulled to GND, Pulled to +V or disabled.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | Range: 1 - 6 where 1=A / 2=B / 3=C / 4=D / 5=E / 6=F&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | State
|-
| colspan="2" | 0 = Pull to Ground / 1 = Pull to +V / 2 = DisableOutput&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''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===ReadKeypad===
{| 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;" | '''DisplayPrintFormattedNumber'''
| width="90%" class="mtx-class-macrohead" | '''ReadKeypad'''
|-
|-
| 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&nbsp;
| colspan="2" | Directly reads the keypad for any current switch inputs. Returns the keypad switch states as a 9-bit value. Bit0 = TopLeft, Bit1 = TopMiddle, Bit2 = TopRight, Bit3 = CenterLeft, etc..&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| width="90%" | Number
|-
| colspan="2" | Enter the number or variable to print to the display&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | Format
|-
|-
| colspan="2" | 0 = Signed, 1 = Unsigned&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''
|}
{| 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;" | '''DisplayPrintFloat'''
|-
| colspan="2" | Prints a formatted floating point number to the display&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | Number
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | DecimalPoints
|-
| colspan="2" | Number of decimal points to display&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''
|}
{| 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;" | '''DisplayGetCursorPosition'''
|-
| colspan="2" | Gets the current pixel position of the cursor within the coordinate space&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Axis
|-
| colspan="2" | 0=X, 1=Y&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
Line 2,253: Line 418:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===ReadTransistorOutputCurrent===
{| 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;" | '''ReadTransistorOutputCurrent'''
| width="90%" class="mtx-class-macrohead" | '''ReadTransistorOutputCurrent'''
|-
|-
| colspan="2" | Reads the current for one of the transistor outputs ( A - F ) Returns the current as a floating point number in amps&nbsp;
| colspan="2" | Reads the current for one of the transistor outputs ( A - F ) Returns the current as a floating point number in amps&nbsp;
Line 2,271: Line 437:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===ReadUSBConnected===
|-
{| class="mtx-class-macrotable wikitable"
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RelayOutputState'''
|-
| colspan="2" | Allows one of the relay outputs ( Q1 - Q2 ) to be switched on or off.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | Range: 1 - 2 Where 1=Q1 / 2=Q2&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | State
|-
| colspan="2" | 0 = Relay Open Circuit / 1 = Relay Closed Circuit&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''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| 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;" | '''ReadUSBConnected'''
| width="90%" class="mtx-class-macrohead" | '''ReadUSBConnected'''
|-
|-
| colspan="2" | Checks to see if there is an active USB cable connected to the MIAC. Returns 1 if there is a USB cable present, otherwise returns 0.&nbsp;
| colspan="2" | Checks to see if there is an active USB cable connected to the MIAC. Returns 1 if there is a USB cable present, otherwise returns 0.&nbsp;
Line 2,307: Line 451:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===RelayOutputState===
{| 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;" | '''InputAnalogByte'''
| width="90%" class="mtx-class-macrohead" | '''RelayOutputState'''
|-
|-
| colspan="2" | Reads one of the input channels ( IN1 - IN8 ) as an analogue value with range 0-255&nbsp;
| colspan="2" | Allows one of the relay outputs ( Q1 - Q2 ) to be switched on or off.&nbsp;
|-
|-
|-
|-
Line 2,318: Line 463:
| width="90%" | Channel
| width="90%" | Channel
|-
|-
| colspan="2" | Range: 1 - 8&nbsp;
| colspan="2" | Range: 1 - 2 Where 1=Q1 / 2=Q2&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''
|}
 
 
{| 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;" | '''ReadKeypad'''
|-
| colspan="2" | Directly reads the keypad for any current switch inputs. Returns the keypad switch states as a 9-bit value.  Bit0 = TopLeft, Bit1 = TopMiddle, Bit2 = TopRight, Bit3 = CenterLeft, etc..&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''
|}
 
 
{| 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;" | '''ReadEEPROM'''
|-
| colspan="2" | Read a single byte from the EEPROM.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Address
|-
| 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''
|}
 
 
{| 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;" | '''DisplayClear'''
|-
| colspan="2" | Clears all text from the display&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''
|}
 
 
{| 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;" | '''DisplayPixel'''
|-
| colspan="2" | Sets or clears a pixel at location X, Y.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | X1
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Y1
|-
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | State
| width="90%" | State
|-
|-
| colspan="2" | 0=Off / 1=On&nbsp;
| colspan="2" | 0 = Relay Open Circuit / 1 = Relay Closed Circuit&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 2,397: Line 475:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===TransistorOutputState===
{| 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;" | '''WriteEEPROM'''
| width="90%" class="mtx-class-macrohead" | '''TransistorOutputState'''
|-
|-
| colspan="2" | Write a single byte to a location in the EEPROM.&nbsp;
| colspan="2" | Allows one of the high speed transistor outputs ( A - F ) to be pulled to GND, Pulled to +V or disabled.&nbsp;
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Address
|-
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Data
| width="90%" | Channel
|-
| 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''
|}
 
 
{| 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;" | '''DisplayClearLine'''
|-
| colspan="2" | Clears a single line of text from the display&nbsp;
|-
|-
| colspan="2" | Range: 1 - 6 where 1=A / 2=B / 3=C / 4=D / 5=E / 6=F&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Line
| width="90%" | State
|-
|-
| colspan="2" | Line to clear. Range 0 to CharacterHeight - 1&nbsp;
| colspan="2" | 0 = Pull to Ground / 1 = Pull to +V / 2 = DisableOutput&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''
|}
 
 
{| 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;" | '''DisplayPrintASCII'''
|-
| colspan="2" | Prints a single ASCII character to the display&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Character
|-
| colspan="2" | Holds an ASCII value e.g. 'A'&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 2,456: Line 499:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===TransistorPWMDuty===
{| 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;" | '''TransistorPWMDuty'''
| width="90%" class="mtx-class-macrohead" | '''TransistorPWMDuty'''
|-
|-
| colspan="2" | Sets the PWM duty on the selected channel&nbsp;
| colspan="2" | Sets the PWM duty on the selected channel&nbsp;
Line 2,484: Line 528:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===TransistorPWMEnable===
|-
{| class="mtx-class-macrotable wikitable"
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DisplayPrintString'''
|-
| colspan="2" | Prints a string of ASCII characters to the display&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | Text
|-
| colspan="2" | Enter the text or variable to print to the display&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''
|}
 
 
{| 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;" | '''Print'''
|-
| colspan="2" | This macro prints a string of characters to the Graphical LCD.&nbsp;
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" | Str
| width="90%" class="mtx-class-macrohead" | '''TransistorPWMEnable'''
|-
| colspan="2" | String of characters to send to the display.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | X1
|-
| colspan="2" | X pixel coordinate to set the output string position.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Y1
|-
| colspan="2" | Y pixel coordinate to set the output string position.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Font
|-
| colspan="2" | Selects which Font to use Range: 0 to Font Count&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Transparent
|-
| colspan="2" | Specifies if the background of the text is drawn - 0 = Background colour is drawn, 1 = Background colour not drawn.&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''
|}
 
 
{| 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;" | '''TransistorPWMEnable'''
|-
|-
| colspan="2" | Enables or disables PWM on the selected channel&nbsp;
| colspan="2" | Enables or disables PWM on the selected channel&nbsp;
Line 2,568: Line 557:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===WriteEEPROM===
{| 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" | '''WriteEEPROM'''
|-
|-
| colspan="2" | Moves the current pixel position of the cursor within the coordinate space&nbsp;
| colspan="2" | Write a single byte to a location in the EEPROM.&nbsp;
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | X
| width="90%" | Address
|-
| colspan="2" | Sets the pixel position on the X plane, 0 is the left most pixel&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Y
|-
| colspan="2" | Sets the pixel position on the Y plane, 0 is the top most pixel&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''
|}
 
 
{| 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;" | '''InputDigital'''
|-
| colspan="2" | Reads one of the input channels ( IN1 - IN8 ) as a digital value with range 0-1&nbsp;
|-
|-
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
| width="90%" | Data
|-
|-
| colspan="2" | Range: 1 - 8&nbsp;
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
| 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;" | '''DisplayPrintNumber'''
|-
| colspan="2" | Prints a number to the display as an ASCII string&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| width="90%" | Number
|-
| colspan="2" | Enter the number or variable to print to the display&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| 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''
| 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;" | '''InputAnalogInt'''
|-
| colspan="2" | Reads one of the input channels ( IN1 - IN8 ) as an analogue value with range 0-4095&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | Range: 1 - 8&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''
|}
{| 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" | Starts up the MIAC IO and display. &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''
|}




==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'''  
|-
|-
|-
|-
| 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;" | Transistor Output PWM Settings
| width="90%" class="mtx-class-propfolder" | Transistor Output PWM Settings
|-
|-
|-
|-
Line 2,692: Line 613:
| 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;" | Display Settings
| width="90%" class="mtx-class-propfolder" | Display Settings
|-
|-
|-
|-
Line 2,721: Line 642:
| colspan="2" | Sets the number of horizontal pixels used to represent a space character.&nbsp;
| colspan="2" | Sets the number of horizontal pixels used to represent a space character.&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;" | Pin Connections
| width="90%" class="mtx-class-propfolder" | Pin Connections
|-
|-
|-
|-
| 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;" | CAN (2 x Internal + 1 x External MCP2515)
| width="90%" class="mtx-class-propfolder" | CAN (2 x Internal + 1 x External MCP2515)
|-
|-
|-
|-
Line 2,779: Line 700:
| 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;" | LIN
| width="90%" class="mtx-class-propfolder" | LIN
|-
|-
|-
|-
Line 2,798: Line 719:
| 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;" | Bluetooth RN4678
| width="90%" class="mtx-class-propfolder" | Bluetooth RN4678
|-
|-
|-
|-
Line 2,817: Line 738:
| 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;" | Wifi ESP12S
| width="90%" class="mtx-class-propfolder" | Wifi ESP12S
|-
|-
|-
|-
Line 2,836: Line 757:
| 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;" | Ethernet W5500
| width="90%" class="mtx-class-propfolder" | Ethernet W5500
|-
|-
|-
|-

Latest revision as of 14:37, 13 July 2026

Author Matrix TSL
Version 1.1
Category MIAC Module


MIAC NXT / ECU component

Component to drive the MIAC NXT / MIAC ECU range of hardware.

Component Source Code

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

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

Detailed description

No detailed description exists yet for this component

Examples

No additional examples






Macro reference

DisplayClear

DisplayClear
Clears all text from the display 
- VOID Return


DisplayClearLine

DisplayClearLine
Clears a single line of text from the display 
- BYTE Line
Line to clear. Range 0 to CharacterHeight - 1 
- VOID Return


DisplayCursor

DisplayCursor
Moves the current pixel position of the cursor within the coordinate space 
- UINT X
Sets the pixel position on the X plane, 0 is the left most pixel 
- UINT Y
Sets the pixel position on the Y plane, 0 is the top most pixel 
- VOID Return


DisplayGetCursorPosition

DisplayGetCursorPosition
Gets the current pixel position of the cursor within the coordinate space 
- BYTE Axis
0=X, 1=Y 
- UINT Return


DisplayPixel

DisplayPixel
Sets or clears a pixel at location X, Y. 
- UINT X1
 
- UINT Y1
 
- BOOL State
0=Off / 1=On 
- VOID Return


DisplayPrintASCII

DisplayPrintASCII
Prints a single ASCII character to the display 
- BYTE Character
Holds an ASCII value e.g. 'A' 
- VOID Return


DisplayPrintFloat

DisplayPrintFloat
Prints a formatted floating point number to the display 
- FLOAT Number
 
- BYTE DecimalPoints
Number of decimal points to display 
- VOID Return


DisplayPrintFormattedNumber

DisplayPrintFormattedNumber
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 display 
- BOOL Format
0 = Signed, 1 = Unsigned 
- VOID Return


DisplayPrintNumber

DisplayPrintNumber
Prints a number to the display as an ASCII string 
- INT Number
Enter the number or variable to print to the display 
- VOID Return


DisplayPrintString

DisplayPrintString
Prints a string of ASCII characters to the display 
- STRING Text
Enter the text or variable to print to the display 
- VOID Return


Initialise

Initialise
Starts up the MIAC IO and display.  
- VOID Return


InputAnalogByte

InputAnalogByte
Reads one of the input channels ( IN1 - IN8 ) as an analogue value with range 0-255 
- BYTE Channel
Range: 1 - 8 
- BYTE Return


InputAnalogInt

InputAnalogInt
Reads one of the input channels ( IN1 - IN8 ) as an analogue value with range 0-4095 
- BYTE Channel
Range: 1 - 8 
- UINT Return


InputDigital

InputDigital
Reads one of the input channels ( IN1 - IN8 ) as a digital value with range 0-1 
- BYTE Channel
Range: 1 - 8 
- BOOL Return


Print

Print
This macro prints a string of characters to the Graphical LCD. 
- STRING Str
String of characters to send to the display. 
- UINT X1
X pixel coordinate to set the output string position. 
- UINT Y1
Y pixel coordinate to set the output string position. 
- BYTE Font
Selects which Font to use Range: 0 to Font Count 
- BYTE Transparent
Specifies if the background of the text is drawn - 0 = Background colour is drawn, 1 = Background colour not drawn. 
- VOID Return


ReadEEPROM

ReadEEPROM
Read a single byte from the EEPROM. 
- UINT Address
 
- BYTE Return


ReadKeypad

ReadKeypad
Directly reads the keypad for any current switch inputs. Returns the keypad switch states as a 9-bit value. Bit0 = TopLeft, Bit1 = TopMiddle, Bit2 = TopRight, Bit3 = CenterLeft, etc.. 
- UINT Return


ReadTransistorOutputCurrent

ReadTransistorOutputCurrent
Reads the current for one of the transistor outputs ( A - F ) Returns the current as a floating point number in amps 
- BYTE Channel
Range: 1 - 6 - 1=A / 2=B / 3=C / 4=D / 5=E / 6=F 
- FLOAT Return


ReadUSBConnected

ReadUSBConnected
Checks to see if there is an active USB cable connected to the MIAC. Returns 1 if there is a USB cable present, otherwise returns 0. 
- BOOL Return


RelayOutputState

RelayOutputState
Allows one of the relay outputs ( Q1 - Q2 ) to be switched on or off. 
- BYTE Channel
Range: 1 - 2 Where 1=Q1 / 2=Q2 
- BOOL State
0 = Relay Open Circuit / 1 = Relay Closed Circuit 
- VOID Return


TransistorOutputState

TransistorOutputState
Allows one of the high speed transistor outputs ( A - F ) to be pulled to GND, Pulled to +V or disabled. 
- BYTE Channel
Range: 1 - 6 where 1=A / 2=B / 3=C / 4=D / 5=E / 6=F 
- BYTE State
0 = Pull to Ground / 1 = Pull to +V / 2 = DisableOutput 
- VOID Return


TransistorPWMDuty

TransistorPWMDuty
Sets the PWM duty on the selected channel 
- BYTE Channel
Range: 1-4 Where 1=A / 2=B / 3=C / 4=D 
- BOOL EnableOrState
1 = Enable / 0 = State 
- UINT Duty
Range: 0 - 65535 
- VOID Return


TransistorPWMEnable

TransistorPWMEnable
Enables or disables PWM on the selected channel 
- BYTE Channel
Range: 1-4 Where 1=A / 2=B / 3=C / 4=D 
- BOOL EnableOrState
PWM on Enable Pin or State Pin - 1 = Enable / 0 = State 
- BOOL OnOrOff
1 = Enabled / 0 = Disabled 
- VOID Return


WriteEEPROM

WriteEEPROM
Write a single byte to a location in the EEPROM. 
- UINT Address
 
- BYTE Data
 
- VOID Return


Property reference

Properties
Transistor Output PWM Settings
Prescaler Divide
Allows the user to change the number of program cycles per PWM cycle count. Note that all PWM channels based on the same timer will share the same prescaler. 
Period Register
Allows the user to change the number of counts for the whole PWM period. Note that all PWM channels based on the same timer will share the same period overflow. PIC/AVR Range: 0 - 255 16-bit PIC Range: 0 - 65535 
PWM Timer
Timer associated with PWM to drive the output. Warning - All PWM channels linked to the same timer will share the same period and prescaler settings. 
Frequency (Hz)
 
Display Settings
Foreground Color
Specifies the initial foreground color. 
Background Color
Specifies the initial background color. 
Font
Font picker to decide which font to use on your display. 
Character Spacing
Sets the number of blank pixels between each character when printing text. Default 1. 
Space Width
Sets the number of horizontal pixels used to represent a space character. 
Pin Connections
CAN (2 x Internal + 1 x External MCP2515)
C1 TX
 
C1 RX
 
C2 TX
 
C2 RX
 
C3 MOSI
 
C3 MISO
 
C3 SCK
 
C3 CS
 
C3 INT
 
C3 RES
 
LIN
LIN TX
 
LIN RX
 
LIN Enable
 
Bluetooth RN4678
BT TX
 
BT RX
 
BT Reset
 
Wifi ESP12S
Wifi TX
 
Wifi RX
 
Wifi Reset
 
Ethernet W5500
ETH MOSI
 
ETH MISO
 
ETH SCK
 
ETH CS
 
ETH INT
 
ETH RES