Archive for September, 2009

Use Comm Operator to work with ZigBee API mode

Saturday, September 19th, 2009

Updated on Nov 21, 2010.

We released the ZigBee Operator. The ZigBee Operator can create Digi’s ZigBee XBee and 802.15.4’s API package directly. Please check out ZigBee Operator.

Comm Operator 4.3 added a new quick send data panel, which is customized data panel. Customized quick send panel is designed for creating structured data. It supports both text data and binary data.

Structured data is also called as formatted data. It is widely used to store and transfer information. Most of the applications use structured data to transfer information through network and serial port. Most of structured data are in binary data, like data transferred through network. A lot of applications also use structured data in text format, like data from GPS module, and http protocol.

ZigBee module has two ways of communication, AT mode and API mode. AT mode is transparent mode, send data from one module to another just like two serial port connected directly. The remote end will received exactly what the local sends. API mode is different, it transfers data in formatted frame. The data will be formatted according the type. There are several advantage to use API mode, one most important advantage is that there is no need to enter command mode to change the destination address. That makes possible to switch destination quickly, as address of destination is included in the formatted data frame. The disadvantage is that extra work has to be done to create formatted data. In fact, although API mode is more powerful, most of zigbee application use AT mode as AT mode compile the traditional serial port application better.

With customized quick send panel, create formatted data for ZigBee API mode is much easier. It is almost just same as create data in AT mode. Let’s start with sending AT command in API mode.

Here is the API data frame of zigbee AT command

image

 

Each data frame is made of start delimiter, length, frame data and check sum.

The start delimiter is always 0x7E. 

The length part has two bytes. The first byte is MSB(most significant byte) followed with LSB(least significant byte).

Then comes with Frame data. The length of frame data is variable, depends on command and parameters.  It has two parts, command ID which is API identifier and cmdData which is identifier-specific data. The cmdData is made of Frame ID, AT Command and Parameter Value.

The last byte is check sum.

To send structured data in Comm Operator is create a template of customized data.

Here are steps.

Select [View]->[Customized Data] in Comm Operator to open Customzied Data quick send panel.

image

Click button[Edit] to open customized data editor.

image

Click [Delete All] to remove items.

Click [New] Add a new data field like below.

image

Click [New Var] to Add a field for length. We just create a variable field and will work on this later when all other fields are added.

 image

Click [New] to add field for cmdID

image

Click [New] to add field for Frame ID

image

Click [New] to add field for AT Command

image

Click [New] to add field for parameter value

image

Click [New] to add field for checksum.

image

Select var “Length” in list and Click button [Edit"]. Select field cmdID and “Frame ID”, “AT Command”, and “Parameter Value” in fields list.

So far, we have created a templated for AT command API data frame.

image

image

For example, we want to get high bytes of zigbee modem address, the AT command is “SH”. To send command “SH”, we just input “SH” in “AT Command” Field. Then click “Send “ button.

Here is the API data been sent.

Send:(17:52:48) 7E 00 04 08 01 53 48 5B

The Start Delimiter is “7E”

The length is “00 4E”

The cmd ID is “08”

The Frame ID is “01”

The AT Command is “53 48”, which is ascii code of “SH” in hex

The Checksum is “5B”

To send other AT command, just change the content of field “AT Command” and Parameter Value, the data frame will be created by quick send panel and all variable will be calculated automatically. That make test with ZigBee API mode so easy!

What’s new in Comm Operator 4.3

Saturday, September 19th, 2009

What’s new

Added Customized Data Quick Send Panel

customziedPanel

Customized Data Panel gives the capability of composing complicated data. Customized data is composed of Customized item. There are two types of customized item, genera customized data item and variable.

Customized item data allow user input the data with specified format. It supports string, hex code and decimal code.

Variable type is a fields which content of it is determined by calculate the content of related fields. The output can be string, or binary type.

Updated Calculator

image

Added convert between decimal and hex.

Bugs fix

Fix the bug of Send Data List

Change the layout of GUI

Relay Timer R1X Is Released

Wednesday, September 16th, 2009

Relay Timer R1X is programmable timer software for setting timing features of the relay. It supports 1-channel relay controller boards of National Control Devices.

Features

  • Support 1-channel relay boards.

  • Support multiple schedule setting.

  • Support powerful schedule setting with recurrence options.

  • Support auto start after logging in Windows.

  • Turn on/off relay manually and automatically.

  • Display the current status of relay simultaneously.

  • Automatically switch to auto mode from manual mode after specified time.

  • Schedule setting can be saved for later loading.

    Relay Timer R1X Main GUI

    http://www.serialporttool.com/RelayTimerR1XInfo.htm

  • Keyboard Shortcuts for PTZ Controller

    Monday, September 14th, 2009

    PTZ Controller supports standard Windows keyboard shortcuts.

    keyboard

    Key Function Key Function
    Q Focus Far W Focus Near
    A Zoom Out S Zoom In
    Z Iris Close X Iris Open
    8 Tilt Up 2 Tilt Down
    4 Pan Left 6 Pan Right
    7 Pan Left + Tilt Up 9 Pan Right + Tilt Up
    1 Pan Left + Tilt Down 3 Pan Right + Tilt Down
    pageup Previous Camera pagedown Next Camera
    minus Previous Preset add Next Preset
    Ctrl + 1-9 Go To Preset 1~9 Ctrl + 0 Go To Preset 10

    Why Choose Our Timer Software

    Sunday, September 13th, 2009

     

    If you are looking for the best timer application, you are in right place!

    Timer software is one area that Serial Port Tool is focusing for years. Our timer applications are supposed to work in environment that requires accurate, reliable, robust and easy to use.  There are several things to make the our timer software as the best timer software.

    Working with best hardware

    All our timer software works with relay controller from National Control Device. National Control Device is the largest relay controller producer in the world. They have relay boards of all types and supports all known interfaces, which include regular RS232, USB, optical fiber, Ethernet, Wi-Fi, ZigBee, wireless, Bluetooth, and even satellite. The protocol the relay boards is binary protocol, which works very fast and reliable. We have been cooperating with National Control Device for years. Our timer applications work with the relay boards from National Control Device seamlessly.

     

    Here is the diagram about how our timer series software send command.

    send-sketch

     

      Accurate

      Our timer software are accurate.

  • Control relay with computer clock.

    It control relay with high resolution computer clock. Although all timer software use computer clock, there are big difference. There are two kinds of timer inside the computer, one is low resolution, which ticks 18 times per seconds. It is OK for most requirement, In general, you cannot depend on a Windows timer to have accuracy better than 55 milliseconds, and very often the best you’ll be able to do is 100 milliseconds: 1/10 second.. We use the high resolution timer that the same timer used in multimedia application, which can get resolution of 5 – 10 milliseconds. That makes big difference for real time application.

  • Control relay in recurrent time sequence.

    Thanks to protocol of relay controller of Nation Control Device, it is possible that we update 8 relays status one time. It is much fast than update relay status one by one.  Most of relay controller from Nation Control Device works at baud rate 115200, which is very fast, and the processer of relay controller is very fast too. It only take about 30 ms to update 8 relays. Using solid state relay controller will gain even better performance. Our timer application calculate all relays’ status together, even each of them work separately.

  • Calculate relay status in a separate thread.

    All calculation and updating relay status is done in separate threads. That means the GUI can response user’s action all the time, while at the same time, nothing will slow down the calculation and updating relay status. The threads are well polished. It use as less resource of processer as possible while keep the highest accurate.

  • Show relay on/off status in real-time.

    There are indicator of relay status in control panel of timer software. They show the current status that the relay should be. The status are updated with a separate thread, they keep updating even when user interaction with GUI.

    Reliable

  • As an application controls hardware, it has to be reliable. There are many factors effect reliability. Hardware could fail. The connection could be broken. The power could fail. The computer could crash. It is easy to create a software that run perfect in perfect condition. However, it is not that easy to create a software works in a REAL environment. The code to deal with exception generally cost much more than just to implement the basic function. Sometimes, it is hard to say if it is the defect of hardware, connection or layout cause the problem. The software has to have a way to handle abnormal condition and maintain the system work as good as possible. We got a lot of experience by writing software work with hardware and apply those experience to our timer software, and make it very reliable. We have confidence in our software.

  • Verify relay on/off status all the time.

    Even the application sends the command to update the relays at the correct time, that won’t guaranty the status of relay will be correct. The connection might be broken. Especially in wireless or network environment, this happens all the time, like there are strong radio near the boards. Two-ways communication is used in timer software. Every time when application update the status of the relays, it will query the device to see if the real status of relays are correct. If the status is not correct, it will update relay status again until either the status is correct or time out. This is been done in a separate thread, so the main program won’t hang up. 

  • Send detect command in specific interval..

    There are still any possibility make the status of relay wrong. For example, there might be power failure. The board lost power. When power on, the relays’ status of the board will be default initial value. If the program only update relays when there is change of status, the real status of relay will be wrong until next time it is updated. Our timer software update relay status both when there is change in status, and at the specific time interval. The interval is generally set to 2 – 5 seconds, that means, if there is a power failure, or lost connection, the status of relay will be recovered in seconds.

  • Report lost connection immediately.

    When the connection is lost, or hardware doesn’t response, the timer software will try to update the status of relays, at the same time, it will report the error on GUI. This is very important. User will know there are something wrong, or might be something wrong. User can take actions to make the system work.

    Robust

  • True native .net program

    Our timer software are written by native .net code. Native .net code are known as safe language. They can run safely in all windows platform after Windows XP.

  • Keep sending detect command after lost connection.

    The program will keep seeding detect command if there is lose of connection. It will recover the status of relay at the first time when the connection is recovered.

  • Automatic run after logging in Windows and back up status in hard driver

    The program can be setup to start automatically after logging in windows. The program will write the status of program to hard driver whenever there is status change. If the program is closed accidently, it will load the last status from hard driver.

    Good customer support