Component: MIAC AllCode API (dsPIC) (AllCode): Difference between revisions
Appearance
No edit summary |
m Text replacement - "class="wikitable" style="width:60%; background-color:#FFFFFF;"" to "class="mtx-class-macrotable wikitable"" |
||
| Line 58: | Line 58: | ||
===CardCreate=== | ===CardCreate=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| 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]] | ||
| Line 77: | Line 77: | ||
===CardDelete=== | ===CardDelete=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| 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]] | ||
| Line 96: | Line 96: | ||
===CardInserted=== | ===CardInserted=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| 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]] | ||
| Line 110: | Line 110: | ||
===CardOpen=== | ===CardOpen=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| 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]] | ||
| Line 129: | Line 129: | ||
===CardReadByte=== | ===CardReadByte=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| 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]] | ||
| Line 143: | Line 143: | ||
===CardWriteByte=== | ===CardWriteByte=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| 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]] | ||
| Line 162: | Line 162: | ||
===CommsBaud=== | ===CommsBaud=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| 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]] | ||
| Line 181: | Line 181: | ||
===CommsRead=== | ===CommsRead=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| 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]] | ||
| Line 200: | Line 200: | ||
===CommsWrite=== | ===CommsWrite=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| 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]] | ||
| Line 219: | Line 219: | ||
===GetAPIVersion=== | ===GetAPIVersion=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| 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]] | ||
| Line 233: | Line 233: | ||
===LCDBacklight=== | ===LCDBacklight=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| 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]] | ||
| Line 252: | Line 252: | ||
===LCDBitmap=== | ===LCDBitmap=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| 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]] | ||
| Line 281: | Line 281: | ||
===LCDClear=== | ===LCDClear=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| 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]] | ||
| Line 295: | Line 295: | ||
===LCDCursor=== | ===LCDCursor=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| 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]] | ||
| Line 319: | Line 319: | ||
===LCDLine=== | ===LCDLine=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| 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]] | ||
| Line 353: | Line 353: | ||
===LCDNumber=== | ===LCDNumber=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| 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]] | ||
| Line 372: | Line 372: | ||
===LCDOptions=== | ===LCDOptions=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| 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]] | ||
| Line 401: | Line 401: | ||
===LCDPixel=== | ===LCDPixel=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| 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]] | ||
| Line 430: | Line 430: | ||
===LCDPrint=== | ===LCDPrint=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| 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]] | ||
| Line 449: | Line 449: | ||
===LCDRect=== | ===LCDRect=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| 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]] | ||
| Line 483: | Line 483: | ||
===LCDVerbose=== | ===LCDVerbose=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| 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]] | ||
| Line 502: | Line 502: | ||
===PWMConfig=== | ===PWMConfig=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| 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]] | ||
| Line 531: | Line 531: | ||
===PWMDuty=== | ===PWMDuty=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| 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]] | ||
| Line 555: | Line 555: | ||
===PWMEnable=== | ===PWMEnable=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| 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]] | ||
| Line 574: | Line 574: | ||
===ReadAnalogInput=== | ===ReadAnalogInput=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| 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]] | ||
| Line 593: | Line 593: | ||
===ReadDigitalInput=== | ===ReadDigitalInput=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| 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]] | ||
| Line 612: | Line 612: | ||
===ReadInputs=== | ===ReadInputs=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| 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]] | ||
| Line 626: | Line 626: | ||
===ReadKey=== | ===ReadKey=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| 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]] | ||
| Line 640: | Line 640: | ||
===ReadRTC=== | ===ReadRTC=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| 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]] | ||
| Line 659: | Line 659: | ||
===WriteRTC=== | ===WriteRTC=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| 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]] | ||
| Line 683: | Line 683: | ||
===WriteRelay=== | ===WriteRelay=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| 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]] | ||
| Line 707: | Line 707: | ||
===WriteRelays=== | ===WriteRelays=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| 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]] | ||
| Line 726: | Line 726: | ||
===WriteTran=== | ===WriteTran=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| 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]] | ||
| Line 750: | Line 750: | ||
===WriteTrans=== | ===WriteTrans=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| 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]] | ||
| Line 770: | Line 770: | ||
==Property reference== | ==Property reference== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] | ||
Revision as of 14:15, 13 July 2026
| Author | Matrix TSL |
| Version | 1.1 |
| Category | AllCode |
MIAC AllCode API (dsPIC) component
MIAC AllCode. dsPIC version of the MIAC loaded with the AllCode firmware. Usefull for SCADA, Control or Test applications. Allows you to control the MIAC using the programming language of choice. Compatible with simulation / Bluetooth / Wifi / RS232 and RS485
Component Source Code
Please click here to download the component source project: FC_Comp_Source_MIAC_AllCode_Component_Source.fcsx
Please click here to view the component source code (Beta): FC_Comp_Source_MIAC_AllCode_Component_Source.fcsx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
CardCreate
| CardCreate | |
| Attempts to create a specific file on the card. Returns 0 for success, 255 for no card or error. | |
| Filename | |
| Return | |
CardDelete
| CardDelete | |
| Attempts to delete a specific file on the card. Returns 0 for success, 255 for no card or error. | |
| Filename | |
| Return | |
CardInserted
| CardInserted | |
| Checks to see if a card is present. Returns 0 for no card or 1 for card detected | |
| Return | |
CardOpen
| CardOpen | |
| Attempts to open a specific file from the card. Returns 0 for file found and opened, 239 for file not found and 255 for no card. | |
| Filename | |
| Return | |
CardReadByte
| CardReadByte | |
| Reads a byte from the open file. | |
| Return | |
CardWriteByte
| CardWriteByte | |
| Appends a byte to the end of the open file. Returns 0 for success. | |
| data | |
| Return | |
CommsBaud
| CommsBaud | |
| Sets the Baud rate of the alt communications channel | |
| Baud | |
| Range: 0-7 : 0=1200 / 7=115200 | |
| Return | |
CommsRead
| CommsRead | |
| Reads a byte from the alt communications channel | |
| Timeout | |
| Range: 0-255 : 0 = Don't wait / 1-255 = ms | |
| Return | |
CommsWrite
| CommsWrite | |
| Writes a byte to the alt communications channel | |
| Data | |
| Range: 0-255 | |
| Return | |
GetAPIVersion
| GetAPIVersion | |
| Gets the API version of the Robot ARM Firmware | |
| Return | |
LCDBacklight
| LCDBacklight | |
| Controls the brightness of the LCD backlight. | |
| Brightness | |
| Range: 0-100 | |
| Return | |
LCDBitmap
| LCDBitmap | |
| Draws a bitmap file from the SD card onto the MIAC display | |
| X | |
| Range: 0-119 | |
| Y | |
| Range: 0-49 | |
| Filename | |
| Range: 0-1 | |
| Return | |
LCDClear
| LCDClear | |
| Clears the MIAC display | |
| Return | |
LCDCursor
| LCDCursor | |
| Sets the cursor position for the MIAC display | |
| X | |
| Range: 0-21 | |
| Y | |
| Range: 0-4 | |
| Return | |
LCDLine
| LCDLine | |
| Draws a single pixel width line on the MIAC display | |
| X1 | |
| Range: 0-119 | |
| Y1 | |
| Range: 0-49 | |
| X2 | |
| Range: 0-119 | |
| Y2 | |
| Range: 0-49 | |
| Return | |
LCDNumber
| LCDNumber | |
| Prints a number to the MIAC display starting from the current cursor position. | |
| Value | |
| Range: -32678 - 32767 | |
| Return | |
LCDOptions
| LCDOptions | |
| Controls some of the LCD options | |
| Foreground | |
| Range: 0-1 | |
| Background | |
| Range: 0-1 | |
| Transparent | |
| Range: 0-1 | |
| Return | |
LCDPixel
| LCDPixel | |
| Controls a single pixel on the MIAC display | |
| X | |
| Range: 0-119 | |
| Y | |
| Range: 0-49 | |
| State | |
| Range: 0-1 | |
| Return | |
LCDPrint
| LCDPrint | |
| Prints a string to the MIAC display starting from the current cursor position. | |
| data | |
| Range: 0-21 | |
| Return | |
LCDRect
| LCDRect | |
| Draws a single pixel rectangle on the MIAC display | |
| X1 | |
| Range: 0-119 | |
| Y1 | |
| Range: 0-49 | |
| X2 | |
| Range: 0-119 | |
| Y2 | |
| Range: 0-49 | |
| Return | |
LCDVerbose
PWMConfig
PWMDuty
| PWMDuty | |
| Sets a single PWM channel duty. Channel = 0 - 5 : 0=EN_AB, 1=A, 2=B, 3=C, 4=D, 5=EN_CD Duty = 0 - 65535 | |
| Channel | |
| Range 0-5 | |
| Duty | |
| Return | |
PWMEnable
ReadAnalogInput
| ReadAnalogInput | |
| Reads a single digital input. | |
| Channel | |
| Return | |
ReadDigitalInput
| ReadDigitalInput | |
| Reads a single digital input. | |
| Channel | |
| Return | |
ReadInputs
| ReadInputs | |
| Reads all digital inputs at once and returns as a binary value. Input 1 = Bit 0 Input 8 = Bit 7 | |
| Return | |
ReadKey
| ReadKey | |
| Reads a keypress from the keypad. | |
| Return | |
ReadRTC
| ReadRTC | |
| Reads a value from the real time clock module. Used for getting the time or date. | |
| Unit | |
| 0=Second 1=Minute 2=Hour 3=Day 4=Month 5=Year | |
| Return | |
WriteRTC
| WriteRTC | |
| Writes a value to the real time clock module. Used for setting the time or date. | |
| Unit | |
| 0=Second 1=Minute 2=Hour 3=Day 4=Month 5=Year | |
| Value | |
| Return | |
WriteRelay
| WriteRelay | |
| Allows a single relay to be switched on or off. | |
| Channel | |
| Range 1-4 | |
| Value | |
| 0 = Off, 1 = On | |
| Return | |
WriteRelays
| WriteRelays | |
| Allows all relays to be switched on or off in a single command. | |
| Value | |
| Range: 0-15 or 0b0000 to 0b1111 | |
| Return | |
WriteTran
| WriteTran | |
| Allows a single transistor output to be switched on or off. | |
| Channel | |
| Range 1-4 | |
| Value | |
| 0 = Off, 1 = On | |
| Return | |
WriteTrans
| WriteTrans | |
| Allows all transistor outputs to be switched on or off in a single command. | |
| Value | |
| Range: 0-15 or 0b0000 to 0b1111 | |
| Return | |
Property reference
| Properties | |
| Connections | |
| Operating Mode | |
| API Connection Type | |
| API connection mode. COM - Bluetooth / RS232 / RS485 WIFI - Network | |
| Auto Detect | |
| Baud | |