|  |   | 
| (4 intermediate revisions by the same user not shown) | 
| Line 22: | Line 22: | 
|  |  |  |  | 
|  | ==Detailed description== |  | ==Detailed description== | 
|  | + |  | 
|  | + |  | 
|  |  |  |  | 
|  |  |  |  | 
| Line 34: | Line 36: | 
|  |  |  |  | 
|  | ==Examples== |  | ==Examples== | 
|  | + |  | 
|  | + |  | 
|  |  |  |  | 
|  |  |  |  | 
| Line 47: | Line 51: | 
|  |  |  |  | 
|  |  |  |  | 
| − | ==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;" | '''ReceiveByte'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Receives a single data byte from the Bluetooth module. 0-255 signifies valid data / 256 signifies no data available. 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 |  | 
| − | | width="90%" | Timeout
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Amount of time to wait in milliseconds 0=Wait forever 
 |  | 
| − | |-
 |  | 
| − | | 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;" | '''SendString'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Sends a string to the Bluetooth module. 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 |  | 
| − | | width="90%" | Command
 |  | 
| − | |-
 |  | 
| − | | colspan="2" |  
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" | SendCR
 |  | 
| − | |-
 |  | 
| − | | 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;" | '''LeaveCommandMode'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Leaves command mode allowing data to be passed back and forth, 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | 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== | 
|  | + |  | 
|  | + | ===ConnectToMAC=== | 
|  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | 
|  | |- |  | |- | 
| Line 121: | Line 82: | 
|  |  |  |  | 
|  |  |  |  | 
| − | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 | + | ===EnterCommandMode=== | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 |  | 
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendCommand'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Sends a command string to the Bluetooth module. Returns: 0 = No Reply / 1 = Command sent ok 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 |  | 
| − | | width="90%" | Command
 |  | 
| − | |-
 |  | 
| − | | colspan="2" |  
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" | SendCR
 |  | 
| − | |-
 |  | 
| − | | colspan="2" |  
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" | DiscardReply
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | 0=Do not touch the reply, 1=Wait for reply and remove from buffer 
 |  | 
| − | |-
 |  | 
| − | | 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''
 |  | 
| − | |}
 |  | 
| − |   |  | 
| − |   |  | 
| − | {| 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;" | '''ReceiveCount'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Returns the number of bytes currently sat waiting in the receive buffer. 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | 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;" | '''ReadString'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Copies the incoming data from the data string array to a local string variable.  
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" | NumBytes
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Maximum 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;" | '''SendByte'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Sends a single data byte out to the Bluetooth module. 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" | Data
 |  | 
| − | |-
 |  | 
| − | | 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;" |  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | 
|  | |- |  | |- | 
| Line 211: | Line 96: | 
|  |  |  |  | 
|  |  |  |  | 
| − | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 | + | ===GetMACAddress=== | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 |  | 
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WaitForStringValue'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Allows us to wait and check for an incoming value. Returns 1 if the string value is found otherwise returns 0. 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 |  | 
| − | | width="90%" | Value
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | String value to look for 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 |  | 
| − | | width="90%" | Timeout
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Length of time to wait in milliseconds 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
 |  | 
| − | | width="90%" style="border-top: 2px solid #000;" | ''Return''
 |  | 
| − | |}
 |  | 
| − |   |  | 
| − |   |  | 
|  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | 
|  | |- |  | |- | 
| Line 247: | Line 110: | 
|  |  |  |  | 
|  |  |  |  | 
|  | + | ===Initialise=== | 
|  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | 
|  | |- |  | |- | 
| Line 260: | Line 124: | 
|  |  |  |  | 
|  |  |  |  | 
| − |   | + | ===LeaveCommandMode=== | 
| − |   |  | 
| − | ==Property reference== |  | 
| − |   |  | 
| − | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 |  | 
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 |  | 
| − | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Bluetooth Settings
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
 |  | 
| − | | width="90%" | Device Name
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Sets the friendly name of the Bluetooth device. 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
 |  | 
| − | | width="90%" | Pair Key
 |  | 
| − | |-
 |  | 
| − | | colspan="2" |  
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 |  | 
| − | | width="90%" | Discoverable
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Is the Bluetooth module discoverable by default? 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 |  | 
| − | | width="90%" | Reply Timeout
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Specifies the amount of time to wait for incoming data before timing out in milliseconds. Default 2000 = 2 seconds. 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 |  | 
| − | | width="90%" | RX Buffer Size
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Amount of RAM memory to dedicate to receiving responses and incoming data from the BT module. Default 40 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 |  | 
| − | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connections
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 |  | 
| − | | width="90%" | Channel
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | UART Channel selector Software channels are bit banged using generic I/O pins but are not as reliable as hardware channels. Hardware channels use the selected peripheral on-board the target microcontroller. 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 |  | 
| − | | width="90%" | Baud Options
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Baud rate option selector 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 |  | 
| − | | width="90%" | Baud Rate
 |  | 
| − | |-
 |  | 
| − | | colspan="2" |  
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
 |  | 
| − | | width="90%" | TX
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Pin to be used for Transmit data 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 |  | 
| − | | width="90%" | TX Remap Pin
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Allows the hardware transmit pin to be configured from a list of available pins based on your target device, 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
 |  | 
| − | | width="90%" | RX
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Pin to be used for Receive data 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 |  | 
| − | | width="90%" | RX Remap Pin
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Allows the hardware receive pin to be configured from a list of available pins based on your target device, 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 |  | 
| − | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 |  | 
| − | | width="90%" | Simulate Comms
 |  | 
| − | |-
 |  | 
| − | | colspan="2" |  
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 |  | 
| − | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 |  | 
| − | | width="90%" | Scope Traces
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Selects if the scope traces are automatically added to the data recorder window or not.     Simulation - draws an approximation of the UART data onto the scope trace.     ICT - sets up the scope trace for incoming data and adds UART packet decoding at the correct BAUD. 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 |  | 
| − | | width="90%" | Console Data
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Selects if the console data is automatically generated or not 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 |  | 
| − | | width="90%" | Console Columns
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Number of characters that can be displayed on a single line of the console. 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 |  | 
| − | | width="90%" | Data Source
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Simulation data source used to allow the component to connect to various remote devices     Nothing - Simulation data is ignored     COM port - Routes the communication data to and from a physical or virtual COM port      Injector - Routes the communication data via a data injector component on the Panel. 
 |  | 
| − | |}==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;" | '''ReceiveByte'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Receives a single data byte from the Bluetooth module. 0-255 signifies valid data / 256 signifies no data available. 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 |  | 
| − | | width="90%" | Timeout
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Amount of time to wait in milliseconds 0=Wait forever 
 |  | 
| − | |-
 |  | 
| − | | 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;" | '''SendString'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Sends a string to the Bluetooth module. 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 |  | 
| − | | width="90%" | Command
 |  | 
| − | |-
 |  | 
| − | | colspan="2" |  
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" | SendCR
 |  | 
| − | |-
 |  | 
| − | | 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;" |  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | 
|  | |- |  | |- | 
| Line 426: | Line 138: | 
|  |  |  |  | 
|  |  |  |  | 
| − | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 | + | ===ReadString=== | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 |  | 
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ConnectToMAC'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Connects to a specific Bluetooth MAC address. Waits up to 5 seconds for connection to be established. Returns 1 if connection was successful. 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 |  | 
| − | | width="90%" | MACAddress
 |  | 
| − | |-
 |  | 
| − | | colspan="2" |  
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
 |  | 
| − | | 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;" | '''SendCommand'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Sends a command string to the Bluetooth module. Returns: 0 = No Reply / 1 = Command sent ok 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 |  | 
| − | | width="90%" | Command
 |  | 
| − | |-
 |  | 
| − | | colspan="2" |  
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" | SendCR
 |  | 
| − | |-
 |  | 
| − | | colspan="2" |  
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" | DiscardReply
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | 0=Do not touch the reply, 1=Wait for reply and remove from buffer 
 |  | 
| − | |-
 |  | 
| − | | 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''
 |  | 
| − | |}
 |  | 
| − |   |  | 
| − |   |  | 
| − | {| 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;" | '''ReceiveCount'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Returns the number of bytes currently sat waiting in the receive buffer. 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | 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;" |  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | 
|  | |- |  | |- | 
| Line 503: | Line 157: | 
|  |  |  |  | 
|  |  |  |  | 
| − | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 | + | ===ReceiveByte=== | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 |  | 
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendByte'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Sends a single data byte out to the Bluetooth module. 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" | Data
 |  | 
| − | |-
 |  | 
| − | | 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;" | '''EnterCommandMode'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Enters command mode allowing commands to be sent using the SendCommand macro. Returns: 0 = No Reply / 1 = Command Mode OK 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
 |  | 
| − | | 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;" | '''WaitForStringValue'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Allows us to wait and check for an incoming value. Returns 1 if the string value is found otherwise returns 0. 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 |  | 
| − | | width="90%" | Value
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | String value to look for 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 |  | 
| − | | width="90%" | Timeout
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Length of time to wait in milliseconds 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
 |  | 
| − | | 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;" | '''GetMACAddress'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Gets the local Bluetooth device MAC address. 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | 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;" | '''Initialise'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Sets up the Bluetooth module including:   - Enabling the UART  - Configuring the module (Name / Key / etc) Returns 1 for OK and 0 for no reply. 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | 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''
 |  | 
| − | |}
 |  | 
| − |   |  | 
| − |   |  | 
| − |   |  | 
| − |   |  | 
| − | ==Property reference==
 |  | 
| − |   |  | 
| − | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 |  | 
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 |  | 
| − | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Bluetooth Settings
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
 |  | 
| − | | width="90%" | Device Name
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Sets the friendly name of the Bluetooth device. 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
 |  | 
| − | | width="90%" | Pair Key
 |  | 
| − | |-
 |  | 
| − | | colspan="2" |  
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 |  | 
| − | | width="90%" | Discoverable
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Is the Bluetooth module discoverable by default? 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 |  | 
| − | | width="90%" | Reply Timeout
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Specifies the amount of time to wait for incoming data before timing out in milliseconds. Default 2000 = 2 seconds. 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 |  | 
| − | | width="90%" | RX Buffer Size
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Amount of RAM memory to dedicate to receiving responses and incoming data from the BT module. Default 40 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 |  | 
| − | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connections
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 |  | 
| − | | width="90%" | Channel
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | UART Channel selector Software channels are bit banged using generic I/O pins but are not as reliable as hardware channels. Hardware channels use the selected peripheral on-board the target microcontroller. 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 |  | 
| − | | width="90%" | Baud Options
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Baud rate option selector 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 |  | 
| − | | width="90%" | Baud Rate
 |  | 
| − | |-
 |  | 
| − | | colspan="2" |  
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
 |  | 
| − | | width="90%" | TX
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Pin to be used for Transmit data 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 |  | 
| − | | width="90%" | TX Remap Pin
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Allows the hardware transmit pin to be configured from a list of available pins based on your target device, 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
 |  | 
| − | | width="90%" | RX
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Pin to be used for Receive data 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 |  | 
| − | | width="90%" | RX Remap Pin
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Allows the hardware receive pin to be configured from a list of available pins based on your target device, 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 |  | 
| − | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 |  | 
| − | | width="90%" | Simulate Comms
 |  | 
| − | |-
 |  | 
| − | | colspan="2" |  
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 |  | 
| − | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 |  | 
| − | | width="90%" | Scope Traces
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Selects if the scope traces are automatically added to the data recorder window or not.     Simulation - draws an approximation of the UART data onto the scope trace.     ICT - sets up the scope trace for incoming data and adds UART packet decoding at the correct BAUD. 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 |  | 
| − | | width="90%" | Console Data
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Selects if the console data is automatically generated or not 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 |  | 
| − | | width="90%" | Console Columns
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Number of characters that can be displayed on a single line of the console. 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 |  | 
| − | | width="90%" | Data Source
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Simulation data source used to allow the component to connect to various remote devices     Nothing - Simulation data is ignored     COM port - Routes the communication data to and from a physical or virtual COM port      Injector - Routes the communication data via a data injector component on the Panel. 
 |  | 
| − | |}==Macro reference==
 |  | 
| − |   |  | 
|  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | 
|  | |- |  | |- | 
| Line 713: | Line 176: | 
|  |  |  |  | 
|  |  |  |  | 
| − | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 | + | ===ReceiveCount=== | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 |  | 
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendString'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Sends a string to the Bluetooth module. 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 |  | 
| − | | width="90%" | Command
 |  | 
| − | |-
 |  | 
| − | | colspan="2" |  
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" | SendCR
 |  | 
| − | |-
 |  | 
| − | | 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;" | '''LeaveCommandMode'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Leaves command mode allowing data to be passed back and forth, 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | 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;" | '''ConnectToMAC'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Connects to a specific Bluetooth MAC address. Waits up to 5 seconds for connection to be established. Returns 1 if connection was successful. 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 |  | 
| − | | width="90%" | MACAddress
 |  | 
| − | |-
 |  | 
| − | | colspan="2" |  
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
 |  | 
| − | | 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;" | '''SendCommand'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Sends a command string to the Bluetooth module. Returns: 0 = No Reply / 1 = Command sent ok 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 |  | 
| − | | width="90%" | Command
 |  | 
| − | |-
 |  | 
| − | | colspan="2" |  
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" | SendCR
 |  | 
| − | |-
 |  | 
| − | | colspan="2" |  
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" | DiscardReply
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | 0=Do not touch the reply, 1=Wait for reply and remove from buffer 
 |  | 
| − | |-
 |  | 
| − | | 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''
 |  | 
| − | |}
 |  | 
| − |   |  | 
| − |   |  | 
|  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | 
|  | |- |  | |- | 
| Line 808: | Line 190: | 
|  |  |  |  | 
|  |  |  |  | 
| − | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 | + | ===SendByte=== | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 |  | 
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadString'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Copies the incoming data from the data string array to a local string variable.  
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" | NumBytes
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Maximum 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;" |  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | 
|  | |- |  | |- | 
| Line 844: | Line 209: | 
|  |  |  |  | 
|  |  |  |  | 
| − | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 | + | ===SendCommand=== | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 |  | 
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''EnterCommandMode'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Enters command mode allowing commands to be sent using the SendCommandmacro. Returns: 0 = No Reply / 1 = Command Mode OK 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
 |  | 
| − | | 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;" | '''WaitForStringValue'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Allows us to wait and check for an incoming value. Returns 1 if the string value is found otherwise returns 0. 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 |  | 
| − | | width="90%" | Value
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | String value to look for 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 |  | 
| − | | width="90%" | Timeout
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Length of time to wait in milliseconds 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
 |  | 
| − | | 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;" | '''GetMACAddress'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Gets the local Bluetooth device MAC address. 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | 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;" | '''Initialise'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Sets up the Bluetooth module including:   - Enabling the UART  - Configuring the module (Name / Key / etc) Returns 1 for OK and 0 for no reply. 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | 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''
 |  | 
| − | |}
 |  | 
| − |   |  | 
| − |   |  | 
| − |   |  | 
| − |   |  | 
| − | ==Property reference==
 |  | 
| − |   |  | 
| − | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 |  | 
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 |  | 
| − | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Bluetooth Settings
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
 |  | 
| − | | width="90%" | Device Name
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Sets the friendly name of the Bluetooth device. 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
 |  | 
| − | | width="90%" | Pair Key
 |  | 
| − | |-
 |  | 
| − | | colspan="2" |  
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 |  | 
| − | | width="90%" | Discoverable
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Is the Bluetooth module discoverable by default? 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 |  | 
| − | | width="90%" | Reply Timeout
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Specifies the amount of time to wait for incoming data before timing out in milliseconds. Default 2000 = 2 seconds. 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 |  | 
| − | | width="90%" | RX Buffer Size
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Amount of RAM memory to dedicate to receiving responses and incoming data from the BT module. Default 40 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 |  | 
| − | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connections
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 |  | 
| − | | width="90%" | Channel
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | UART Channel selector Software channels are bit banged using generic I/O pins but are not as reliable as hardware channels. Hardware channels use the selected peripheral on-board the target microcontroller. 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 |  | 
| − | | width="90%" | Baud Options
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Baud rate option selector 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 |  | 
| − | | width="90%" | Baud Rate
 |  | 
| − | |-
 |  | 
| − | | colspan="2" |  
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
 |  | 
| − | | width="90%" | TX
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Pin to be used for Transmit data 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 |  | 
| − | | width="90%" | TX Remap Pin
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Allows the hardware transmit pin to be configured from a list of available pins based on your target device, 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
 |  | 
| − | | width="90%" | RX
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Pin to be used for Receive data 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 |  | 
| − | | width="90%" | RX Remap Pin
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Allows the hardware receive pin to be configured from a list of available pins based on your target device, 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 |  | 
| − | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 |  | 
| − | | width="90%" | Simulate Comms
 |  | 
| − | |-
 |  | 
| − | | colspan="2" |  
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 |  | 
| − | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 |  | 
| − | | width="90%" | Scope Traces
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Selects if the scope traces are automatically added to the data recorder window or not.     Simulation - draws an approximation of the UART data onto the scope trace.     ICT - sets up the scope trace for incoming data and adds UART packet decoding at the correct BAUD. 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 |  | 
| − | | width="90%" | Console Data
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Selects if the console data is automatically generated or not 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 |  | 
| − | | width="90%" | Console Columns
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Number of characters that can be displayed on a single line of the console. 
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 |  | 
| − | | width="90%" | Data Source
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Simulation data source used to allow the component to connect to various remote devices     Nothing - Simulation data is ignored     COM port - Routes the communication data to and from a physical or virtual COM port      Injector - Routes the communication data via a data injector component on the Panel. 
 |  | 
| − | |}==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;" | '''ReceiveByte'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Receives a single data byte from the Bluetooth module. 0-255 signifies valid data / 256 signifies no data available. 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 |  | 
| − | | width="90%" | Timeout
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Amount of time to wait in milliseconds 0=Wait forever 
 |  | 
| − | |-
 |  | 
| − | | 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;" | '''SendString'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Sends a string to the Bluetooth module. 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 |  | 
| − | | width="90%" | Command
 |  | 
| − | |-
 |  | 
| − | | colspan="2" |  
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" | SendCR
 |  | 
| − | |-
 |  | 
| − | | 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;" | '''LeaveCommandMode'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Leaves command mode allowing data to be passed back and forth, 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | 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;" | '''ConnectToMAC'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Connects to a specific Bluetooth MAC address. Waits up to 5 seconds for connection to be established. Returns 1 if connection was successful. 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 |  | 
| − | | width="90%" | MACAddress
 |  | 
| − | |-
 |  | 
| − | | colspan="2" |  
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
 |  | 
| − | | width="90%" style="border-top: 2px solid #000;" | ''Return''
 |  | 
| − | |}
 |  | 
| − |   |  | 
| − |   |  | 
|  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | 
|  | |- |  | |- | 
| Line 1,118: | Line 238: | 
|  |  |  |  | 
|  |  |  |  | 
|  | + | ===SendString=== | 
|  | {| 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;" | '''ReceiveCount''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendString''' | 
|  | |- |  | |- | 
| − | | colspan="2" | Returns thenumber of bytes currently sat waiting in the receive buffer.  | + | | colspan="2" | Sends a string to the Bluetooth module.  | 
|  | |- |  | |- | 
|  | |- |  | |- | 
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] -UINT | + | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING | 
| − | | width="90%" style="border-top: 2px solid #000;" | ''Return''
 | + | | width="90%" | Command | 
| − | |}
 |  | 
| − |   |  | 
| − |   |  | 
| − | {| 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;" | '''ReadString''' |  | 
| − | |-
 |  | 
| − | | colspan="2" |Copies the incoming data from the data string array to a local string variable.  
 |  | 
|  | |- |  | |- | 
|  | + | | colspan="2" |   | 
|  | |- |  | |- | 
|  | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |  | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | 
| − | | width="90%" | NumBytes | + | | width="90%" | SendCR | 
| − | |-
 |  | 
| − | | colspan="2" | Maximum 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;" | '''SendByte'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Sends a single data byte out to the Bluetooth module. 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 |  | 
| − | | width="90%" | Data
 |  | 
|  | |- |  | |- | 
|  | | colspan="2" |   |  | | colspan="2" |   | 
| Line 1,167: | Line 262: | 
|  |  |  |  | 
|  |  |  |  | 
| − | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 | + | ===WaitForStringValue=== | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 |  | 
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''EnterCommandMode'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Enters command mode allowing commands to be sent using the SendCommand macro. Returns: 0 = No Reply / 1 = Command Mode OK 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
 |  | 
| − | | width="90%" style="border-top: 2px solid #000;" | ''Return''
 |  | 
| − | |}
 |  | 
| − |   |  | 
| − |   |  | 
|  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | 
|  | |- |  | |- | 
| Line 1,201: | Line 284: | 
|  | | 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;" | '''GetMACAddress'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Gets the local Bluetooth device MAC address. 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | 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;" | '''Initialise'''
 |  | 
| − | |-
 |  | 
| − | | colspan="2" | Sets up the Bluetooth module including:   - Enabling the UART  - Configuring the module (Name / Key / etc) Returns 1 for OK and 0 for no reply. 
 |  | 
| − | |-
 |  | 
| − | |-
 |  | 
| − | | 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''
 |  | 
| − | |}
 |  | 
| − | 
 |  | 
| − | 
 |  | 
|  |  |  |  | 
|  |  |  |  |