Hi,
I really dont know where to begin here:
I inherited an Access database (attached) which is permanently connected to a data source (wo electonic triggers from pair of Infrared beams). These are used to count bats entering and leaving a roost. There are 2 sequential beams so hopefullly direction can be calcuated by sequence and possibly speed by elapsed time.
The triggers are on pin zero and pin one; pin state 0 means no signal, pin state 1 is triggered i.e. IR beam blocked.
So for example, the sequence of one bat flying through this would be as follows:
start with both beams un-triggered: pin 0=0, pin 1=0,
bat flying through in one direction: pin 0=1, pin1=1, pin 0=0, pin1=0.
bat returning in other direction : pin 1=1, pin0=1, pin 1=0, pin0=0.
Any ideas how can I do this using the data below -and attached?
Event Ticks = (number of 100-nanosecond intervals that have elapsed since 12:00 A.M., January 1, 0001)
a sample of the main data table (as csv) -note: the last few transits are blockages which also need to be determined or ignored.
ID,EventTicks,EventTime,IPAddress,Pin,State
2007,634251616470553000.00,12-Nov-10,192.168.1.9,1,1
2008,634251616470580000.00,12-Nov-10,192.168.1.9,0,1
2009,634251616470601000.00,12-Nov-10,192.168.1.9,1,0
2010,634251616471864000.00,12-Nov-10,192.168.1.9,0,0
2011,634251616496660000.00,12-Nov-10,192.168.1.9,0,1
2012,634251616496687000.00,12-Nov-10,192.168.1.9,0,0
2013,634251616496709000.00,12-Nov-10,192.168.1.9,1,1
2014,634251616496730000.00,12-Nov-10,192.168.1.9,1,0
2015,634251616518431000.00,12-Nov-10,192.168.1.9,1,1
2016,634251616518457000.00,12-Nov-10,192.168.1.9,0,1
2017,634251616518479000.00,12-Nov-10,192.168.1.9,0,0
2018,634251616519841000.00,12-Nov-10,192.168.1.9,1,0
2019,634251616548064000.00,12-Nov-10,192.168.1.9,0,1
2020,634251616548091000.00,12-Nov-10,192.168.1.9,1,1
2021,634251616548114000.00,12-Nov-10,192.168.1.9,0,0
2022,634251616549173000.00,12-Nov-10,192.168.1.9,1,0
2023,634251616555524000.00,12-Nov-10,192.168.1.9,1,1
2024,634251616559656000.00,12-Nov-10,192.168.1.9,1,0
2025,634251616562781000.00,12-Nov-10,192.168.1.9,1,1
2026,634251616564494000.00,12-Nov-10,192.168.1.9,0,1
2027,634251616566711000.00,12-Nov-10,192.168.1.9,0,0
2028,634251616568526000.00,12-Nov-10,192.168.1.9,0,1
2029,634251616568553000.00,12-Nov-10,192.168.1.9,0,0
2030,634251616570038000.00,12-Nov-10,192.168.1.9,1,0
2031,634251616574372000.00,12-Nov-10,192.168.1.9,1,1
2032,634251616574400000.00,12-Nov-10,192.168.1.9,0,1
2033,634251616575480000.00,12-Nov-10,192.168.1.9,0,0
2034,634251616575504000.00,12-Nov-10,192.168.1.9,1,0
2035,634251616592112000.00,12-Nov-10,192.168.1.9,0,1
2036,634251616592138000.00,12-Nov-10,192.168.1.9,1,1
2037,634251616592160000.00,12-Nov-10,192.168.1.9,1,0
2038,634251616592182000.00,12-Nov-10,192.168.1.9,0,0
2039,634251616613480000.00,12-Nov-10,192.168.1.9,1,1
2040,634251616613506000.00,12-Nov-10,192.168.1.9,0,1
2041,634251616613528000.00,12-Nov-10,192.168.1.9,0,0
2042,634251616614790000.00,12-Nov-10,192.168.1.9,1,0
2043,634251616637872000.00,12-Nov-10,192.168.1.9,0,1
2044,634251616637899000.00,12-Nov-10,192.168.1.9,1,1
2045,634251616638981000.00,12-Nov-10,192.168.1.9,1,0
2046,634251616639006000.00,12-Nov-10,192.168.1.9,0,0
2047,634251616661659000.00,12-Nov-10,192.168.1.9,1,1
2048,634251616661685000.00,12-Nov-10,192.168.1.9,0,1
2049,634251616661708000.00,12-Nov-10,192.168.1.9,0,0
2050,634251616661730000.00,12-Nov-10,192.168.1.9,1,0
2051,634251616677282000.00,12-Nov-10,192.168.1.9,0,1
2052,634251616677321000.00,12-Nov-10,192.168.1.9,0,0
2053,634251616677344000.00,12-Nov-10,192.168.1.9,0,1
2054,634251616678492000.00,12-Nov-10,192.168.1.9,0,0
2055,634251616678517000.00,12-Nov-10,192.168.1.9,0,1
2056,634251616682222000.00,12-Nov-10,192.168.1.9,1,1
2057,634251616682248000.00,12-Nov-10,192.168.1.9,1,0
2058,634251616698046000.00,12-Nov-10,192.168.1.9,0,0
2059,634251616711249000.00,12-Nov-10,192.168.1.9,1,1
2060,634251616721733000.00,12-Nov-10,192.168.1.9,1,0
2061,634251616728990000.00,12-Nov-10,192.168.1.9,1,1
2062,634251616729016000.00,12-Nov-10,192.168.1.9,0,1
2063,634251616739775000.00,12-Nov-10,192.168.1.9,0,0
2064,634251616739801000.00,12-Nov-10,192.168.1.9,1,0
after thinking about it, since the id is consecutive, perhaps could start by looking for two consective records where pins 0 and 1 are both 0
then examine next 4 records to see if sequence of pin states is 1,1,0,0 and if so this is a valid transit, if not, search for next consective records where pins 0 and 1 are both 0,
if a valid transit then can determine directiion by recording which pin went high first. and possible elapsed time of transit by diff between ticks?
but I have no idea how to do this in access....
many thanks
cp
I really dont know where to begin here:

The triggers are on pin zero and pin one; pin state 0 means no signal, pin state 1 is triggered i.e. IR beam blocked.
So for example, the sequence of one bat flying through this would be as follows:
start with both beams un-triggered: pin 0=0, pin 1=0,
bat flying through in one direction: pin 0=1, pin1=1, pin 0=0, pin1=0.
bat returning in other direction : pin 1=1, pin0=1, pin 1=0, pin0=0.
Any ideas how can I do this using the data below -and attached?
Event Ticks = (number of 100-nanosecond intervals that have elapsed since 12:00 A.M., January 1, 0001)
a sample of the main data table (as csv) -note: the last few transits are blockages which also need to be determined or ignored.
ID,EventTicks,EventTime,IPAddress,Pin,State
2007,634251616470553000.00,12-Nov-10,192.168.1.9,1,1
2008,634251616470580000.00,12-Nov-10,192.168.1.9,0,1
2009,634251616470601000.00,12-Nov-10,192.168.1.9,1,0
2010,634251616471864000.00,12-Nov-10,192.168.1.9,0,0
2011,634251616496660000.00,12-Nov-10,192.168.1.9,0,1
2012,634251616496687000.00,12-Nov-10,192.168.1.9,0,0
2013,634251616496709000.00,12-Nov-10,192.168.1.9,1,1
2014,634251616496730000.00,12-Nov-10,192.168.1.9,1,0
2015,634251616518431000.00,12-Nov-10,192.168.1.9,1,1
2016,634251616518457000.00,12-Nov-10,192.168.1.9,0,1
2017,634251616518479000.00,12-Nov-10,192.168.1.9,0,0
2018,634251616519841000.00,12-Nov-10,192.168.1.9,1,0
2019,634251616548064000.00,12-Nov-10,192.168.1.9,0,1
2020,634251616548091000.00,12-Nov-10,192.168.1.9,1,1
2021,634251616548114000.00,12-Nov-10,192.168.1.9,0,0
2022,634251616549173000.00,12-Nov-10,192.168.1.9,1,0
2023,634251616555524000.00,12-Nov-10,192.168.1.9,1,1
2024,634251616559656000.00,12-Nov-10,192.168.1.9,1,0
2025,634251616562781000.00,12-Nov-10,192.168.1.9,1,1
2026,634251616564494000.00,12-Nov-10,192.168.1.9,0,1
2027,634251616566711000.00,12-Nov-10,192.168.1.9,0,0
2028,634251616568526000.00,12-Nov-10,192.168.1.9,0,1
2029,634251616568553000.00,12-Nov-10,192.168.1.9,0,0
2030,634251616570038000.00,12-Nov-10,192.168.1.9,1,0
2031,634251616574372000.00,12-Nov-10,192.168.1.9,1,1
2032,634251616574400000.00,12-Nov-10,192.168.1.9,0,1
2033,634251616575480000.00,12-Nov-10,192.168.1.9,0,0
2034,634251616575504000.00,12-Nov-10,192.168.1.9,1,0
2035,634251616592112000.00,12-Nov-10,192.168.1.9,0,1
2036,634251616592138000.00,12-Nov-10,192.168.1.9,1,1
2037,634251616592160000.00,12-Nov-10,192.168.1.9,1,0
2038,634251616592182000.00,12-Nov-10,192.168.1.9,0,0
2039,634251616613480000.00,12-Nov-10,192.168.1.9,1,1
2040,634251616613506000.00,12-Nov-10,192.168.1.9,0,1
2041,634251616613528000.00,12-Nov-10,192.168.1.9,0,0
2042,634251616614790000.00,12-Nov-10,192.168.1.9,1,0
2043,634251616637872000.00,12-Nov-10,192.168.1.9,0,1
2044,634251616637899000.00,12-Nov-10,192.168.1.9,1,1
2045,634251616638981000.00,12-Nov-10,192.168.1.9,1,0
2046,634251616639006000.00,12-Nov-10,192.168.1.9,0,0
2047,634251616661659000.00,12-Nov-10,192.168.1.9,1,1
2048,634251616661685000.00,12-Nov-10,192.168.1.9,0,1
2049,634251616661708000.00,12-Nov-10,192.168.1.9,0,0
2050,634251616661730000.00,12-Nov-10,192.168.1.9,1,0
2051,634251616677282000.00,12-Nov-10,192.168.1.9,0,1
2052,634251616677321000.00,12-Nov-10,192.168.1.9,0,0
2053,634251616677344000.00,12-Nov-10,192.168.1.9,0,1
2054,634251616678492000.00,12-Nov-10,192.168.1.9,0,0
2055,634251616678517000.00,12-Nov-10,192.168.1.9,0,1
2056,634251616682222000.00,12-Nov-10,192.168.1.9,1,1
2057,634251616682248000.00,12-Nov-10,192.168.1.9,1,0
2058,634251616698046000.00,12-Nov-10,192.168.1.9,0,0
2059,634251616711249000.00,12-Nov-10,192.168.1.9,1,1
2060,634251616721733000.00,12-Nov-10,192.168.1.9,1,0
2061,634251616728990000.00,12-Nov-10,192.168.1.9,1,1
2062,634251616729016000.00,12-Nov-10,192.168.1.9,0,1
2063,634251616739775000.00,12-Nov-10,192.168.1.9,0,0
2064,634251616739801000.00,12-Nov-10,192.168.1.9,1,0
after thinking about it, since the id is consecutive, perhaps could start by looking for two consective records where pins 0 and 1 are both 0
then examine next 4 records to see if sequence of pin states is 1,1,0,0 and if so this is a valid transit, if not, search for next consective records where pins 0 and 1 are both 0,
if a valid transit then can determine directiion by recording which pin went high first. and possible elapsed time of transit by diff between ticks?
but I have no idea how to do this in access....
many thanks
cp
Attachments
Last edited: