Countdowntxt.Text = "Exposing" DoEvents Imptr& = Imptr1& Reportptr1& = Reportptr& If Expinterval& < 1000 Then 'if short exposure Call Wiper 'clears pixels Call ReceiveBlock 'starts hardware timer and downloads to array on completion Else Call Wiper 'if long exposure, start exposure (clear pixels) Endcount& = GetTickCount + Expinterval& Do While GetTickCount < Endcount& 'software timer running Remainder& = (Endcount& - GetTickCount) / 1000 If Remainder& < 3 And Remainder& > 1 Then Call Clearvert 'if within 3 seconds of readout, clear registers Countdowntxt.Text = Format$(Remainder&, " 0.0") If Terminate% = 1 Then Exit Sub DoEvents Loop Countdowntxt.Text = "Reading" DoEvents Call ReceiveBlock2 'reads out camera into byte array End If