Jump to content

Component: Zigbee (EB051, XBEE) (XBEE) (Wireless): Difference between revisions

From Flowcode Help
No edit summary
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder""
 
(17 intermediate revisions by 2 users not shown)
Line 14: Line 14:
==Zigbee (EB051, XBEE) component==
==Zigbee (EB051, XBEE) component==
Zigbee component designed to work with the XBEE range of modules from Digi. Provides a very simple interface to allow Zigbee mesh networks and communications. Also available in the form of the EB051 Zigbee E-block. Can also be used with Zigbee MIAC Addon module
Zigbee component designed to work with the XBEE range of modules from Digi. Provides a very simple interface to allow Zigbee mesh networks and communications. Also available in the form of the EB051 Zigbee E-block. Can also be used with Zigbee MIAC Addon module
==Component Source Code==
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_Zigbee.fcfx FC_Comp_Source_Zigbee.fcfx]
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_Zigbee.fcfx FC_Comp_Source_Zigbee.fcfx]


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




Line 28: Line 50:


==Examples==
==Examples==




Line 41: Line 79:




==Downloadable macro reference==


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
 
 
 
 
 
 
 
 
==Macro reference==
 
===ConnectFromLibrary===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''NodeConfigureSleep'''
| width="90%" class="mtx-class-macrohead" | '''ConnectFromLibrary'''
|-
|-
| colspan="2" | Sets the Zigbee device sleep mode (only applicable for end node type devices) ,  
| colspan="2" | Attempts to connect the data channel to a known device on the network. 
|-
|-
|-
|-
Line 54: Line 103:
| width="90%" | Mode
| width="90%" | Mode
|-
|-
| colspan="2" | 1=Hibernate, 2=Doze, 4=Cyclic Sleep, 5=Cyclic Doze 
| colspan="2" |  
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Timeout
| width="90%" | Device
|-
|-
| colspan="2" | Time to sleep in milli seconds (ms) 
| 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''
|}
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===ConnectToAddress===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''ConnectToAddress'''
|-
| colspan="2" | Attempts to connect the data channel to a specific device address on the network. 
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadNameFromBuffer'''
|-
|-
| colspan="2" | Returns a byte from the 8-Byte name 
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | Address
|-
|-
| colspan="2" |  
|-
|-
| 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%" | Device
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
===ConnectToAll===
{| class="mtx-class-macrotable wikitable"
|-
|-
| colspan="2" | The Device name to collect. Range: 0-7 
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''ConnectToAll'''
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| colspan="2" | Attempts to connect the data channel to all devices on the network. 
| width="90%" | Idx
|-
|-
| colspan="2" | The index position of the name. Range: 0-7 
|-
|-
| 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 89: Line 148:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===ConnectToCoordinator===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''NodeWake'''
| width="90%" class="mtx-class-macrohead" | '''ConnectToCoordinator'''
|-
|-
| colspan="2" | Wakes up the local Zigbee module from sleep mode. 
| colspan="2" | Attempts to connect the data channel to the network coordinator node. 
|-
|-
|-
|-
| 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''
|}
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===ConnectToName===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadATResponse'''
| width="90%" class="mtx-class-macrohead" | '''ConnectToName'''
|-
|-
| colspan="2" | Reads a single byte from the received AT command response. 
| colspan="2" | Attempts to connect the data channel to a named device on the network. 
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | idx
| width="90%" | Name
|-
|-
| colspan="2" | Specified the byte index in the buffer. Range 0-15 
| 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 120: Line 181:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===EnterCommandMode===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ScanBuffer'''
| width="90%" class="mtx-class-macrohead" | '''EnterCommandMode'''
|-
|-
| colspan="2" | Returns a binary list of matched identifier names 
| colspan="2" | Moves from data mode into command mode by sending the special characters 
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" | Compare_Str
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
===ExitCommandMode===
{| class="mtx-class-macrotable wikitable"
|-
|-
| colspan="2" |  
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''ExitCommandMode'''
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| colspan="2" | Returns from command mode to allow data to be sent and received 
| width="90%" | Length
|-
|-
| 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-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;"
===GetATResponse===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendChar'''
| width="90%" class="mtx-class-macrohead" | '''GetATResponse'''
|-
|-
| colspan="2" | Transmits a byte value to the Zigbee module. 
| colspan="2" | Waits for a response from the Zigbee module. If the Logging parameter is set then the response is stored in memory allowing the software to read the reply. 
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Byte
| width="90%" | Logging
|-
|-
| colspan="2" | Data byte to transmit. Range 0-255 
| 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''
|}
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===GetSignalLevel===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''InitNetwork'''
| width="90%" class="mtx-class-macrohead" | '''GetSignalLevel'''
|-
|-
| colspan="2" | Initialises the Zigbee module and attempts to setup or join the network 
| colspan="2" | Returns the signal strength of the last signal received 
|-
|-
|-
|-
| 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''
|}
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===InitNetwork===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ConnectToCoordinator'''
| width="90%" class="mtx-class-macrohead" | '''InitNetwork'''
|-
|-
| colspan="2" | Attempts to connect the data channel to the network coordinator node. 
| colspan="2" | Initialises the Zigbee module and attempts to setup or join the network 
|-
|-
|-
|-
| 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''
|}
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===MIAC_Module_GetData===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MIAC_Module_GetData'''
| width="90%" class="mtx-class-macrohead" | '''MIAC_Module_GetData'''
|-
|-
| colspan="2" |  
| colspan="2" |  
Line 205: Line 275:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===MIAC_Module_Message===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''MIAC_Module_Message'''
|-
| colspan="2" |  
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ConnectToName'''
|-
|-
| colspan="2" | Attempts to connect the data channel to a named device on the network. 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | CAN_ID
|-
|-
| colspan="2" |  
|-
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Name
| width="90%" | CMD_ID
|-
|-
| colspan="2" |  
| colspan="2" |  
Line 223: Line 299:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===MIAC_Module_PushData===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''MIAC_Module_PushData'''
|-
| colspan="2" |  
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''StoreParams'''
|-
|-
| colspan="2" | Stores the current register set into the Zigbee module's non volatile memory 
| 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="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 236: Line 318:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===NodeConfigureSleep===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''NodeConfigureSleep'''
|-
| colspan="2" | Sets the Zigbee device sleep mode (only applicable for end node type devices) ,  
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Mode
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| colspan="2" | 1=Hibernate, 2=Doze, 4=Cyclic Sleep, 5=Cyclic Doze 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''EnterCommandMode'''
|-
|-
| colspan="2" | Moves from data mode into command mode by sending the special characters 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Timeout
|-
|-
| colspan="2" | Time to sleep in milli seconds (ms) 
|-
|-
| 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 249: Line 342:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===NodeWake===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RestartNetwork'''
| width="90%" class="mtx-class-macrohead" | '''NodeWake'''
|-
|-
| colspan="2" | Attempts to restart the network 
| colspan="2" | Wakes up the local Zigbee module from sleep mode. 
|-
|-
|-
|-
Line 262: Line 356:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===ReadATResponse===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MIAC_Module_Message'''
| width="90%" class="mtx-class-macrohead" | '''ReadATResponse'''
|-
|-
| colspan="2" |  
| colspan="2" | Reads a single byte from the received AT command response. 
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | CAN_ID
| width="90%" | idx
|-
|-
| colspan="2" |  
| colspan="2" | Specified the byte index in the buffer. Range 0-15 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | CMD_ID
|-
| 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 285: Line 375:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===ReadAddressFromBuffer===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''ReadAddressFromBuffer'''
|-
| colspan="2" | Reads a byte from a 16-bit Zigbee device address 
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ConnectToAll'''
|-
|-
| colspan="2" | Attempts to connect the data channel to all devices on the network. 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Device
|-
| colspan="2" |  
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Idx
|-
| 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 298: Line 399:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===ReadNameFromBuffer===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ConnectFromLibrary'''
| width="90%" class="mtx-class-macrohead" | '''ReadNameFromBuffer'''
|-
|-
| colspan="2" | Attempts to connect the data channel to a known device on the network. 
| colspan="2" | Returns a byte from the 8-Byte name 
|-
|-
|-
|-
| 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%" | Device
|-
|-
| colspan="2" |  
| colspan="2" | The Device name to collect. Range: 0-7 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Device
| width="90%" | Idx
|-
|-
| colspan="2" |  
| colspan="2" | The index position of the name. Range: 0-7 
|-
|-
| 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 321: Line 423:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===ReceiveChar===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ConnectToAddress'''
| width="90%" class="mtx-class-macrohead" | '''ReceiveChar'''
|-
|-
| colspan="2" | Attempts to connect the data channel to a specific device address on the network. 
| colspan="2" | Attempt to receive a byte from the Zigbee module. 
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Address
| width="90%" | nTimeout
|-
|-
| colspan="2" |  
| colspan="2" |  
Line 339: Line 442:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===RestartNetwork===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetSignalLevel'''
| width="90%" class="mtx-class-macrohead" | '''RestartNetwork'''
|-
|-
| colspan="2" | Returns the signal strength of the last signal received 
| colspan="2" | Attempts to restart the network 
|-
|-
|-
|-
| 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''
|}
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===ScanBuffer===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ExitCommandMode'''
| width="90%" class="mtx-class-macrohead" | '''ScanBuffer'''
|-
|-
| colspan="2" | Returns from command mode to allow data to be sent and received 
| colspan="2" | Returns a binary list of matched identifier names 
|-
|-
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" | Compare_Str
|}
 
 
{| 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;" | '''MIAC_Module_PushData'''
|-
|-
| colspan="2" |  
| colspan="2" |  
|-
|-
|-
| 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%" | Length
|-
|-
| colspan="2" |  
| 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''
|}
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===ScanNetwork===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadAddressFromBuffer'''
| width="90%" class="mtx-class-macrohead" | '''ScanNetwork'''
|-
|-
| colspan="2" | Reads a byte from a 16-bit Zigbee device address 
| colspan="2" | Scans the local network for devices and stores into a local device array. Mode = 0 store device names, mode = 1 store device addresses. Returns the number of devices found. 
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Device
| width="90%" | Mode
|-
| colspan="2" |  
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Idx
|-
|-
| colspan="2" |  
| colspan="2" |  
Line 406: Line 499:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===SendATCommand===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendATCommand'''
| width="90%" class="mtx-class-macrohead" | '''SendATCommand'''
|-
|-
| colspan="2" | Transmits a string of values to the Zigbee module. 
| colspan="2" | Transmits a string of values to the Zigbee module. 
Line 424: Line 518:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===SendChar===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ScanNetwork'''
| width="90%" class="mtx-class-macrohead" | '''SendChar'''
|-
|-
| colspan="2" | Scans the local network for devices and stores into a local device array. Mode = 0 store device names, mode = 1 store device addresses. Returns the number of devices found. 
| colspan="2" | Transmits a byte value to the Zigbee module. 
|-
|-
|-
|-
| 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%" | Byte
|-
|-
| colspan="2" |  
| colspan="2" | Data byte to transmit. 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''
|}
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===StoreParams===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetATResponse'''
| width="90%" class="mtx-class-macrohead" | '''StoreParams'''
|-
|-
| colspan="2" | Waits for a response from the Zigbee module. If the Logging parameter is set then the response is stored in memory allowing the software to read the reply. 
| colspan="2" | Stores the current register set into the Zigbee module's non volatile memory 
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" | Logging
|-
| colspan="2" |  
|-
| 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;" | '''ReceiveChar'''
|-
| colspan="2" | Attempt to receive a byte from the Zigbee module. 
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | nTimeout
|-
| colspan="2" |  
|-
| 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''
|}
|}




==Property reference==
==Property reference==


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
| width="90%" class="mtx-class-macrohead" | '''Properties'''  
|-
|-
|-
|-
Line 522: Line 593:
|-
|-
| colspan="2" | Length of time to buffer packets for sleeping or powered down nodes. This value must be consistent throughout the Zigbee network. Default - Assigns the maximum buffer time of 28 seconds. Preset - Allows for a custom sleep time of 0.32 - 28 seconds. 
| colspan="2" | Length of time to buffer packets for sleeping or powered down nodes. This value must be consistent throughout the Zigbee network. Default - Assigns the maximum buffer time of 28 seconds. Preset - Allows for a custom sleep time of 0.32 - 28 seconds. 
|-
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" class="mtx-class-propfolder" | 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-5-icon.png]]
| width="90%" | TX
|-
| colspan="2" | Pin to be used for Transmit data 
|-
| 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%" | 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-16-icon.png]]
| width="90%" | Use Flow Control
|-
| colspan="2" | Flow Control (Handshake) enable or disable.    On: Two I/O pins are used to control the flow of data in and out of the device.    Off: Flow control is disabled. 
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | RTS
|-
| colspan="2" | Pin to be used for Request To Send handshake function Output from target micro to inform remote device we are ready to receive data. Low = Ready to receive data High = Not ready to receive data 
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | CTS
|-
| colspan="2" | Pin to be used for Clear To Send handshake function. Input to target micro to inform when the remote device is ready to transmit data. Low = Ready to transmit data High = Not ready to transmit data 
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | Sleep Pin
|-
| colspan="2" | Zigbee Sleep Control Pin 
|-
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" class="mtx-class-propfolder" | Scan Channels
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
Line 613: Line 737:
| colspan="2" | The total amount of time that it will take to perform a complete RF channel scan based on the selected scan channels and duration. 
| colspan="2" | The total amount of time that it will take to perform a complete RF channel scan based on the selected scan channels and duration. 
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connections'''
| width="90%" class="mtx-class-propfolder" | Simulation
|-
|-
| 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-5-icon.png]]
| width="90%" | TX
|-
| colspan="2" | Pin to be used for Transmit data 
|-
| 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%" | 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-16-icon.png]]
| width="90%" | Use Flow Control
|-
| colspan="2" | Flow Control (Handshake) enable or disable.    On: Two I/O pins are used to control the flow of data in and out of the device.    Off: Flow control is disabled. 
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | RTS
|-
| colspan="2" | Pin to be used for Request To Send handshake function Output from target micro to inform remote device we are ready to receive data. Low = Ready to receive data High = Not ready to receive data 
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | CTS
|-
| colspan="2" | Pin to be used for Clear To Send handshake function. Input to target micro to inform when the remote device is ready to transmit data. Low = Ready to transmit data High = Not ready to transmit data 
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | Sleep Pin
|-
| colspan="2" | Zigbee Sleep Control Pin 
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Simulations'''
|-
|-
|-
|-

Latest revision as of 14:37, 13 July 2026

Author Matrix Ltd.
Version 1.5
Category Wireless


Zigbee (EB051, XBEE) component

Zigbee component designed to work with the XBEE range of modules from Digi. Provides a very simple interface to allow Zigbee mesh networks and communications. Also available in the form of the EB051 Zigbee E-block. Can also be used with Zigbee MIAC Addon module

Component Source Code

Please click here to download the component source project: FC_Comp_Source_Zigbee.fcfx

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

Detailed description

No detailed description exists yet for this component

Examples

No additional examples







Macro reference

ConnectFromLibrary

ConnectFromLibrary
Attempts to connect the data channel to a known device on the network. 
- BYTE Mode
 
- BYTE Device
 
- BYTE Return


ConnectToAddress

ConnectToAddress
Attempts to connect the data channel to a specific device address on the network. 
- STRING Address
 
- BYTE Return


ConnectToAll

ConnectToAll
Attempts to connect the data channel to all devices on the network. 
- BYTE Return


ConnectToCoordinator

ConnectToCoordinator
Attempts to connect the data channel to the network coordinator node. 
- BYTE Return


ConnectToName

ConnectToName
Attempts to connect the data channel to a named device on the network. 
- STRING Name
 
- BYTE Return


EnterCommandMode

EnterCommandMode
Moves from data mode into command mode by sending the special characters 
- VOID Return


ExitCommandMode

ExitCommandMode
Returns from command mode to allow data to be sent and received 
- VOID Return


GetATResponse

GetATResponse
Waits for a response from the Zigbee module. If the Logging parameter is set then the response is stored in memory allowing the software to read the reply. 
- BYTE Logging
 
- BYTE Return


GetSignalLevel

GetSignalLevel
Returns the signal strength of the last signal received 
- BYTE Return


InitNetwork

InitNetwork
Initialises the Zigbee module and attempts to setup or join the network 
- VOID Return


MIAC_Module_GetData

MIAC_Module_GetData
 
- BYTE Index
 
- BYTE Return


MIAC_Module_Message

MIAC_Module_Message
 
- UINT CAN_ID
 
- UINT CMD_ID
 
- BYTE Return


MIAC_Module_PushData

MIAC_Module_PushData
 
- BYTE Data
 
- VOID Return


NodeConfigureSleep

NodeConfigureSleep
Sets the Zigbee device sleep mode (only applicable for end node type devices) ,  
- BYTE Mode
1=Hibernate, 2=Doze, 4=Cyclic Sleep, 5=Cyclic Doze 
- UINT Timeout
Time to sleep in milli seconds (ms) 
- VOID Return


NodeWake

NodeWake
Wakes up the local Zigbee module from sleep mode. 
- VOID Return


ReadATResponse

ReadATResponse
Reads a single byte from the received AT command response. 
- BYTE idx
Specified the byte index in the buffer. Range 0-15 
- BYTE Return


ReadAddressFromBuffer

ReadAddressFromBuffer
Reads a byte from a 16-bit Zigbee device address 
- BYTE Device
 
- BYTE Idx
 
- BYTE Return


ReadNameFromBuffer

ReadNameFromBuffer
Returns a byte from the 8-Byte name 
- BYTE Device
The Device name to collect. Range: 0-7 
- BYTE Idx
The index position of the name. Range: 0-7 
- BYTE Return


ReceiveChar

ReceiveChar
Attempt to receive a byte from the Zigbee module. 
- BYTE nTimeout
 
- BYTE Return


RestartNetwork

RestartNetwork
Attempts to restart the network 
- VOID Return


ScanBuffer

ScanBuffer
Returns a binary list of matched identifier names 
- STRING Compare_Str
 
- BYTE Length
 
- BYTE Return


ScanNetwork

ScanNetwork
Scans the local network for devices and stores into a local device array. Mode = 0 store device names, mode = 1 store device addresses. Returns the number of devices found. 
- BYTE Mode
 
- BYTE Return


SendATCommand

SendATCommand
Transmits a string of values to the Zigbee module. 
- STRING Command
Transmits a command to the Zigbee module followed by a carriage return 
- VOID Return


SendChar

SendChar
Transmits a byte value to the Zigbee module. 
- BYTE Byte
Data byte to transmit. Range 0-255 
- VOID Return


StoreParams

StoreParams
Stores the current register set into the Zigbee module's non volatile memory 
- VOID Return


Property reference

Properties
Device Name
String of characters used to allow the Zigbee node to use the name addressing mode of operation. Can be left blank if name addressing is not being used. 
Zigbee Mode
Specifies the functionality of the Zigbee node. Coordinator - Must be used with a Coordinator Zigbee E-Block EB051C, Responsible for starting the network and assigning addresses. Router - Must be used with a Router / End Node E-Block EB051R, Responsible for forwarding / repeating packets on the network. End Device - Must be used with a Router / End Node E-Block EB051R, Capable of low power operation. 
Auto ID
Automatically generate a PAN ID  
PAN ID
Assigns a Personal Area Network Identifier code to the Zigbee node. Random / Search - Scans the local area for Zigbee PAN networks and joins the existing network, otherwise a random value is chosen. Preset - Assigns a preset PAN ID to the Zigbee node, Must be between 0x0 and 0x3FFF. 
Node Join Time
Length of time in seconds where nodes are allowed to join the network. Infinte - Nodes are always allowed to join the network. Preset - Nodes are only allowed to join the network for a specific amount of time. Note: Join time not available for End Device nodes.  
Max Hops
Specifies the maximum number of retransmits for a Broadcast transmission. 
Sleep Buffer Time
Length of time to buffer packets for sleeping or powered down nodes. This value must be consistent throughout the Zigbee network. Default - Assigns the maximum buffer time of 28 seconds. Preset - Allows for a custom sleep time of 0.32 - 28 seconds. 
Connections
Channel
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. 
TX
Pin to be used for Transmit data 
RX
Pin to be used for Receive data 
Baud Options
Baud rate option selector 
Baud Rate
 
Use Flow Control
Flow Control (Handshake) enable or disable. On: Two I/O pins are used to control the flow of data in and out of the device. Off: Flow control is disabled. 
RTS
Pin to be used for Request To Send handshake function Output from target micro to inform remote device we are ready to receive data. Low = Ready to receive data High = Not ready to receive data 
CTS
Pin to be used for Clear To Send handshake function. Input to target micro to inform when the remote device is ready to transmit data. Low = Ready to transmit data High = Not ready to transmit data 
Sleep Pin
Zigbee Sleep Control Pin 
Scan Channels
0x0B
Determines if channel will be scanned 
0x0C
Determines if channel will be scanned 
0x0D
Determines if channel will be scanned 
0x0E
Determines if channel will be scanned 
0x0F
Determines if channel will be scanned 
0x10
Determines if channel will be scanned 
0x11
Determines if channel will be scanned 
0x12
Determines if channel will be scanned 
0x13
Determines if channel will be scanned 
0x14
Determines if channel will be scanned 
0x15
Determines if channel will be scanned 
0x16
Determines if channel will be scanned 
0x17
Determines if channel will be scanned 
0x18
Determines if channel will be scanned 
0x19
Determines if channel will be scanned 
0x1A
Determines if channel will be scanned 
Scan Duration
Configures the length of time to scan each channel for network activity. The overall time for the entire channel scan is shown as channel scan time. 
Total Scan Time (ms)
The total amount of time that it will take to perform a complete RF channel scan based on the selected scan channels and duration. 
Simulation
Label
 
Scope Traces
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. 
Console Data
Selects if the console data is automatically generated or not 
Console Columns
Number of characters that can be displayed on a single line of the console. 
Data Source
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 API - Routes the communication data via a data API component on the Panel.