| 
				   | 
				
| (17 intermediate revisions by 2 users not shown) | 
| Line 5: | 
Line 5: | 
|   | |-  |   | |-  | 
|   | | width="20%" style="color:gray;" | Version  |   | | width="20%" style="color:gray;" | Version  | 
| − | | 1.0  | + | | 9.0  | 
|   | |-  |   | |-  | 
|   | | width="20%" style="color:gray;" | Category  |   | | width="20%" style="color:gray;" | Category  | 
| Line 19: | 
Line 19: | 
|   |  |   |  | 
|   |  |   |  | 
| − | ''No detailed description exists yet for this component''
  |   | 
|   |  |   |  | 
| − | ==Examples==
  |   | 
|   |  |   |  | 
|   |  |   |  | 
|   |  |   |  | 
|   |  |   |  | 
| − | There is a detailed walk through of the scenario detailed at the link below to go with this component.
  |   | 
|   |  |   |  | 
| − | [[Traffic_Light_2-Way|Traffic Light Scenario]]
  |   | 
|   |  |   |  | 
| − | ==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;" | '''ChangeI2CAddress'''
  |   | 
| − | |-
  |   | 
| − | | colspan="2" | Allows the I2C Device address to be changed which in turn allows more then one RFID reader to sit on the same physical I2C bus. Returns 1 if succesful. 
  |   | 
| − | |-
  |   | 
| − | |-
  |   | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
  |   | 
| − | | width="90%" | NewAddress
  |   | 
| − | |-
  |   | 
| − | | colspan="2" | Range: 8 to 119 or 0x08 - 0x77 
  |   | 
| − | |-
  |   | 
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:]] - 
  |   | 
| − | | 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;" | '''CheckButton'''
  |   | 
| − | |-
  |   | 
| − | | colspan="2" | Checks to see if the button has been pressed since the last read of CheckButton or ReadButton. 
  |   | 
| − | |-
  |   | 
| − | |-
  |   | 
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:]] - 
  |   | 
| − | | 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;" | '''ReadAxis'''
  |   | 
| − | |-
  |   | 
| − | | colspan="2" | Reads a single axis of the joystick and returns as a signed integer value. 
  |   | 
| − | |-
  |   | 
| − | |-
  |   | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
  |   | 
| − | | width="90%" | Axis
  |   | 
| − | |-
  |   | 
| − | | colspan="2" | Range 0-1 Where 0=X, 1=Y 
  |   | 
| − | |-
  |   | 
| − | | width="10%" align="center" | [[File:]] - 
  |   | 
| − | | width="90%" | Type
  |   | 
| − | |-
  |   | 
| − | | colspan="2" | 0 = Signed (-512 to 511), 1 = Unsigned (0 to 1023) 
  |   | 
| − | |-
  |   | 
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:]] - 
  |   | 
| − | | 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;" | '''ReadButton'''
  |   | 
| − | |-
  |   | 
| − | | colspan="2" | Checks to see if the button is currently pressed 
  |   | 
| − | |-
  |   | 
| − | |-
  |   | 
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:]] - 
  |   | 
| − | | 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;" | '''Initialise'''
  |   | 
| − | |-
  |   | 
| − | | colspan="2" | Initialises the I2C bus ready for communications with the module. 
  |   | 
| − | |-
  |   | 
| − | |-
  |   | 
| − | | 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;" | '''OpenPort'''
  |   | 
| − | |-
  |   | 
| − | | colspan="2" | Opens the currently selected COM port, allowing data to be sent and received. 
  |   | 
| − | |-
  |   | 
| − | |-
  |   | 
| − | | 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;" | '''SetProp'''
  |   | 
| − | |-
  |   | 
| − | | colspan="2" | Allows the COM port property to be set from a parent component. 
  |   | 
| − | |-
  |   | 
| − | |-
  |   | 
| − | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
  |   | 
| − | | width="90%" | PropName
  |   | 
| − | |-
  |   | 
| − | | colspan="2" |  
  |   | 
| − | |-
  |   | 
| − | | width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
  |   | 
| − | | width="90%" | PropVal
  |   | 
| − | |-
  |   | 
| − | | 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''
  |   | 
| − | |}
  |   | 
|   |  |   |  | 
|   |  |   |  | 
| − | {| 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;" | '''GetProp'''
  |   | 
| − | |-
  |   | 
| − | | colspan="2" | Allows the property filter for the COM port list to be copied to a parent component. 
  |   | 
| − | |-
  |   | 
| − | |-
  |   | 
| − | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
  |   | 
| − | | width="90%" | PropName
  |   | 
| − | |-
  |   | 
| − | | colspan="2" |  
  |   | 
| − | |-
  |   | 
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
  |   | 
| − | | 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;" | '''GetConsoleHandle'''
  |   | 
| − | |-
  |   | 
| − | | colspan="2" | Gets the handle to the console allowing data displaying on the panel etc. 
  |   | 
| − | |-
  |   | 
| − | |-
  |   | 
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:]] - 
  |   | 
| − | | width="90%" style="border-top: 2px solid #000;" | ''Return''
  |   | 
| − | |}
  |   | 
|   |  |   |  | 
|   |  |   |  | 
| − | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
  | + | ''No detailed description exists yet for this component''  | 
| − | |-
  |   | 
| − | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
  |   | 
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendByteArray'''
  |   | 
| − | |-
  |   | 
| − | | colspan="2" | Sends an array of bytes to the COM port. 
  |   | 
| − | |-
  |   | 
| − | |-
  |   | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
  |   | 
| − | | width="90%" | Data
  |   | 
| − | |-
  |   | 
| − | | colspan="2" | Data byte array to send 
  |   | 
| − | |-
  |   | 
| − | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
  |   | 
| − | | width="90%" | Length
  |   | 
| − | |-
  |   | 
| − | | colspan="2" | Number of bytes to send 
  |   | 
| − | |-
  |   | 
| − | | 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''
  |   | 
| − | |}
  |   | 
|   |  |   |  | 
|   | + | ==Examples==  | 
|   |  |   |  | 
| − | {| 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;" | '''ReceiveBinary16Bit'''
  |   | 
| − | |-
  |   | 
| − | | colspan="2" | Receives a binary 16-bit value split across two bytes. 
  |   | 
| − | |-
  |   | 
| − | |-
  |   | 
| − | | width="10%" align="center" | [[File:]] - 
  |   | 
| − | | width="90%" | MSBfirst
  |   | 
| − | |-
  |   | 
| − | | colspan="2" | 0=Least significant byte first, 1=Most significant byte first 
  |   | 
| − | |-
  |   | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
  |   | 
| − | | width="90%" | Timeout
  |   | 
| − | |-
  |   | 
| − | | colspan="2" | Max amount of time in ms to wait between bytes 
  |   | 
| − | |-
  |   | 
| − | | 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''
  |   | 
| − | |}
  |   | 
|   |  |   |  | 
|   |  |   |  | 
| − | {| 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;" | '''ReceiveFloat'''
  |   | 
| − | |-
  |   | 
| − | | colspan="2" | Attempts to receive a floating point number as ASCII characters and convert back into a numeric value. Note this function will receive until a timeout or a none numeric char is received, the none numeric char will be lost. 
  |   | 
| − | |-
  |   | 
| − | |-
  |   | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
  |   | 
| − | | width="90%" | Timeout
  |   | 
| − | |-
  |   | 
| − | | colspan="2" | Max time in ms to wait in between bytes 
  |   | 
| − | |-
  |   | 
| − | | width="10%" align="center" | [[File:]] - 
  |   | 
| − | | width="90%" | IgnoreData
  |   | 
| − | |-
  |   | 
| − | | colspan="2" | 0=Dont ignore any data, 1=Ignore any initial none numeric data 
  |   | 
| − | |-
  |   | 
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:]] - 
  |   | 
| − | | 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;" | '''SendFloat'''
  |   | 
| − | |-
  |   | 
| − | | colspan="2" | Sends out a floating point number as an ASCII String from the UART interface. 
  |   | 
| − | |-
  |   | 
| − | |-
  |   | 
| − | | width="10%" align="center" | [[File:]] - 
  |   | 
| − | | width="90%" | Number
  |   | 
| − | |-
  |   | 
| − | | 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''
  |   | 
| − | |}
  |   | 
|   |  |   |  | 
|   |  |   |  | 
| − | {| 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;" | '''SendHexNumber'''
  |   | 
| − | |-
  |   | 
| − | | colspan="2" | Sends out a number as an ASCII hexadecimal String from the UART interface. 
  |   | 
| − | |-
  |   | 
| − | |-
  |   | 
| − | | width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
  |   | 
| − | | width="90%" | Number
  |   | 
| − | |-
  |   | 
| − | | colspan="2" |  
  |   | 
| − | |-
  |   | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
  |   | 
| − | | width="90%" | NumChars
  |   | 
| − | |-
  |   | 
| − | | colspan="2" | Number of characters in the string data, 0 for auto, 2 for 0x00, 4 for 0x0000 
  |   | 
| − | |-
  |   | 
| − | | width="10%" align="center" | [[File:]] - 
  |   | 
| − | | width="90%" | Prefix
  |   | 
| − | |-
  |   | 
| − | | colspan="2" | Generate hexadecimal prefix 0x e.g. 1= 0xFF, 0= FF 
  |   | 
| − | |-
  |   | 
| − | | 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;" | '''SetFlowControl'''
  |   | 
| − | |-
  |   | 
| − | | colspan="2" | Allows the Flowcontrol signals to be enabled or disabled. 
  |   | 
| − | |-
  |   | 
| − | |-
  |   | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
  |   | 
| − | | width="90%" | State
  |   | 
| − | |-
  |   | 
| − | | colspan="2" | A value of 0 disables flow control, 1 or above willl enable flow control. 
  |   | 
| − | |-
  |   | 
| − | | 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;"
  | + | ''<span style="color:red;">No additional examples</span>''  | 
| − | |-
  |   | 
| − | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
  |   | 
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OpenPort'''
  |   | 
| − | |-
  |   | 
| − | | colspan="2" | Opens the currently selected COM port, allowing data to be sent and received. 
  |   | 
| − | |-
  |   | 
| − | |-
  |   | 
| − | | 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==  | 
|   |  |   |  | 
|   | + | ===ChangeI2CAddress===  | 
|   | {| 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;" | '''ReceiveHexNumber'''  | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ChangeI2CAddress'''  | 
|   | |-  |   | |-  | 
| − | | colspan="2" | Attempts to receive a hex number as ASCII characters and convert back into a numeric value. Note this function will receive until a timeout or a none hexadecimal char is received, the none numeric char will be lost.   | + | | colspan="2" | Allows the I2C Device address to be changed which in turn allows more then one RFID reader to sit on the same physical I2C bus. Returns 1 if succesful.   | 
|   | |-  |   | |-  | 
|   | |-  |   | |-  | 
|   | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE  |   | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE  | 
| − | | width="90%" | Timeout  | + | | width="90%" | NewAddress  | 
|   | |-  |   | |-  | 
| − | | colspan="2" | Max time in ms to wait in between bytes   | + | | colspan="2" | Range: 8 to 119 or 0x08 - 0x77   | 
| − | |-
  |   | 
| − | | width="10%" align="center" | [[File:]] -  
  |   | 
| − | | width="90%" | IgnoreData
  |   | 
| − | |-
  |   | 
| − | | colspan="2" | 0=Dont ignore any data, 1=Ignore any initial none numeric data 
  |   | 
| − | |-
  |   | 
| − | | width="10%" align="center" | [[File:]] - 
  |   | 
| − | | width="90%" | Prefix
  |   | 
|   | |-  |   | |-  | 
| − | | colspan="2" | Look for prefix before receiving, 1=0xFF, 0=FF 
  | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL  | 
| − | |-
  |   | 
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u32-icon.png]] - ULONG  |   | 
|   | | width="90%" style="border-top: 2px solid #000;" | ''Return''  |   | | width="90%" style="border-top: 2px solid #000;" | ''Return''  | 
|   | |}  |   | |}  | 
|   |  |   |  | 
|   |  |   |  | 
|   | + | ===CheckButton===  | 
|   | {| 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;" | '''SetProp'''  | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CheckButton'''  | 
|   | |-  |   | |-  | 
| − | | colspan="2" | Allows the COM port property to be set from a parent component.   | + | | colspan="2" | Checks to see if the button has been pressed since the last read of CheckButton or ReadButton.   | 
| − | |-
  |   | 
| − | |-
  |   | 
| − | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
  |   | 
| − | | width="90%" | PropName
  |   | 
|   | |-  |   | |-  | 
| − | | colspan="2" |  
  |   | 
|   | |-  |   | |-  | 
| − | | width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
  | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL  | 
| − | | width="90%" | PropVal
  |   | 
| − | |-
  |   | 
| − | | 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''  | 
|   | |}  |   | |}  | 
|   |  |   |  | 
|   |  |   |  | 
|   | + | ===Initialise===  | 
|   | {| 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;" | '''SendBinary32Bit'''  | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''  | 
|   | |-  |   | |-  | 
| − | | colspan="2" | Sends out a 32-bit binary value split across four bytes.   | + | | colspan="2" | Initialises the I2C bus ready for communications with the module.   | 
| − | |-
  |   | 
| − | |-
  |   | 
| − | | width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
  |   | 
| − | | width="90%" | Value
  |   | 
| − | |-
  |   | 
| − | | colspan="2" |  
  |   | 
| − | |-
  |   | 
| − | | width="10%" align="center" | [[File:]] - 
  |   | 
| − | | width="90%" | MSBfirst
  |   | 
|   | |-  |   | |-  | 
| − | | colspan="2" | 0=Least significant byte first, 1=Most significant byte first 
  |   | 
|   | |-  |   | |-  | 
|   | | 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 399: | 
Line 108: | 
|   |  |   |  | 
|   |  |   |  | 
|   | + | ===ReadAxis===  | 
|   | {| 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;" | '''SendBinaryFloat'''  | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadAxis'''  | 
|   | |-  |   | |-  | 
| − | | colspan="2" | Sends out a 32-bit binary floating point value split across four bytes.   | + | | colspan="2" | Reads a single axis of the joystick and returns as a signed integer value.   | 
| − | |-
  |   | 
| − | |-
  |   | 
| − | | width="10%" align="center" | [[File:]] - 
  |   | 
| − | | width="90%" | Value
  |   | 
| − | |-
  |   | 
| − | | colspan="2" |  
  |   | 
| − | |-
  |   | 
| − | | width="10%" align="center" | [[File:]] - 
  |   | 
| − | | width="90%" | MSBfirst
  |   | 
| − | |-
  |   | 
| − | | colspan="2" | 0=Least significant byte first, 1=Most significant byte first 
  |   | 
| − | |-
  |   | 
| − | | 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;" | '''GetProp'''
  |   | 
| − | |-
  |   | 
| − | | colspan="2" | Allows the property filter for the COM port list to be copied to a parent component. 
  |   | 
| − | |-
  |   | 
| − | |-
  |   | 
| − | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
  |   | 
| − | | width="90%" | PropName
  |   | 
| − | |-
  |   | 
| − | | colspan="2" |  
  |   | 
| − | |-
  |   | 
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
  |   | 
| − | | 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;" | '''ReceiveByteArray'''
  |   | 
| − | |-
  |   | 
| − | | colspan="2" | Attempts to receive an array of bytes using the COM port Returns the number of bytes received.  
  |   | 
|   | |-  |   | |-  | 
|   | |-  |   | |-  | 
|   | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE  |   | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE  | 
| − | | width="90%" | Data  | + | | width="90%" | Axis  | 
|   | |-  |   | |-  | 
| − | | colspan="2" |    | + | | colspan="2" | Range 0-1 Where 0=X, 1=Y   | 
|   | |-  |   | |-  | 
| − | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT  | + | | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL  | 
| − | | width="90%" | MaxLength  | + | | width="90%" | Type  | 
|   | |-  |   | |-  | 
| − | | colspan="2" | Max number of bytes to try and read   | + | | colspan="2" | 0 = Signed (-512 to 511), 1 = Unsigned (0 to 1023)   | 
|   | |-  |   | |-  | 
| − | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
  | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s16-icon.png]] - INT  | 
| − | | width="90%" | Timeout
  |   | 
| − | |-
  |   | 
| − | | colspan="2" | Time to wait for incoming data in milliseconds 
  |   | 
| − | |-
  |   | 
| − | | 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''  | 
|   | |}  |   | |}  | 
|   |  |   |  | 
|   |  |   |  | 
|   | + | ===ReadButton===  | 
|   | {| 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;" | '''ReceiveString'''  | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadButton'''  | 
|   | |-  |   | |-  | 
| − | | colspan="2" | Attempts to receive an string using the COM port Returns the number of bytes received.    | + | | colspan="2" | Checks to see if the button is currently pressed   | 
| − | |-
  |   | 
| − | |-
  |   | 
| − | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
  |   | 
| − | | width="90%" | Timeout
  |   | 
| − | |-
  |   | 
| − | | colspan="2" | Time to wait for incoming data in milliseconds 
  |   | 
| − | |-
  |   | 
| − | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
  |   | 
| − | | width="90%" | MaxLength
  |   | 
| − | |-
  |   | 
| − | | colspan="2" | Max number of bytes to try and read 
  |   | 
| − | |-
  |   | 
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
  |   | 
| − | | 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;" | '''PWMEnable'''
  |   | 
| − | |-
  |   | 
| − | | 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%" | EnableMask
  |   | 
| − | |-
  |   | 
| − | | 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="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;" | '''Initialise'''
  |   | 
|   | |-  |   | |-  | 
| − | | colspan="2" |  
  |   | 
|   | |-  |   | |-  | 
| − | |-
  | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL  | 
| − | | 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''  | 
|   | |}  |   | |}  | 
| − | 
  |   | 
| − | 
  |   | 
| − | {| 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;" | '''GetProp'''
  |   | 
| − | |-
  |   | 
| − | | colspan="2" | Allows the property filter for the COM port list to be copied to a parent component. 
  |   | 
| − | |-
  |   | 
| − | |-
  |   | 
| − | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
  |   | 
| − | | width="90%" | PropName
  |   | 
| − | |-
  |   | 
| − | | colspan="2" |  
  |   | 
| − | |-
  |   | 
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
  |   | 
| − | | width="90%" style="border-top: 2px solid #000;" | ''Return''
  |   | 
| − | |}
  |   | 
| − | 
  |   | 
| − | 
  |   | 
|   |  |   |  | 
|   |  |   |  | 
| Line 554: | 
Line 158: | 
|   | |-  |   | |-  | 
|   | | colspan="2" | Decides if the joystick automatically returns to the center position when released. Yes: The joystick will return to the center when released. No: The joystick will remain in the current position when released.   |   | | colspan="2" | Decides if the joystick automatically returns to the center position when released. Yes: The joystick will return to the center when released. No: The joystick will remain in the current position when released.   | 
| − | |-
  |   | 
| − | | width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
  |   | 
| − | | width="90%" | X Min
  |   | 
| − | |-
  |   | 
| − | | colspan="2" |  
  |   | 
| − | |-
  |   | 
| − | | width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
  |   | 
| − | | width="90%" | X Max
  |   | 
| − | |-
  |   | 
| − | | colspan="2" |  
  |   | 
| − | |-
  |   | 
| − | | width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
  |   | 
| − | | width="90%" | Y Min
  |   | 
| − | |-
  |   | 
| − | | colspan="2" |  
  |   | 
| − | |-
  |   | 
| − | | width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
  |   | 
| − | | width="90%" | Y Max
  |   | 
| − | |-
  |   | 
| − | | colspan="2" |  
  |   | 
|   | |-  |   | |-  | 
|   | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]  |   | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]  | 
| Line 580: | 
Line 164: | 
|   | | colspan="2" | External device address used to communicate with the module. Default 32 or 0x20   |   | | colspan="2" | External device address used to communicate with the module. Default 32 or 0x20   | 
|   | |-  |   | |-  | 
| − | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]  | + | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]  | 
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connections'''   | + | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connections  | 
|   | |-  |   | |-  | 
|   | |-  |   | |-  | 
| Line 614: | 
Line 198: | 
|   | | colspan="2" | On older microcontroller devices there is a potential for the I2C hardware channel to lock up if there is not  a 10ms delay between an I2C stop event and the next I2C start event.  Most modern microcontrollers will not have a problem so this property can be disabled to speed up the  I2C communications.    |   | | colspan="2" | On older microcontroller devices there is a potential for the I2C hardware channel to lock up if there is not  a 10ms delay between an I2C stop event and the next I2C start event.  Most modern microcontrollers will not have a problem so this property can be disabled to speed up the  I2C communications.    | 
|   | |-  |   | |-  | 
| − | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]  | + | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]  | 
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Simulations'''   | + | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation  | 
|   | |-  |   | |-  | 
|   | |-  |   | |-  | 
| Line 638: | 
Line 222: | 
|   | | colspan="2" | Specifies the injector component on the panel to interact with to provide comms simulation.   |   | | colspan="2" | Specifies the injector component on the panel to interact with to provide comms simulation.   | 
|   | |}  |   | |}  | 
|   | + |  | 
|   | + | ==Component Source Code==  | 
|   | + |  | 
|   | + | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_Sparkfun_Quiic_Joystick.fcfx FC_Comp_Source_Sparkfun_Quiic_Joystick.fcfx]  | 
|   | + |  | 
|   | + | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_Sparkfun_Quiic_Joystick.fcfx FC_Comp_Source_Sparkfun_Quiic_Joystick.fcfx]  |