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.

CR10X and sensor button activation


evancelt Feb 17, 2009 06:51 PM

Hello. I'm new to programming dataloggers. I am going to be using some LP02 pyranometers in the field with CR10x dataloggers. I want the operators to be able to just hold down on a trigger or flip a switch to turn the sensor on, take some measurements, and record the data to memory. Is this possible? If so, how? All of the sample programs I've seen use measurements at intervals.

Thanks!
Evan


GBarker Feb 17, 2009 11:53 PM

Evan-

Here's one way to do it:
(1) Read the sensor on a regular interval, whether you're storing the measurement or not.
(2) Connect a normally-open switch between the 5V terminal and a C terminal (for example, C1)
(3) In your program read the status of the C1 port using Instruction 25.
(4) Have an If/Then/Else block in your program which sets Flag 0 high if C1 is high, Flag 0 low if C1 is low.
(5) Use Instruction 77 (stores the time) and Instruction 70 (stores the latest measurement). These two instructions, like all Output Instructions (#69-82) only store to memory when Flag 0 is high. So in this case, you will store time and instantaneous pyranometer measurements when your switch is closed.

-Greg


evancelt Feb 17, 2009 11:55 PM

Thanks I'll give it a try


Dana Feb 18, 2009 07:46 PM

To add to Greg's suggestion, you could circumvent the entire program using something similar to his code & hardware solution by surrounding all the code with If/then/else/EndIf(so no code is executed with each scan, unless a Flag is high).

Dana

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