The Many Possibilities of PakBus Networking

by Jacob Davis | Updated: 10/12/2016 | Comments: 6

Search the Blog


Blog Languages

English
Français (French)


Subscribe to the Blog

Get an email when a new article is posted. Choose the topics that interest you most.


Area / Application

Product Category

Activity

Corporate / News

Enter your email address:



Suggest an Article

Is there a topic you would like to learn more about? Let us know.

Leave this field empty

PakBus icon

What do you do if you have two data loggers installed really close to each other and you only want to pay the bill for running one cellular modem? How do you get data from both data loggers using a single modem? How do you get your data loggers to read the values from each other’s data tables? The short answer to these questions is to use PakBus networking. In this article, I’ll share with you how PakBus networking works and its many possibilities—all in the context of collecting data from two data loggers with a single cellular modem.

What is PakBus?

PakBus is the proprietary communications protocol for Campbell Scientific data loggers. The name derives from the fact that it is a packetized data bus. All data is transferred in packets that include destination and source addresses. It is optimized by design to work well on low bandwidth connections (such as with radios).

What are the benefits of using PakBus?

Here are three key capabilities that the PakBus communications protocol adds to our data loggers:

  • Simultaneous communications
    • At the same time, several devices can be connected to and communicating with a single data logger.
  • Peer-to-peer communications
    • Data loggers can control other data loggers without the use of a PC.
  • Dynamic networking (auto discovery)
    • The network can change automatically as devices are added or removed. This also provides redundant communication paths.

Exploring the Possibilities of Putting PakBus to Use for You

The easiest way to design a PakBus network is to use Network Planner. (Network Planner has been included in LoggerNet since version 4.0.) This tool was specifically designed to help you set up data loggers in PakBus networks so that they can communicate with each other and the LoggerNet server.

Network Planner allows the graphical layout of devices and the specification of the links between the devices. It can then use that information to generate settings for all the devices and provide the means to program those settings into the devices and also to configure LoggerNet.

Tip: To access Network Planner, open LoggerNet, navigate to the Tools menu, and click the Network Planner link.

Recommended for You: If you’re not familiar with Network Planner, watch the “LoggerNet Software | Network Planner” video.

In this example, I’m going to add LoggerNet software, a CR1000 datalogger, and a CR6 datalogger to the network. I connected LoggerNet to the CR1000 on ComRS232, and I connected the CR1000 Com1 to the CR6 ComU1.

Network Planner network

If you look at the settings that Network Planner provides for the data loggers, these are the key settings:

  • Each data logger has a different PakBus address.
  • A matching baud rate is set on the corresponding comport on each data logger.
  • A beacon interval is set on one of the data loggers.
  • The data logger with two connections has IsRouter set to True.

One thing that Network Planner doesn’t do for you is explain the physical wiring. You need to wire the transmit terminals to the receive terminals on the other data logger as shown in the image below:

Wiring two dataloggers together

Tips:

  • When you are doing your wiring, remember the phrase “Transmit to receive. Receive the transmission.” It will help you remember to connect Tx from one data logger to Rx on the other.
  • If the data loggers have separate power supplies, also connect G to G.
  • Shielded, twisted-pair cables will work at much longer distances than separate wires. You can twist individual wires together as shown in the previous image to get most of the noise rejection. Lower noise will allow longer cable distances at higher baud rates.
  • If a connection is not working, try lowering the baud rate.

After the settings from Network Planner have been applied to LoggerNet and both data loggers, you are able to communicate to the CR6 through the CR1000. You may send programs, collect data, and even change your settings.

Further Concepts

At the beginning of this article, I mentioned using one cell modem for two data loggers. The only change needed is to add a cell modem to the CR1000 and use that in place of the RS-232 connection to LoggerNet. You will still be able to collect data from the CR6.

You can also add a radio onto the CR6 for communication to a dozen CR206X dataloggers. It is possible to add more data loggers to the network until you reach the throughput limits of your communication links.

CRBasic instructions even exist that allow one of your data loggers to collect data from another. You can find them listed in the PakBus category of instructions in the CRBasic Editor.

Conclusion

As you can see, there are many possibilities when you use PakBus networking. It might seem a bit complicated at first, but a tool such as Network Planner makes it simple. Putting PakBus networking to work for you can really simplify your job. Don’t forget to also add a Device Activity in Network Planner to enable Scheduled Collection. Scheduled Collection can automatically poll data from any station in the PakBus network. We created the PakBus communications protocol for our data loggers because we know your measurements matter.

Recommended for You: If you'd like to learn more about Network Planner, review the "Tips and Tricks: Get Active!" newsletter article

If you have any questions or comments about PakBus networking, post them below.


Share This Article


About the Author

jacob davis Jacob Davis is the Director of Client Services and Support at Campbell Scientific, Inc. He works with the worldwide technical support teams. His specialties include serial communications and advanced data logger programming. Jacob has a master’s degree in hydrology and worked with large irrigation projects before coming to Campbell Scientific, Inc.

View all articles by this author.


Comments

GAG | 11/13/2016 at 06:55 PM

Should I open the SerialPort in the CRBasic program?

Or does the Network Planner do it for me?

Thank you!

JDavis | 11/14/2016 at 09:44 AM

The baud rate setting that Network Planner configures on the datalogger will open the serial port. There is no need to use SerialOpen in your datalogger program.

Minh T. | 02/22/2018 at 02:32 PM

Do Loggernet Servers that communicate with one another using TCP/IP utilize the Pakbus protocol or is Pakbus strictly used for Server-to-Logger and Logger-to-Logger communication?  

JDavis | 02/22/2018 at 05:04 PM

If you look at your network in Setup of LoggerNet, anything going through a PakbusPort is using PakBus as the protocol.

Mazhar | 04/30/2021 at 07:02 AM

Thank Jacob for this article. In my configuration : assuming I have two CR1000 linked with TCP/Packbus via NL115 on each, if I add a CELL2xx on one of the CR1000 (let call it CR1000_Router), no link with Loggernet but datas sent thru FTP,  I have three additionnal questions :

. why there is not any link available between CELL2xx series and CR1000, while links are available betwenn CELL2xx series and CR300 ?

. should I have to specify IP adress to each CR1000 (like 192.168.1.1 and 192.168.1.10) or leave it to 0.0.0.0 ?

. If I have specified an IP adress on CR1000, what will happen when CELL2xx will connect via GPRS, a conflict of IP adress or will it run as usual : External IP adress thru CELL2xx and Internal IP adress thanks to DHCP

Thank you for your help

Best regards

JDavis | 04/30/2021 at 08:19 AM

With IP connections, sometimes you need to force which interface a connection goes through with the IPRoute() instruction. Please contact your local Campbell Scientific office for support.

Please log in or register to comment.