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.

Burst sampling with Sub, and SlowSequence


--dd-- Nov 27, 2025 11:50 AM

Hi,

Im trying to make a program that does someting similar as my code below (but this will not compile).

I have a main scan of 10 min, every two minutes before a full hour, I would like to start two burst samplings with a scan of 10 sec and 100 msec. 

I would prefere to avoid fast scans between :00 - :58 to save on battery.

I need the two Burst modes to be in seperate SlowSequences to avoid missing samples (my real program will not run in pipeline mode).

Any idea how I can get this to work, and made the code pretty?

Thanks,

John 

Public PTemp, Batt_volt

Sub Burst1
  SlowSequence
  Scan (10,Sec,0,0)
    PanelTemp (PTemp,15000)
    If TimeIntoInterval (0,60,Min)
      Exit Sub
    EndIf
  NextScan
EndSub

Sub Burst2
  SlowSequence
  Scan (100,mSec,0,0)
    Battery (Batt_volt)
    If TimeIntoInterval (0,60,Min)
      Exit Sub
    EndIf
  NextScan
EndSub

'Main Program
BeginProg
  Scan (10,Min,0,0)
    PanelTemp (PTemp,15000)
    Battery (Batt_volt)
    ' Do meassuremnts here...
  NextScan

  SlowSequence
  Scan (2,Min,0,0)
    If TimeIntoInterval (58,60,Min)
      Call Burst1
      Call Burst2
    EndIf
  NextScan
EndProg
Log in or register to post/reply in the forum.