Use a while loop with an uninitialized shift register for each lamp. Inside the while loop have a case structure with cases for No Change, Lamp Came On, Lamp Went Off, Initialize, and Reset. Inside the Lamp Came On and Lamp Went Off cases, read the Get Date/Time or Tick Count function (depending on the desired timing resolution) and add/subtract to get the elapsed time for each lamp. You might need two shift registers for each lamp: one to hold the most recent Lamp Came On time and one for the total elapsed time (or one shift register with a cluster holding the two elements).If the VI is to run continuously, put a wait in the loop so that other parts of the program will have opportunities to execute. If it is only to be called when a change takes place, set t
he loop to execute only once for each call to the VI.
Lynn