Selective logging of a digital input


Recommended Posts

In our apparatus, the motion of an object as it periodically passes through a tunnel is detected by two LED sensors that both emit and sense light. When there is nothing under the sensors, the inputs of their two channels are 1. When the object passes under the sensors, it reflects light back to the sensors and the input is 0. Having two sensors/channels allows us to determine which direction the object was moving in at a given time, based on the order in which the sensors were triggered.

We would like to take data over a 24-hour period, but with 4 readings/second, there will be too much data to reasonably sift through (I don't even know if Excel can put 345,000 rows on a sheet). We are looking for a way to only log certain readings. At the least, we want to eliminate all the readings where both inputs=1, since this accounts for the majority of the time, when the object is not in the tunnel at all. Ideally, we would like to isolate the events in which one sensor, and then the other, detects reflected light (input=0).

Is it possible to do this kind of data paring during the setting up/ logging/ exporting stage? If so, what would be the script to make it happen? We have hardly any experience with scripting.


Link to comment
Share on other sites


This topic is now archived and is closed to further replies.