Component: MIAC AllCode API (dsPIC) (AllCode)

From Flowcode Help
Jump to navigationJump to search
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 Pack

FREE

Detailed description

No detailed description exists yet for this component

Examples

Bluetooth based examples.

ZIP Icon.png MIAC AllCode Bluetooth


WIFI based examples.

ZIP Icon.png MIAC AllCode WIFI


USB Driver

ZIP Icon.png USB Serial Driver


Downloadable macro reference

Fc9-comp-macro.png CommsWrite
Writes a byte to the alt communications channel 
Fc9-u8-icon.png - BYTE Data
Range: 0-255 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png WriteTrans
Allows all transistor outputs to be switched on or off in a single command. 
Fc9-u8-icon.png - BYTE Value
Range: 0-15 or 0b0000 to 0b1111 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png LCDPixel
Controls a single pixel on the MIAC display 
Fc9-u8-icon.png - BYTE X
Range: 0-119 
Fc9-u8-icon.png - BYTE Y
Range: 0-49 
Fc9-u8-icon.png - BYTE State
Range: 0-1 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png CardCreate
Attempts to create a specific file on the card. Returns 0 for success, 255 for no card or error. 
Fc9-string-icon.png - STRING Filename
 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png CardDelete
Attempts to delete a specific file on the card. Returns 0 for success, 255 for no card or error. 
Fc9-string-icon.png - STRING Filename
 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png LCDBitmap
Draws a bitmap file from the SD card onto the MIAC display 
Fc9-u8-icon.png - BYTE X
Range: 0-119 
Fc9-u8-icon.png - BYTE Y
Range: 0-49 
Fc9-string-icon.png - STRING Filename
Range: 0-1 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png GetAPIVersion
Gets the API version of the Robot ARM Firmware 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png LCDNumber
Prints a number to the MIAC display starting from the current cursor position. 
Fc9-s16-icon.png - INT Value
Range: -32678 - 32767 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png CardInserted
Checks to see if a card is present. Returns 0 for no card or 1 for card detected 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png ReadRTC
Reads a value from the real time clock module. Used for getting the time or date. 
Fc9-u8-icon.png - BYTE Unit
0=Second 1=Minute 2=Hour 3=Day 4=Month 5=Year 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png 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. 
Fc9-string-icon.png - STRING Filename
 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png CommsRead
Reads a byte from the alt communications channel 
Fc9-u8-icon.png - BYTE Timeout
Range: 0-255 : 0 = Don't wait / 1-255 = ms 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png ReadKey
Reads a keypress from the keypad. 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png WriteRTC
Writes a value to the real time clock module. Used for setting the time or date. 
Fc9-u8-icon.png - BYTE Unit
0=Second 1=Minute 2=Hour 3=Day 4=Month 5=Year 
Fc9-u8-icon.png - BYTE Value
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png LCDBacklight
Controls the brightness of the LCD backlight. 
Fc9-u8-icon.png - BYTE Brightness
Range: 0-100 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png WriteRelay
Allows a single relay to be switched on or off. 
Fc9-u8-icon.png - BYTE Channel
Range 1-4 
Fc9-u8-icon.png - BYTE Value
0 = Off, 1 = On 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png LCDPrint
Prints a string to the MIAC display starting from the current cursor position. 
Fc9-string-icon.png - STRING data
Range: 0-21 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png LCDLine
Draws a single pixel width line on the MIAC display 
Fc9-u8-icon.png - BYTE X1
Range: 0-119 
Fc9-u8-icon.png - BYTE Y1
Range: 0-49 
Fc9-u8-icon.png - BYTE X2
Range: 0-119 
Fc9-u8-icon.png - BYTE Y2
Range: 0-49 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png ReadInputs
Reads all digital inputs at once and returns as a binary value. Input 1 = Bit 0 Input 8 = Bit 7 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png CardReadByte
Reads a byte from the open file. 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png WriteRelays
Allows all relays to be switched on or off in a single command. 
Fc9-u8-icon.png - BYTE Value
Range: 0-15 or 0b0000 to 0b1111 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png CardWriteByte
Appends a byte to the end of the open file. Returns 0 for success. 
Fc9-u8-icon.png - BYTE data
 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png LCDRect
Draws a single pixel rectangle on the MIAC display 
Fc9-u8-icon.png - BYTE X1
Range: 0-119 
Fc9-u8-icon.png - BYTE Y1
Range: 0-49 
Fc9-u8-icon.png - BYTE X2
Range: 0-119 
Fc9-u8-icon.png - BYTE Y2
Range: 0-49 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png ReadAnalogInput
Reads a single digital input. 
Fc9-u8-icon.png - BYTE Channel
 
Fc9-u16-icon.png - UINT Return


Fc9-comp-macro.png CommsBaud
Sets the Baud rate of the alt communications channel 
Fc9-u8-icon.png - BYTE Baud
Range: 0-7 : 0=1200 / 7=115200 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png LCDOptions
Controls some of the LCD options 
Fc9-u8-icon.png - BYTE Foreground
Range: 0-1 
Fc9-u8-icon.png - BYTE Background
Range: 0-1 
Fc9-u8-icon.png - BYTE Transparent
Range: 0-1 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png LCDVerbose
Controls the Verbose mode. When enabled the LCD automatically displays an account of the incoming API commands and parameters. When switched off the LCD is free for the user to control as required. 
Fc9-u8-icon.png - BYTE Mode
Range: 0-1 : 0=Off or User Mode / 1=API Verbose Mode 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png ReadDigitalInput
Reads a single digital input. 
Fc9-u8-icon.png - BYTE Channel
 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png PWMConfig
Channel = 0 - 5 : 0=EN_AB, 1=A, 2=B, 3=C, 4=D, 5=EN_CD Period = 0 - 65535 Scaler = 0 - 3 : 0=1:1 1=1:8 2=1:64 3=1:256 
Fc9-u8-icon.png - BYTE Channel
Range 0-1 
Fc9-u16-icon.png - UINT Period
Range: 0-65535 
Fc9-u8-icon.png - BYTE Scaler
Range: 0-3 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png PWMEnable
Allows pulse width modulated transistor outputs to be switched on or off. Bit 0 = Enable AB Bit 1 = A / Bit 2 = B Bit 3 = C / Bit 4 = D Bit 5 = Enable CD 
Fc9-u8-icon.png - BYTE EnableMask
Range 0-63 or 0b00000 to 0b111111 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png 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 
Fc9-u8-icon.png - BYTE Channel
Range 0-5 
Fc9-u16-icon.png - UINT Duty
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png LCDCursor
Sets the cursor position for the MIAC display 
Fc9-u8-icon.png - BYTE X
Range: 0-21 
Fc9-u8-icon.png - BYTE Y
Range: 0-4 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png WriteTran
Allows a single transistor output to be switched on or off. 
Fc9-u8-icon.png - BYTE Channel
Range 1-4 
Fc9-u8-icon.png - BYTE Value
0 = Off, 1 = On 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png LCDClear
Clears the MIAC display 
Fc9-void-icon.png - VOID Return



Property reference

Fc9-prop-icon.png Properties
Fc9-conn-icon.png Connections
Fc9-conn-icon.png Operating Mode
Fc9-type-16-icon.png API Connection Type
API connection mode. COM - Bluetooth / RS232 / RS485 WIFI - Network 
Fc9-type-7-icon.png Auto Detect
 
Fc9-type-14-icon.png Baud