Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

Read in site specific calibration values for same logger program


acardiel Jun 3, 2020 01:26 PM

Scenario:
- several logger sites
- same logger model with SAME logger code
- same sensor set up
- DIFFERENT sensor calibration values

How would I go about this if my aim was to load the same CRBasic program to the loggers (CR1000X's) but also have distinguishable calibration files. I've got some thermistors that I'm using which have all have slightly different resistance values, so I need to "calibrate" for each site via a separate file where I have preloaded the resistance values for each site. Note that my use of the term "calibration" is a little different than Campbell Sci seems to use it. I don't need to measure these calibration values while logging. Rather, I already know the values ahead of time, and they will remain constant.

I'm trying to avoid listing all the different resistance values for all the sites in the main program code, as I'd like to eventually include other site specific values in the calibration file as well. I want the main program code to be general enough to use for all the sites, with any specific site information included via the calibration file.  

Any tips for how to structure the separate text or csv calibration file would be appreciated as well. 

Thank you!


JDavis Jun 3, 2020 04:28 PM

I think the Include() instruction is what you want. If effectively copies in the code from the other file. You can then keep the constants for each station in a separate file.


rlwoell Jun 11, 2020 09:30 AM

Another approach I have used if you have a reasonable number of data loggers is to read the serial number or station name of the data logger and then use it to apply the required calibration.  I don't have the exact code available right now but this suedo code should help.

SN is the logger serial number or station name (if unique).  Variable available may depend on the model of data logger.  For this example let's say there are three data loggers with serial numbert of 123, 569, and 934 and that there is pressure transducer with a calibration variable call PCal.

Program suedo code:

SN = status.stationname

if SN =123 then PCal =1009.5

if SN = 569 then PCal = 1015.3

if SN = 934 then PCal = 998.3

While this method may not be the most elegant, it is straightforward and has the advantage that all data loggers have the exact same program and that no other support files are needed.  If you need to make a change in the program, say to add a new table, the same program can be sent to all data loggers and you don't have to worry about sending a specific program to a specific logger.


acardiel Jun 19, 2020 09:54 AM

Thank you JDavis and rlwoell. I did end up going with the Include() command, and it's working great. In the past we had used code similar to what rlwoell described, and that is definitely a good fall-back option because it works! We want to try out this new method to potentially not "disrupt" all the other Campbells if we need to change calibration values on just one of them, and we'd like to make sure all Campbells have exactly the same main program at all times just for cleanliness. 

Log in or register to post/reply in the forum.