Component: MIAC (dsPIC) (MIAC (dsPIC)) (MIAC Module)

From Flowcode Help
Jump to navigationJump to search


Author Matrix TSL
Version 1.2 (Release)
Category MIAC Module


Image MIAC (dsPIC) (MIAC (dsPIC)) component

MIAC - Matrix Industrial Automotive Controller (dsPIC)


Examples

No additional examples


Downloadable macro reference

RelayOFF

Turns off the requested relay given by parameter RelayID, values 1 to 4

Parameters

BYTE RelayID
The relay to turn off. From 1 to 4.


Return value

This call does not return a value


InputANALOG_10Bit

No additional information


Parameters

BYTE InputID
The input to read. From 1 to 8.


Return value

INT


PrintString

Prints the given character string to the display at the current cursor position and moves the cursor position.

Parameters

<- STRING Str
The string to send to the display.
This parameter may be returned back to the caller


Return value

This call does not return a value


GetKeypad

Returns the key code of the key that is pressed, otherwise if nothing is pressed then returns 255

Parameters

This macro has no parameters


Return value

BYTE


DisplayStart

Initialise the display ready for use

Parameters

This macro has no parameters


Return value

This call does not return a value


PrintNumber

Prints the given number to the display starting at the current cursor position and moves the cursor position.

Parameters

INT n


Return value

This call does not return a value


PrintASCII

Prints the given character to the display at the current cursor position and increments the cursor position.

Parameters

BYTE Char
ASCII code of the character to print.


Return value

This call does not return a value


DrawLine

Draws or clears a line from start at sx:sy to end at ex:ey

Parameters

BYTE sx
Start column position
BYTE sy
Start row position
BYTE ex
End column position
BYTE ey
End row position
BYTE state
1=active pixel, 0=cleared pixel


Return value

This call does not return a value


PrintFormattedNumber

Will allow you to print a number up to 32-bits with signed or unsigned formatting.

Signed = -2147483648 to 2147483647

Unsigned = 0 to 4294967295

Parameters

ULONG Number
Enter the number or variable to print to the LCD
BOOL Format
0=Signed, 1=Unsigned


Return value

This call does not return a value


DrawRect

Draws a rectangular box from x1,y1 to x2,y2

Parameters

BYTE x1
BYTE y1
BYTE x2
BYTE y2
BYTE state
1=draw pixel, 0=clear pixel


Return value

This call does not return a value


DisplayClear

Clears the display to white space

Parameters

This macro has no parameters


Return value

This call does not return a value


RelayON

Turns on the requested relay given by parameter RelayID, values 1 to 4

Parameters

BYTE RelayID
The relay to turn on from 1 to 4.


Return value

This call does not return a value


OutputOFF

Outputs a digital low state on the output requested by parameter TransID

(Outputs 1 to 4)

Parameters

BYTE TransID
1 to 4 (Outputs A to D)


Return value

This call does not return a value


DrawPixel

Draws, or clears, a pixel at point x,y

Parameters

BYTE px
BYTE py
BYTE state
state = 0 clears the pixel, else draws the pixel


Return value

This call does not return a value


DisplayCursor

Moves the display cursor to the given position.

If the cursor is set to the origin at x=0, y=0, then the next character sent to the display will appear in the top left corner.

Parameters

BYTE x
Position of the cursor in characters from left to right.
BYTE y
The line to move the cursor to.


Return value

This call does not return a value


OutputON

Outputs a digital high state on the output requested by parameter TransID

(Outputs 1 to 4)

Parameters

BYTE TransID
1 to 4 (Outputs A to D)


Return value

This call does not return a value


InputDIGITAL

Returns the digital state of the input requested by parameter InputID

(Inputs 1 to 8)

Parameters

BYTE InputID
The input number from 1 to 8.


Return value

BYTE


DisplayLight

Turns the display backlight on or off

Parameters

BYTE state


Return value

This call does not return a value


DrawGlyph

Draws a character glyph on the display at position px, py

Parameters

BYTE glyph
The glyph ident number
BYTE px
pixel column relative to the drawing origin (top left)
BYTE py
pixel row relative to the drawing origin (top left)
BYTE mode
0=opaque/cleared background, 1=transparent background


Return value

This call does not return a value


InputANALOG

Returns the 8 bit value for the analogue input requested by parameter InputID

(Inputs 1 to 8)

Parameters

BYTE InputID
The input to read from 1 to 8.


Return value

BYTE


Simulation macro reference

EvClick

No additional information


Parameters

This macro has no parameters


Return value

This call does not return a value



Property reference

This component does not contain any properties