Jump to content

Component: MIAC AllCode (MIAC: PC Peripheral): Difference between revisions

From Flowcode Help
Created page with "{| style="width:50%" |- | width="20%" style="color:gray;" | Author | Matrix TSL |- | width="20%" style="color:gray;" | Version | 1.0 |- | width="20%" style="color:gray..."
 
No edit summary
 
(9 intermediate revisions by the same user not shown)
Line 17: Line 17:
==Component Source Code==
==Component Source Code==


Please click here for the component source code: [https://www.flowcode.co.uk/wikicopy/componentsource/FC_Comp_Source_MIAC_AllCode_Firmware.fcfx FC_Comp_Source_MIAC_AllCode_Firmware.fcfx]
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_MIAC_AllCode_Firmware.fcfx FC_Comp_Source_MIAC_AllCode_Firmware.fcfx]
 
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_MIAC_AllCode_Firmware.fcfx FC_Comp_Source_MIAC_AllCode_Firmware.fcfx]


==Detailed description==
==Detailed description==




Line 36: Line 50:


==Examples==
==Examples==




Line 66: Line 92:




==Downloadable macro reference==


{| 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;" | '''CommsWrite'''
|-
| colspan="2" | Writes a byte to the alt communications channel 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Data
|-
| colspan="2" | Range: 0-255 
|-
| 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''
|}




{| 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;" | '''WriteTrans'''
|-
| colspan="2" | Allows all transistor outputs to be switched on or off in a single command. 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Value
|-
| colspan="2" | Range: 0-15 or 0b0000 to 0b1111 
|-
| 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''
|}




{| 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;" | '''LCDPixel'''
|-
| colspan="2" | Controls a single pixel on the MIAC display 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | X
|-
| colspan="2" | Range: 0-119 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Y
|-
| colspan="2" | Range: 0-49 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | State
|-
| colspan="2" | Range: 0-1 
|-
| 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''
|}




==Macro reference==
===CardCreate===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
Line 150: Line 123:




===CardDelete===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
Line 168: Line 142:




===CardInserted===
{| 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;" | '''LCDBitmap'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CardInserted'''
|-
| colspan="2" | Draws a bitmap file from the SD card onto the MIAC display 
|-
|-
|-
| colspan="2" | Checks to see if a card is present. Returns 0 for no card or 1 for card detected 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | X
|-
| colspan="2" | Range: 0-119 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Y
|-
| colspan="2" | Range: 0-49 
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | Filename
|-
| colspan="2" | Range: 0-1 
|-
| 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''
|}
 
 
{| 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;" | '''GetAPIVersion'''
|-
| colspan="2" | Gets the API version of the Robot ARM Firmware 
|-
|-
|-
|-
Line 209: Line 156:




===CardOpen===
{| 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;" | '''LCDNumber'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CardOpen'''
|-
|-
| colspan="2" | Prints a number to the MIAC display starting from the current cursor position. 
| colspan="2" | 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. 
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | Value
| width="90%" | Filename
|-
|-
| colspan="2" | Range: -32678 - 32767 
| 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-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




===CardReadByte===
{| 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;" | '''CardInserted'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CardReadByte'''
|-
|-
| colspan="2" | Checks to see if a card is present. Returns 0  for no card or 1 for card detected 
| colspan="2" | Reads a byte from the open file. 
|-
|-
|-
|-
Line 240: Line 189:




===CardWriteByte===
{| 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;" | '''ReadRTC'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CardWriteByte'''
|-
|-
| colspan="2" | Reads a value from the real time clock module. Used for getting the time or date. 
| colspan="2" | Appends a byte to the end of the open file. Returns 0 for success. 
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Unit
| width="90%" | data
|-
|-
| colspan="2" | 0=Second 1=Minute 2=Hour 3=Day 4=Month 5=Year 
| colspan="2" |  
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
Line 258: Line 208:




===CommsBaud===
{| 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;" | '''CardOpen'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CommsBaud'''
|-
|-
| colspan="2" | 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. 
| colspan="2" | Sets the Baud rate of the alt communications channel 
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Filename
| width="90%" | Baud
|-
|-
| colspan="2" |  
| colspan="2" | Range: 0-7 : 0=1200 / 7=115200 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| 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''
|}
|}




===CommsRead===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
Line 294: Line 246:




===CommsWrite===
{| 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;" | '''ReadKey'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CommsWrite'''
|-
| colspan="2" | Writes a byte to the alt communications channel 
|-
|-
|-
| colspan="2" | Reads a keypress from the keypad. 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Data
|-
|-
| colspan="2" | Range: 0-255 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| 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''
|}
|}




===GetAPIVersion===
{| 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;" | '''WriteRTC'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetAPIVersion'''
|-
|-
| colspan="2" | Writes a value to the real time clock module. Used for setting the time or date. 
| colspan="2" | Gets the API version of the Robot ARM Firmware 
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Unit
|-
| colspan="2" | 0=Second 1=Minute 2=Hour 3=Day 4=Month 5=Year 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Value
|-
| colspan="2" |  
|-
| 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''
|}
|}




===LCDBacklight===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
Line 348: Line 298:




===LCDBitmap===
{| 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;" | '''WriteRelay'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''LCDBitmap'''
|-
|-
| colspan="2" | Allows a single relay to be switched on or off. 
| colspan="2" | Draws a bitmap file from the SD card onto the MIAC display 
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
| width="90%" | X
|-
|-
| colspan="2" | Range 1-4 
| colspan="2" | Range: 0-119 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Value
| width="90%" | Y
|-
| colspan="2" | Range: 0-49 
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | Filename
|-
| colspan="2" | Range: 0-1 
|-
| 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''
|}
 
 
===LCDClear===
{| 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;" | '''LCDClear'''
|-
| colspan="2" | Clears the MIAC display 
|-
|-
| colspan="2" | 0 = Off, 1 = On 
|-
|-
| 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 371: Line 341:




===LCDCursor===
{| 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;" | '''LCDPrint'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''LCDCursor'''
|-
|-
| colspan="2" | Prints a string to the MIAC display starting from the current cursor position. 
| colspan="2" | Sets the cursor position for the MIAC display 
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | data
| width="90%" | X
|-
|-
| colspan="2" | Range: 0-21 
| colspan="2" | Range: 0-21 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Y
|-
| colspan="2" | Range: 0-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 389: Line 365:




===LCDLine===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
Line 422: Line 399:




===LCDNumber===
{| 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;" | '''ReadInputs'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''LCDNumber'''
|-
| colspan="2" | Prints a number to the MIAC display starting from the current cursor position. 
|-
|-
|-
| colspan="2" | Reads all digital inputs at once and returns as a binary value. Input 1 = Bit 0 Input 8 = Bit 7 
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| width="90%" | Value
|-
|-
| colspan="2" | Range: -32678 - 32767 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| 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''
|}
|}




===LCDOptions===
{| 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;" | '''CardReadByte'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''LCDOptions'''
|-
| colspan="2" | Controls some of the LCD options 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Foreground
|-
| colspan="2" | Range: 0-1 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Background
|-
| colspan="2" | Range: 0-1 
|-
|-
| colspan="2" | Reads a byte from the open file. 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Transparent
|-
|-
| colspan="2" | Range: 0-1 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| 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''
|}
|}




===LCDPixel===
{| 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;" | '''WriteRelays'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''LCDPixel'''
|-
| colspan="2" | Controls a single pixel on the MIAC display 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | X
|-
|-
| colspan="2" | Allows all relays to be switched on or off in a single command. 
| colspan="2" | Range: 0-119 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Y
|-
| colspan="2" | Range: 0-49 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Value
| width="90%" | State
|-
|-
| colspan="2" | Range: 0-15 or 0b0000 to 0b1111 
| colspan="2" | Range: 0-1 
|-
|-
| 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 466: Line 476:




===LCDPrint===
{| 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;" | '''CardWriteByte'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''LCDPrint'''
|-
|-
| colspan="2" | Appends a byte to the end of the open file. Returns 0 for success. 
| colspan="2" | Prints a string to the MIAC display starting from the current cursor position. 
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | data
| width="90%" | data
|-
|-
| colspan="2" |  
| colspan="2" | Range: 0-21 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| 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''
|}
|}




===LCDRect===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
Line 517: Line 529:




===LCDVerbose===
{| 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;" | '''ReadAnalogInput'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''LCDVerbose'''
|-
|-
| colspan="2" | Reads a single digital input. 
| colspan="2" | 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. 
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
| width="90%" | Mode
|-
|-
| colspan="2" |  
| colspan="2" | Range: 0-1 : 0=Off or User Mode / 1=API Verbose Mode 
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| 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''
|}
|}




===PWMConfig===
{| 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;" | '''CommsBaud'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PWMConfig'''
|-
| colspan="2" | Sets the PWM configuration. Channel = 0 - 1 : 0 = EN_AB, A, B / 1 = EN_CD, C, D Period = 0 - 65535 Scaler = 0 - 3 :  0=1:1 1=1:8 2=1:64 3=1:256 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | Range 0-1 
|-
|-
| colspan="2" | Sets the Baud rate of the alt communications channel 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Period
|-
|-
| colspan="2" | Range: 0-65535 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Baud
| width="90%" | Scaler
|-
|-
| colspan="2" | Range: 0-7 : 0=1200 / 7=115200 
| colspan="2" | Range: 0-3 
|-
|-
| 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 553: Line 577:




===PWMDuty===
{| 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;" | '''LCDOptions'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PWMDuty'''
|-
|-
| colspan="2" | Controls some of the LCD options 
| colspan="2" | 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 
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Foreground
| width="90%" | Channel
|-
| colspan="2" | Range 0-5 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Duty
|-
| colspan="2" |  
|-
| 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''
|}
 
 
===PWMEnable===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| colspan="2" | Range: 0-1 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PWMEnable'''
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| colspan="2" | 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 
| width="90%" | Background
|-
|-
| colspan="2" | Range: 0-1 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Transparent
| width="90%" | EnableMask
|-
|-
| colspan="2" | Range: 0-1 
| colspan="2" | Range 0-63 or 0b00000 to 0b111111 
|-
|-
| 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 581: Line 620:




===ReadAnalogInput===
{| 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;" | '''LCDVerbose'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadAnalogInput'''
|-
|-
| colspan="2" | 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. 
| colspan="2" | Reads a single digital input. 
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Mode
| width="90%" | Channel
|-
|-
| colspan="2" | Range: 0-1 : 0=Off or User Mode / 1=API Verbose Mode 
| 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-u16-icon.png]] - UINT
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




===ReadDigitalInput===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
Line 617: Line 658:




===ReadInputs===
{| 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;" | '''PWMConfig'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadInputs'''
|-
| colspan="2" | Reads all digital inputs at once and returns as a binary value. Input 1 = Bit 0 Input 8 = Bit 7 
|-
|-
| 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''
|}
 
 
===ReadKey===
{| 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;" | '''ReadKey'''
|-
|-
| colspan="2" | Sets the PWM configuration. Channel = 0 - 1 : 0 = EN_AB, A, B / 1 = EN_CD, C, D Period = 0 - 65535 Scaler = 0 - 3 :  0=1:1 1=1:8 2=1:64 3=1:256 
| colspan="2" | Reads a keypress from the keypad. 
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
===ReadRTC===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| colspan="2" | Range 0-1 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadRTC'''
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| colspan="2" | Reads a value from the real time clock module. Used for getting the time or date. 
| width="90%" | Period
|-
|-
| colspan="2" | Range: 0-65535 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Scaler
| width="90%" | Unit
|-
|-
| colspan="2" | Range: 0-3 
| colspan="2" | 0=Second 1=Minute 2=Hour 3=Day 4=Month 5=Year 
|-
|-
| 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-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




===WriteRTC===
{| 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;" | '''PWMEnable'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WriteRTC'''
|-
| colspan="2" | Writes a value to the real time clock module. Used for setting the time or date. 
|-
|-
|-
| colspan="2" | 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 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Unit
|-
|-
| colspan="2" | 0=Second 1=Minute 2=Hour 3=Day 4=Month 5=Year 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | EnableMask
| width="90%" | Value
|-
|-
| colspan="2" | Range 0-63 or 0b00000 to 0b111111 
| 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 663: Line 729:




===WriteRelay===
{| 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;" | '''PWMDuty'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WriteRelay'''
|-
|-
| colspan="2" | 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 
| colspan="2" | Allows a single relay to be switched on or off. 
|-
|-
|-
|-
Line 674: Line 741:
| width="90%" | Channel
| width="90%" | Channel
|-
|-
| colspan="2" | Range 0-5 
| colspan="2" | Range 1-4 
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Duty
| width="90%" | Value
|-
|-
| colspan="2" |  
| colspan="2" | 0 = Off, 1 = On 
|-
|-
| 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 686: Line 753:




===WriteRelays===
{| 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;" | '''LCDCursor'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WriteRelays'''
|-
|-
| colspan="2" | Sets the cursor position for the MIAC display 
| colspan="2" | Allows all relays to be switched on or off in a single command. 
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | X
| width="90%" | Value
|-
|-
| colspan="2" | Range: 0-21 
| colspan="2" | Range: 0-15 or 0b0000 to 0b1111 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Y
|-
| colspan="2" | Range: 0-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 709: Line 772:




===WriteTran===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
Line 732: Line 796:




===WriteTrans===
{| 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;" | '''LCDClear'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WriteTrans'''
|-
| colspan="2" | Allows all transistor outputs to be switched on or off in a single command. 
|-
|-
|-
| colspan="2" | Clears the MIAC display 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Value
|-
|-
| colspan="2" | Range: 0-15 or 0b0000 to 0b1111 
|-
|-
| 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
| 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.0
Category MIAC: PC Peripheral


MIAC AllCode 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_Firmware.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_MIAC_AllCode_Firmware.fcfx

Detailed description

No detailed description exists yet for this component

Examples

Bluetooth based examples.

MIAC AllCode Bluetooth


WIFI based examples.

MIAC AllCode WIFI


USB Driver

USB Serial Driver







Macro reference

CardCreate

CardCreate
Attempts to create a specific file on the card. Returns 0 for success, 255 for no card or error. 
- STRING Filename
 
- BYTE Return


CardDelete

CardDelete
Attempts to delete a specific file on the card. Returns 0 for success, 255 for no card or error. 
- STRING Filename
 
- BYTE Return


CardInserted

CardInserted
Checks to see if a card is present. Returns 0 for no card or 1 for card detected 
- BYTE 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. 
- STRING Filename
 
- BYTE Return


CardReadByte

CardReadByte
Reads a byte from the open file. 
- BYTE Return


CardWriteByte

CardWriteByte
Appends a byte to the end of the open file. Returns 0 for success. 
- BYTE data
 
- BYTE Return


CommsBaud

CommsBaud
Sets the Baud rate of the alt communications channel 
- BYTE Baud
Range: 0-7 : 0=1200 / 7=115200 
- VOID Return


CommsRead

CommsRead
Reads a byte from the alt communications channel 
- BYTE Timeout
Range: 0-255 : 0 = Don't wait / 1-255 = ms 
- BYTE Return


CommsWrite

CommsWrite
Writes a byte to the alt communications channel 
- BYTE Data
Range: 0-255 
- VOID Return


GetAPIVersion

GetAPIVersion
Gets the API version of the Robot ARM Firmware 
- BYTE Return


LCDBacklight

LCDBacklight
Controls the brightness of the LCD backlight. 
- BYTE Brightness
Range: 0-100 
- VOID Return


LCDBitmap

LCDBitmap
Draws a bitmap file from the SD card onto the MIAC display 
- BYTE X
Range: 0-119 
- BYTE Y
Range: 0-49 
- STRING Filename
Range: 0-1 
- VOID Return


LCDClear

LCDClear
Clears the MIAC display 
- VOID Return


LCDCursor

LCDCursor
Sets the cursor position for the MIAC display 
- BYTE X
Range: 0-21 
- BYTE Y
Range: 0-4 
- VOID Return


LCDLine

LCDLine
Draws a single pixel width line on the MIAC display 
- BYTE X1
Range: 0-119 
- BYTE Y1
Range: 0-49 
- BYTE X2
Range: 0-119 
- BYTE Y2
Range: 0-49 
- VOID Return


LCDNumber

LCDNumber
Prints a number to the MIAC display starting from the current cursor position. 
- INT Value
Range: -32678 - 32767 
- VOID Return


LCDOptions

LCDOptions
Controls some of the LCD options 
- BYTE Foreground
Range: 0-1 
- BYTE Background
Range: 0-1 
- BYTE Transparent
Range: 0-1 
- VOID Return


LCDPixel

LCDPixel
Controls a single pixel on the MIAC display 
- BYTE X
Range: 0-119 
- BYTE Y
Range: 0-49 
- BYTE State
Range: 0-1 
- VOID Return


LCDPrint

LCDPrint
Prints a string to the MIAC display starting from the current cursor position. 
- STRING data
Range: 0-21 
- VOID Return


LCDRect

LCDRect
Draws a single pixel rectangle on the MIAC display 
- BYTE X1
Range: 0-119 
- BYTE Y1
Range: 0-49 
- BYTE X2
Range: 0-119 
- BYTE Y2
Range: 0-49 
- VOID Return


LCDVerbose

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. 
- BYTE Mode
Range: 0-1 : 0=Off or User Mode / 1=API Verbose Mode 
- VOID Return


PWMConfig

PWMConfig
Sets the PWM configuration. Channel = 0 - 1 : 0 = EN_AB, A, B / 1 = EN_CD, C, D Period = 0 - 65535 Scaler = 0 - 3 : 0=1:1 1=1:8 2=1:64 3=1:256 
- BYTE Channel
Range 0-1 
- UINT Period
Range: 0-65535 
- BYTE Scaler
Range: 0-3 
- VOID Return


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 
- BYTE Channel
Range 0-5 
- UINT Duty
 
- VOID Return


PWMEnable

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 
- BYTE EnableMask
Range 0-63 or 0b00000 to 0b111111 
- VOID Return


ReadAnalogInput

ReadAnalogInput
Reads a single digital input. 
- BYTE Channel
 
- UINT Return


ReadDigitalInput

ReadDigitalInput
Reads a single digital input. 
- BYTE Channel
 
- BYTE Return


ReadInputs

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


ReadKey

ReadKey
Reads a keypress from the keypad. 
- BYTE Return


ReadRTC

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


WriteRTC

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


WriteRelay

WriteRelay
Allows a single relay to be switched on or off. 
- BYTE Channel
Range 1-4 
- BYTE Value
0 = Off, 1 = On 
- VOID Return


WriteRelays

WriteRelays
Allows all relays to be switched on or off in a single command. 
- BYTE Value
Range: 0-15 or 0b0000 to 0b1111 
- VOID Return


WriteTran

WriteTran
Allows a single transistor output to be switched on or off. 
- BYTE Channel
Range 1-4 
- BYTE Value
0 = Off, 1 = On 
- VOID Return


WriteTrans

WriteTrans
Allows all transistor outputs to be switched on or off in a single command. 
- BYTE Value
Range: 0-15 or 0b0000 to 0b1111 
- VOID Return


Property reference

Properties
Connections
Operating Mode
Mode
Configures how the simulation component functions, does it simply simulate or does it control real hardware. 
API Connection Type
API connection mode. COM - Bluetooth / RS232 / RS485 WIFI - Network 
AutoDetect Port
 
Baud