Example Code for Using Mars with the Campbell Scientific CR1000X Data Logger

Modified on Thu, 30 Nov, 2023 at 10:42 AM

The CR1000X is a popular data logger unit manufactured by Campbell Scientific. At the link below we provide example code for CR1000X to demonstrate logging Mars Soiling Sensor using Modbus RTU (RS485). Download the example code and adapt it as needed to suit your system. 


See wiring instructions here: RS485 connections to Campbell Scientific CR1000X data logger.  Note that the wiring instructions and wiring comments in the example code refer to the 810230-20 model of Mars sensor when used with the 830303 cable series, and other models and cables may have different wiring requirements or colors.


For more information about Mars please read the Mars 810230-20 User Guide.


For more information on Campbell Scientific data logger programming please explore the Campbell Scientific Programming Tutorials.




This page replaces the previously published 880063 application note which provided Mars demo code for Campbell Scientific data loggers. (November 2023)

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article