Component: Zigbee (EB051, XBEE) (XBEE) (Wireless)
Author | Matrix Ltd. |
Version | 1.5 (Release) |
Category | Wireless |
Contents
- 1 Zigbee (EB051, XBEE) (XBEE) component
- 2 Examples
- 3 Downloadable macro reference
- 3.1 NodeConfigureSleep
- 3.2 ReadNameFromBuffer
- 3.3 NodeWake
- 3.4 ReadATResponse
- 3.5 ScanBuffer
- 3.6 SendChar
- 3.7 InitNetwork
- 3.8 ConnectToCoordinator
- 3.9 ConnectToName
- 3.10 StoreParams
- 3.11 EnterCommandMode
- 3.12 RestartNetwork
- 3.13 ConnectToAll
- 3.14 ConnectFromLibrary
- 3.15 ConnectToAddress
- 3.16 GetSignalLevel
- 3.17 ExitCommandMode
- 3.18 ReadAddressFromBuffer
- 3.19 SendATCommand
- 3.20 ScanNetwork
- 3.21 GetATResponse
- 3.22 ReceiveChar
- 4 Simulation macro reference
- 5 Property reference
Zigbee (EB051, XBEE) (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
Examples
No additional examples
Downloadable macro reference
NodeConfigureSleep
Sets the Zigbee device sleep mode (only applicable for end node type devices) ,
Parameters
- BYTE Mode
- 1=Hibernate, 2=Doze, 4=Cyclic Sleep, 5=Cyclic Doze
- UINT Timeout
- Time to sleep in milli seconds (ms)
Return value
- This call does not return a value
ReadNameFromBuffer
Returns a byte from the 8-Byte name
Parameters
- BYTE Device
- The Device name to collect. Range: 0-7
- BYTE Idx
- The index position of the name. Range: 0-7
Return value
NodeWake
Wakes up the local Zigbee module from sleep mode.
Parameters
- This macro has no parameters
Return value
- This call does not return a value
ReadATResponse
Reads a single byte from the received AT command response.
Parameters
- BYTE idx
- Specified the byte index in the buffer. Range 0-15
Return value
ScanBuffer
Returns a binary list of matched identifier names
Parameters
- STRING Compare_Str
- BYTE Length
Return value
SendChar
Transmits a byte value to the Zigbee module.
Parameters
- BYTE Byte
- Data byte to transmit. Range 0-255
Return value
- This call does not return a value
InitNetwork
Initialises the Zigbee module and attempts to setup or join the network
Parameters
- This macro has no parameters
Return value
- This call does not return a value
ConnectToCoordinator
Attempts to connect the data channel to the network coordinator node.
Parameters
- This macro has no parameters
Return value
ConnectToName
Attempts to connect the data channel to a named device on the network.
Parameters
- <- STRING Name
- This parameter may be returned back to the caller
Return value
StoreParams
Stores the current register set into the Zigbee module's non volatile memory
Parameters
- This macro has no parameters
Return value
- This call does not return a value
EnterCommandMode
Moves from data mode into command mode by sending the special characters
Parameters
- This macro has no parameters
Return value
- This call does not return a value
RestartNetwork
Attempts to restart the network
Parameters
- This macro has no parameters
Return value
- This call does not return a value
ConnectToAll
Attempts to connect the data channel to all devices on the network.
Parameters
- This macro has no parameters
Return value
ConnectFromLibrary
Attempts to connect the data channel to a known device on the network.
Parameters
- BYTE Mode
- BYTE Device
Return value
ConnectToAddress
Attempts to connect the data channel to a specific device address on the network.
Parameters
- <- STRING Address
- This parameter may be returned back to the caller
Return value
GetSignalLevel
Returns the signal strength of the last signal received
Parameters
- This macro has no parameters
Return value
ExitCommandMode
Returns from command mode to allow data to be sent and received
Parameters
- This macro has no parameters
Return value
- This call does not return a value
ReadAddressFromBuffer
Reads a byte from a 16-bit Zigbee device address
Parameters
- BYTE Device
- BYTE Idx
Return value
SendATCommand
Transmits a string of values to the Zigbee module.
Parameters
- <- STRING Command
- Transmits a command to the Zigbee module followed by a carriage return
- This parameter may be returned back to the caller
Return value
- This call does not return a value
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.
Parameters
- BYTE Mode
Return value
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.
Parameters
- BYTE Logging
Return value
ReceiveChar
Attempt to receive a byte from the Zigbee module.
Parameters
- BYTE nTimeout
Return value
Simulation macro reference
This component does not contain any simulation macros
Property reference
Device Name
This property is of type Line of text and can be referenced with the variable name dev_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
This property is of type Fixed list of ints and can be referenced with the variable name zig_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
This property is of type True or false and can be referenced with the variable name auto_id.
Automatically generate a PAN ID
PAN ID
This property is of type Line of text and can be referenced with the variable name 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
This property is of type Fixed list of ints and can be referenced with the variable name 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
This property is of type Signed integer and can be referenced with the variable name max_hops.
Specifies the maximum number of retransmits for a Broadcast transmission.
Sleep Buffer Time
This property is of type Fixed list of ints and can be referenced with the variable name sleep_buffer.
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.
Channel
This property is of type Fixed list of ints and can be referenced with the variable name cal_uart::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
This property is of type Single digital pin and can be referenced with the variable name cal_uart::TX.
Pin to be used for Transmit data
RX
This property is of type Single digital pin and can be referenced with the variable name cal_uart::RX.
Pin to be used for Receive data
Baud Options
This property is of type Fixed list of ints and can be referenced with the variable name cal_uart::BAUD_LIST.
Baud rate option selector
Baud Rate
This property is of type Signed integer and can be referenced with the variable name cal_uart::BAUD.
No additional information
Use Flow Control
This property is of type Fixed list of ints and can be referenced with the variable name cal_uart::FLOWEN.
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
This property is of type Single digital pin and can be referenced with the variable name cal_uart::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
This property is of type Single digital pin and can be referenced with the variable name cal_uart::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
This property is of type Single digital pin and can be referenced with the variable name pin_sleep.
Zigbee Sleep Control Pin
0x0B
This property is of type True or false and can be referenced with the variable name chan_0.
Determines if channel will be scanned
0x0C
This property is of type True or false and can be referenced with the variable name chan_1.
Determines if channel will be scanned
0x0D
This property is of type True or false and can be referenced with the variable name chan_2.
Determines if channel will be scanned
0x0E
This property is of type True or false and can be referenced with the variable name chan_3.
Determines if channel will be scanned
0x0F
This property is of type True or false and can be referenced with the variable name chan_4.
Determines if channel will be scanned
0x10
This property is of type True or false and can be referenced with the variable name chan_5.
Determines if channel will be scanned
0x11
This property is of type True or false and can be referenced with the variable name chan_6.
Determines if channel will be scanned
0x12
This property is of type True or false and can be referenced with the variable name chan_7.
Determines if channel will be scanned
0x13
This property is of type True or false and can be referenced with the variable name chan_8.
Determines if channel will be scanned
0x14
This property is of type True or false and can be referenced with the variable name chan_9.
Determines if channel will be scanned
0x15
This property is of type True or false and can be referenced with the variable name chan_10.
Determines if channel will be scanned
0x16
This property is of type True or false and can be referenced with the variable name chan_11.
Determines if channel will be scanned
0x17
This property is of type True or false and can be referenced with the variable name chan_12.
Determines if channel will be scanned
0x18
This property is of type True or false and can be referenced with the variable name chan_13.
Determines if channel will be scanned
0x19
This property is of type True or false and can be referenced with the variable name chan_14.
Determines if channel will be scanned
0x1A
This property is of type True or false and can be referenced with the variable name chan_15.
Determines if channel will be scanned
Scan Duration
This property is of type Signed integer and can be referenced with the variable name 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)
This property is of type Signed integer and can be referenced with the variable name scan_total.
The total amount of time that it will take to perform a complete RF channel scan based on the selected scan channels and duration.
Label
This property is of type Line of text and can be referenced with the variable name label.
No additional information
Scope Traces
This property is of type True or false and can be referenced with the variable name cal_uart::ScopeTraces.
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
This property is of type True or false and can be referenced with the variable name cal_uart::ConsoleData.
Selects if the console data is automatically generated or not
Console Columns
This property is of type Unsigned integer and can be referenced with the variable name cal_uart::ConsoleColumns.
Number of characters that can be displayed on a single line of the console.
Data Source
This property is of type Fixed list of ints and can be referenced with the variable name cal_uart::DataSource.
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.