Difference between revisions of "Component: MIAC AllCode API (dsPIC) (AllCode)"
From Flowcode Help
Jump to navigationJump to searchLine 44: | Line 44: | ||
''<span style="color:red;">No additional examples</span>'' | ''<span style="color:red;">No additional examples</span>'' | ||
+ | |||
+ | |||
Line 49: | Line 51: | ||
==Macro reference== | ==Macro reference== | ||
+ | ===CommsWrite=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 67: | Line 70: | ||
+ | ===WriteTrans=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 85: | Line 89: | ||
+ | ===LCDPixel=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 113: | Line 118: | ||
+ | ===CardCreate=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 131: | Line 137: | ||
+ | ===CardDelete=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 149: | Line 156: | ||
+ | ===LCDBitmap=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 177: | Line 185: | ||
+ | ===GetAPIVersion=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 190: | Line 199: | ||
+ | ===LCDNumber=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 208: | Line 218: | ||
+ | ===CardInserted=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 221: | Line 232: | ||
+ | ===ReadRTC=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 239: | Line 251: | ||
+ | ===CardOpen=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 257: | Line 270: | ||
+ | ===CommsRead=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 275: | Line 289: | ||
+ | ===ReadKey=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 288: | Line 303: | ||
+ | ===WriteRTC=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 311: | Line 327: | ||
+ | ===LCDBacklight=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 329: | Line 346: | ||
+ | ===WriteRelay=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 352: | Line 370: | ||
+ | ===LCDPrint=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 370: | Line 389: | ||
+ | ===LCDLine=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 403: | Line 423: | ||
+ | ===ReadInputs=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 416: | Line 437: | ||
+ | ===CardReadByte=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 429: | Line 451: | ||
+ | ===WriteRelays=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 447: | Line 470: | ||
+ | ===CardWriteByte=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 465: | Line 489: | ||
+ | ===LCDRect=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 498: | Line 523: | ||
+ | ===ReadAnalogInput=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 516: | Line 542: | ||
+ | ===CommsBaud=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 534: | Line 561: | ||
+ | ===LCDOptions=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 562: | Line 590: | ||
+ | ===LCDVerbose=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 580: | Line 609: | ||
+ | ===ReadDigitalInput=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 598: | Line 628: | ||
+ | ===PWMConfig=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 626: | Line 657: | ||
+ | ===PWMEnable=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 644: | Line 676: | ||
+ | ===PWMDuty=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 667: | Line 700: | ||
+ | ===LCDCursor=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 690: | Line 724: | ||
+ | ===WriteTran=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 713: | Line 748: | ||
+ | ===LCDClear=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- |
Revision as of 11:51, 3 February 2023
Author | Matrix TSL |
Version | 1.1 |
Category | AllCode |
Contents
- 1 MIAC AllCode API (dsPIC) component
- 2 Component Source Code
- 3 Detailed description
- 4 Examples
- 5 Macro reference
- 5.1 CommsWrite
- 5.2 WriteTrans
- 5.3 LCDPixel
- 5.4 CardCreate
- 5.5 CardDelete
- 5.6 LCDBitmap
- 5.7 GetAPIVersion
- 5.8 LCDNumber
- 5.9 CardInserted
- 5.10 ReadRTC
- 5.11 CardOpen
- 5.12 CommsRead
- 5.13 ReadKey
- 5.14 WriteRTC
- 5.15 LCDBacklight
- 5.16 WriteRelay
- 5.17 LCDPrint
- 5.18 LCDLine
- 5.19 ReadInputs
- 5.20 CardReadByte
- 5.21 WriteRelays
- 5.22 CardWriteByte
- 5.23 LCDRect
- 5.24 ReadAnalogInput
- 5.25 CommsBaud
- 5.26 LCDOptions
- 5.27 LCDVerbose
- 5.28 ReadDigitalInput
- 5.29 PWMConfig
- 5.30 PWMEnable
- 5.31 PWMDuty
- 5.32 LCDCursor
- 5.33 WriteTran
- 5.34 LCDClear
- 6 Property reference
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
CommsWrite
![]() |
CommsWrite |
Writes a byte to the alt communications channel | |
![]() |
Data |
Range: 0-255 | |
![]() |
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 |
LCDPixel
![]() |
LCDPixel |
Controls a single pixel on the MIAC display | |
![]() |
X |
Range: 0-119 | |
![]() |
Y |
Range: 0-49 | |
![]() |
State |
Range: 0-1 | |
![]() |
Return |
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 |
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 |
GetAPIVersion
![]() |
GetAPIVersion |
Gets the API version of the Robot ARM Firmware | |
![]() |
Return |
LCDNumber
![]() |
LCDNumber |
Prints a number to the MIAC display starting from the current cursor position. | |
![]() |
Value |
Range: -32678 - 32767 | |
![]() |
Return |
CardInserted
![]() |
CardInserted |
Checks to see if a card is present. Returns 0 for no card or 1 for card detected | |
![]() |
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 |
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 |
CommsRead
![]() |
CommsRead |
Reads a byte from the alt communications channel | |
![]() |
Timeout |
Range: 0-255 : 0 = Don't wait / 1-255 = ms | |
![]() |
Return |
ReadKey
![]() |
ReadKey |
Reads a keypress from the keypad. | |
![]() |
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 |
LCDBacklight
![]() |
LCDBacklight |
Controls the brightness of the LCD backlight. | |
![]() |
Brightness |
Range: 0-100 | |
![]() |
Return |
WriteRelay
![]() |
WriteRelay |
Allows a single relay to be switched on or off. | |
![]() |
Channel |
Range 1-4 | |
![]() |
Value |
0 = Off, 1 = On | |
![]() |
Return |
LCDPrint
![]() |
LCDPrint |
Prints a string to the MIAC display starting from the current cursor position. | |
![]() |
data |
Range: 0-21 | |
![]() |
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 |
ReadInputs
![]() |
ReadInputs |
Reads all digital inputs at once and returns as a binary value. Input 1 = Bit 0 Input 8 = Bit 7 | |
![]() |
Return |
CardReadByte
![]() |
CardReadByte |
Reads a byte from the open file. | |
![]() |
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 |
CardWriteByte
![]() |
CardWriteByte |
Appends a byte to the end of the open file. Returns 0 for success. | |
![]() |
data |
![]() |
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 |
ReadAnalogInput
![]() |
ReadAnalogInput |
Reads a single digital input. | |
![]() |
Channel |
![]() |
Return |
CommsBaud
![]() |
CommsBaud |
Sets the Baud rate of the alt communications channel | |
![]() |
Baud |
Range: 0-7 : 0=1200 / 7=115200 | |
![]() |
Return |
LCDOptions
![]() |
LCDOptions |
Controls some of the LCD options | |
![]() |
Foreground |
Range: 0-1 | |
![]() |
Background |
Range: 0-1 | |
![]() |
Transparent |
Range: 0-1 | |
![]() |
Return |
LCDVerbose
ReadDigitalInput
![]() |
ReadDigitalInput |
Reads a single digital input. | |
![]() |
Channel |
![]() |
Return |
PWMConfig
PWMEnable
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 |
LCDCursor
![]() |
LCDCursor |
Sets the cursor position for the MIAC display | |
![]() |
X |
Range: 0-21 | |
![]() |
Y |
Range: 0-4 | |
![]() |
Return |
WriteTran
![]() |
WriteTran |
Allows a single transistor output to be switched on or off. | |
![]() |
Channel |
Range 1-4 | |
![]() |
Value |
0 = Off, 1 = On | |
![]() |
Return |
LCDClear
![]() |
LCDClear |
Clears the MIAC display | |
![]() |
Return |
Property reference
![]() |
Properties |
![]() |
Connections |
![]() |
Operating Mode |
![]() |
API Connection Type |
API connection mode. COM - Bluetooth / RS232 / RS485 WIFI - Network | |
![]() |
Auto Detect |
![]() |
Baud |