Difference between revisions of "Component: MIAC (dsPIC) (MIAC (dsPIC)) (Misc)"
From Flowcode Help
Jump to navigationJump to search| (3 intermediate revisions by the same user not shown) | |||
| Line 57: | Line 57: | ||
| ''<span style="color:red;">No additional examples</span>'' | ''<span style="color:red;">No additional examples</span>'' | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| Line 63: | Line 71: | ||
| ==Macro reference== | ==Macro reference== | ||
| + | ===DisplayClear=== | ||
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| 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" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DisplayClear''' | 
| − | |||
| − | |||
| |- | |- | ||
| + | | colspan="2" | Clears the display to white space  | ||
| |- | |- | ||
| − | |||
| − | |||
| − | |||
| − | |||
| |- | |- | ||
| | 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 81: | Line 85: | ||
| + | ===DisplayCursor=== | ||
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| 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" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DisplayCursor''' | 
| + | |- | ||
| + | | colspan="2" | Moves the display cursor to the given position. If the cursor is set to the origin at x=0, y=0, then the next character sent to the display will appear in the top left corner.   | ||
| + | |- | ||
| |- | |- | ||
| − | |  | + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | 
| + | | width="90%" | x | ||
| |- | |- | ||
| + | | colspan="2" | Position of the cursor in characters from left to right.  | ||
| |- | |- | ||
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| − | | width="90%" |  | + | | width="90%" | y | 
| |- | |- | ||
| − | | colspan="2" | The  | + | | colspan="2" | The line to move the cursor to.  | 
| |- | |- | ||
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9- | + | | 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'' | ||
| |} | |} | ||
| + | ===DisplayLight=== | ||
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| 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" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DisplayLight''' | 
| |- | |- | ||
| − | | colspan="2" |  | + | | colspan="2" | Turns the display backlight on or off  | 
| |- | |- | ||
| |- | |- | ||
| − | | width="10%" align="center" | [[File:Fc9- | + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | 
| − | | width="90%" |  | + | | width="90%" | state | 
| |- | |- | ||
| − | | colspan="2" |  | + | | colspan="2" |   | 
| |- | |- | ||
| | 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 117: | Line 128: | ||
| − | + | ===DisplayStart=== | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
| |- | |- | ||
| Line 143: | Line 142: | ||
| + | ===DrawGlyph=== | ||
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| 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" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DrawGlyph''' | 
| |- | |- | ||
| − | | colspan="2" |  | + | | colspan="2" | Draws a character glyph on the display at position px, py  | 
| |- | |- | ||
| |- | |- | ||
| − | | width="10%" align="center" | [[File:Fc9- | + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | 
| − | | width="90%" |  | + | | width="90%" | glyph | 
| |- | |- | ||
| − | | colspan="2" |   | + | | colspan="2" | The glyph ident number  | 
| |- | |- | ||
| − | | width="10%" align="center | + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | 
| − | | width="90% | + | | width="90%" | px | 
| − | |||
| − | |||
| − | |||
| − | |||
| |- | |- | ||
| − | |  | + | | colspan="2" | pixel column relative to the drawing origin (top left)  | 
| − | |||
| |- | |- | ||
| − | |  | + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | 
| + | | width="90%" | py | ||
| |- | |- | ||
| + | | colspan="2" | pixel row relative to the drawing origin (top left)  | ||
| |- | |- | ||
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| − | | width="90%" |  | + | | width="90%" | mode | 
| |- | |- | ||
| − | | colspan="2" |  | + | | colspan="2" | 0=opaque/cleared background, 1=transparent background  | 
| |- | |- | ||
| | 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 179: | Line 176: | ||
| + | ===DrawLine=== | ||
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
| |- | |- | ||
| Line 217: | Line 215: | ||
| + | ===DrawPixel=== | ||
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| 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" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DrawPixel''' | 
| |- | |- | ||
| − | | colspan="2" |  | + | | colspan="2" | Draws, or clears, a pixel at point x,y  | 
| |- | |- | ||
| |- | |- | ||
| − | | width="10%" align="center" | [[File:Fc9- | + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | 
| − | | width="90%" |  | + | | width="90%" | px | 
| + | |- | ||
| + | | colspan="2" |   | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | py | ||
| |- | |- | ||
| − | | colspan="2" |  | + | | colspan="2" |   | 
| |- | |- | ||
| − | | width="10%" align="center" | [[File:Fc9- | + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | 
| − | | width="90%" |  | + | | width="90%" | state | 
| |- | |- | ||
| − | | colspan="2" | 0 | + | | colspan="2" | state = 0 clears the pixel, else draws the pixel  | 
| |- | |- | ||
| | 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 240: | Line 244: | ||
| + | ===DrawRect=== | ||
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
| |- | |- | ||
| Line 278: | Line 283: | ||
| + | ===GetKeypad=== | ||
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| 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" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetKeypad''' | 
| |- | |- | ||
| − | | colspan="2" |  | + | | colspan="2" | Returns the key code of the key that is pressed, otherwise if nothing is pressed then returns 255  | 
| |- | |- | ||
| |- | |- | ||
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9- | + | | 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'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
| |} | |} | ||
| + | ===InputANALOG=== | ||
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| 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" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''InputANALOG''' | 
| |- | |- | ||
| − | | colspan="2" |  | + | | colspan="2" | Returns the 8 bit value for the analogue input requested by parameter InputID  (Inputs 1 to 8)  | 
| |- | |- | ||
| |- | |- | ||
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| − | | width="90%" |  | + | | width="90%" | InputID | 
| |- | |- | ||
| − | | colspan="2" | The  | + | | colspan="2" | The input to read from 1 to 8.  | 
| |- | |- | ||
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9- | + | | 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'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
| |} | |} | ||
| + | ===InputANALOG_10Bit=== | ||
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| 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" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''InputANALOG_10Bit''' | 
| |- | |- | ||
| − | | colspan="2" |  | + | | colspan="2" |   | 
| |- | |- | ||
| |- | |- | ||
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| − | | width="90%" |  | + | | width="90%" | InputID | 
| |- | |- | ||
| − | | colspan="2" | 1 to  | + | | colspan="2" | The input to read.  From 1 to 8.  | 
| |- | |- | ||
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9- | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s16-icon.png]] - INT | 
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
| |} | |} | ||
| + | ===InputDIGITAL=== | ||
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| 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" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''InputDIGITAL''' | 
| |- | |- | ||
| − | | colspan="2" |  | + | | colspan="2" | Returns the digital state of the input requested by parameter InputID  (Inputs 1 to 8)   | 
| |- | |- | ||
| |- | |- | ||
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| − | | width="90%" |  | + | | width="90%" | InputID | 
| + | |- | ||
| + | | colspan="2" | The input number from 1 to 8.  | ||
| + | |- | ||
| + | | 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'' | ||
| + | |} | ||
| + | |||
| + | |||
| + | ===OutputOFF=== | ||
| + | {| 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;" | '''OutputOFF''' | ||
| |- | |- | ||
| − | |  | + | | colspan="2" | Outputs a digital low state on the output requested by parameter TransID  (Outputs 1 to 4)   | 
| − | |||
| |- | |- | ||
| − | |||
| |- | |- | ||
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| − | | width="90%" |  | + | | width="90%" | TransID | 
| |- | |- | ||
| − | | colspan="2" |  | + | | colspan="2" | 1 to 4 (Outputs A to D)  | 
| |- | |- | ||
| | 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 355: | Line 373: | ||
| + | ===OutputON=== | ||
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| 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" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OutputON''' | 
| |- | |- | ||
| − | | colspan="2" |  | + | | colspan="2" | Outputs a digital high state on the output requested by parameter TransID  (Outputs 1 to 4)   | 
| |- | |- | ||
| |- | |- | ||
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| − | | width="90%" |  | + | | width="90%" | TransID | 
| |- | |- | ||
| − | | colspan="2" |  | + | | colspan="2" | 1 to 4 (Outputs A to D)  | 
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| |- | |- | ||
| | 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 378: | Line 392: | ||
| + | ===PrintASCII=== | ||
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| 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" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PrintASCII''' | 
| |- | |- | ||
| − | | colspan="2" |  | + | | colspan="2" | Prints the given character to the display at the current cursor position and increments the cursor position.  | 
| |- | |- | ||
| |- | |- | ||
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| − | | width="90%" |  | + | | width="90%" | Char | 
| |- | |- | ||
| − | | colspan="2" |  | + | | colspan="2" | ASCII code of the character to print.  | 
| |- | |- | ||
| | 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 396: | Line 411: | ||
| + | ===PrintFormattedNumber=== | ||
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| 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" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PrintFormattedNumber''' | 
| + | |- | ||
| + | | colspan="2" | Will allow you to print a number up to 32-bits with signed or unsigned formatting. Signed = -2147483648 to 2147483647 Unsigned = 0 to 4294967295  | ||
| + | |- | ||
| |- | |- | ||
| − | |  | + | | width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG | 
| + | | width="90%" | Number | ||
| |- | |- | ||
| + | | colspan="2" | Enter the number or variable to print to the LCD  | ||
| |- | |- | ||
| − | | width="10%" align="center" | [[File:Fc9- | + | | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL | 
| − | | width="90%" |  | + | | width="90%" | Format | 
| |- | |- | ||
| − | | colspan="2" |  | + | | colspan="2" | 0=Signed, 1=Unsigned  | 
| |- | |- | ||
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9- | + | | 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'' | ||
| |} | |} | ||
| + | ===PrintNumber=== | ||
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| 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" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PrintNumber''' | 
| |- | |- | ||
| − | | colspan="2" |  | + | | colspan="2" | Prints the given number to the display starting at the current cursor position and moves the cursor position.  | 
| |- | |- | ||
| |- | |- | ||
| − | | width="10%" align="center" | [[File:Fc9- | + | | width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT | 
| − | | width="90%" |  | + | | width="90%" | n | 
| |- | |- | ||
| | colspan="2" |   | | colspan="2" |   | ||
| Line 432: | Line 454: | ||
| + | ===PrintString=== | ||
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| 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" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PrintString''' | 
| |- | |- | ||
| − | | colspan="2" |  | + | | colspan="2" | Prints the given character string to the display at the current cursor position and moves the cursor position.  | 
| |- | |- | ||
| |- | |- | ||
| − | | width="10%" align="center" | [[File:Fc9- | + | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING | 
| − | | width="90%" |  | + | | width="90%" | Str | 
| |- | |- | ||
| − | | colspan="2" | The  | + | | colspan="2" | The string to send to the display.  | 
| |- | |- | ||
| − | | width="10%" align="center" | [[File:Fc9- | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | 
| − | | width="90%" |  | + | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | 
| + | |} | ||
| + | |||
| + | |||
| + | ===RelayOFF=== | ||
| + | {| 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;" | '''RelayOFF''' | ||
| |- | |- | ||
| − | |  | + | | colspan="2" | Turns off the requested relay given by parameter RelayID, values 1 to 4  | 
| − | |||
| |- | |- | ||
| − | |||
| |- | |- | ||
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| − | | width="90%" |  | + | | width="90%" | RelayID | 
| |- | |- | ||
| − | | colspan="2" |  | + | | colspan="2" | The relay to turn off. From 1 to 4.  | 
| |- | |- | ||
| | 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 465: | Line 492: | ||
| + | ===RelayON=== | ||
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| 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" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RelayON''' | 
| |- | |- | ||
| − | | colspan="2" |  | + | | colspan="2" | Turns on the requested relay given by parameter RelayID, values 1 to 4  | 
| |- | |- | ||
| |- | |- | ||
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| − | | width="90%" |  | + | | width="90%" | RelayID | 
| |- | |- | ||
| − | | colspan="2" | The  | + | | colspan="2" | The relay to turn on from 1 to 4.  | 
| |- | |- | ||
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9- | + | | 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'' | ||
| |} | |} | ||
| − | |||
| − | |||
Latest revision as of 13:11, 7 February 2023
| Author | Matrix TSL | 
| Version | 1.2 | 
| Category | Misc | 
Contents
- 1 MIAC (dsPIC) component
- 2 Component Source Code
- 3 Detailed description
- 4 Examples
- 5 Macro reference
- 5.1 DisplayClear
- 5.2 DisplayCursor
- 5.3 DisplayLight
- 5.4 DisplayStart
- 5.5 DrawGlyph
- 5.6 DrawLine
- 5.7 DrawPixel
- 5.8 DrawRect
- 5.9 GetKeypad
- 5.10 InputANALOG
- 5.11 InputANALOG_10Bit
- 5.12 InputDIGITAL
- 5.13 OutputOFF
- 5.14 OutputON
- 5.15 PrintASCII
- 5.16 PrintFormattedNumber
- 5.17 PrintNumber
- 5.18 PrintString
- 5.19 RelayOFF
- 5.20 RelayON
 
- 6 Property reference
MIAC (dsPIC) component
MIAC - Matrix Industrial Automotive Controller (dsPIC)
Component Source Code
Please click here to download the component source project: FC_Comp_Source_MIAC_(dsPIC).fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_MIAC_(dsPIC).fcfx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
DisplayClear
|   | DisplayClear | 
| Clears the display to white space | |
|  - VOID | Return | 
DisplayCursor
DisplayLight
|   | DisplayLight | 
| Turns the display backlight on or off | |
|  - BYTE | state | 
|  - VOID | Return | 
DisplayStart
|   | DisplayStart | 
| Initialise the display ready for use | |
|  - VOID | Return | 
DrawGlyph
DrawLine
DrawPixel
|   | DrawPixel | 
| Draws, or clears, a pixel at point x,y | |
|  - BYTE | px | 
|  - BYTE | py | 
|  - BYTE | state | 
| state = 0 clears the pixel, else draws the pixel | |
|  - VOID | Return | 
DrawRect
|   | DrawRect | 
| Draws a rectangular box from x1,y1 to x2,y2 | |
|  - BYTE | x1 | 
|  - BYTE | y1 | 
|  - BYTE | x2 | 
|  - BYTE | y2 | 
|  - BYTE | state | 
| 1=draw pixel, 0=clear pixel | |
|  - VOID | Return | 
GetKeypad
|   | GetKeypad | 
| Returns the key code of the key that is pressed, otherwise if nothing is pressed then returns 255 | |
|  - BYTE | Return | 
InputANALOG
|   | InputANALOG | 
| Returns the 8 bit value for the analogue input requested by parameter InputID (Inputs 1 to 8) | |
|  - BYTE | InputID | 
| The input to read from 1 to 8. | |
|  - BYTE | Return | 
InputANALOG_10Bit
|   | InputANALOG_10Bit | 
|  - BYTE | InputID | 
| The input to read. From 1 to 8. | |
|  - INT | Return | 
InputDIGITAL
|   | InputDIGITAL | 
| Returns the digital state of the input requested by parameter InputID (Inputs 1 to 8) | |
|  - BYTE | InputID | 
| The input number from 1 to 8. | |
|  - BYTE | Return | 
OutputOFF
|   | OutputOFF | 
| Outputs a digital low state on the output requested by parameter TransID (Outputs 1 to 4) | |
|  - BYTE | TransID | 
| 1 to 4 (Outputs A to D) | |
|  - VOID | Return | 
OutputON
|   | OutputON | 
| Outputs a digital high state on the output requested by parameter TransID (Outputs 1 to 4) | |
|  - BYTE | TransID | 
| 1 to 4 (Outputs A to D) | |
|  - VOID | Return | 
PrintASCII
|   | PrintASCII | 
| Prints the given character to the display at the current cursor position and increments the cursor position. | |
|  - BYTE | Char | 
| ASCII code of the character to print. | |
|  - VOID | Return | 
PrintFormattedNumber
PrintNumber
|   | PrintNumber | 
| Prints the given number to the display starting at the current cursor position and moves the cursor position. | |
|  - INT | n | 
|  - VOID | Return | 
PrintString
|   | PrintString | 
| Prints the given character string to the display at the current cursor position and moves the cursor position. | |
|  - STRING | Str | 
| The string to send to the display. | |
|  - VOID | Return | 
RelayOFF
|   | RelayOFF | 
| Turns off the requested relay given by parameter RelayID, values 1 to 4 | |
|  - BYTE | RelayID | 
| The relay to turn off. From 1 to 4. | |
|  - VOID | Return | 
RelayON
|   | RelayON | 
| Turns on the requested relay given by parameter RelayID, values 1 to 4 | |
|  - BYTE | RelayID | 
| The relay to turn on from 1 to 4. | |
|  - VOID | Return | 
Property reference
|   | Properties | 


