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.

delay question


mortenx Aug 26, 2018 07:27 PM

if i am using Delay (0,60,Sec) , is the scaning still running or scanning is also delayd/stopped?

i am using 3g modem what needs 60 sec to boot and send data with httpost

line- 
SW12 (SW12_1,1 )
Delay (0,60,Sec)

 

DataTable(data1,True,-1)
	DataInterval(0,5,Min,10)
	TableFile ("CRD:data1",8,-1,500,0,Min,OutStat,LastFileName)
	Totalize(1,Rain_mm_1,FP2,False)
	Totalize(1,Rain_mm_2,FP2,False)
	Totalize(1,Rain_mm_3,FP2,False)
	Totalize(1,Rain_mm_4,FP2,False)
	Totalize(1,Rain_mm_5,FP2,False)
	Totalize(1,Rain_mm_6,FP2,False)
	
	EndTable

'Main Program 
BeginProg
    
Scan(5,Sec,40,0)
				Battery(BattV)
			PanelTemp(PTemp_C,50)
		PulseCount(Rain_mm_1,1,U1,1,0,1,0)
		PulseCount(Rain_mm_2,1,U2,1,0,1,0)
		PulseCount(Rain_mm_3,1,U3,1,0,1,0)
		PulseCount(Rain_mm_4,1,U4,1,0,1,0)
		PulseCount(Rain_mm_5,1,U9,1,0,1,0)
		PulseCount(Rain_mm_6,1,U6,1,0,1,0)
				'Call Data Tables and Store Data
		CallTable data1
		NextScan
   SlowSequence
		Scan(5,Min,1,0)
t1= data1.Rain_mm_1_Tot
t2= data1.Rain_mm_2_Tot
t3= data1.Rain_mm_3_Tot
t4= data1.Rain_mm_4_Tot
t5= data1.Rain_mm_5_Tot
t6= data1.Rain_mm_6_Tot

temp= Round (PTemp_C,1)
volt= Round (BattV,1)
  If t1>0 OR t2>0  OR t3>0  OR t4>0  OR t5>0  OR t6>0    Then
    
SW12 (SW12_1,1 )

Delay (0,60,Sec)

 HTTPPost (gurl,datag,httpresponse2,http_header2)
  
If httpresponse2="Error: failed to connect"
SW12 (SW12_1,1 )
 HTTPPost (gurl,datag,httpresponse2,http_header2)
Endif

 


JDavis Aug 27, 2018 05:04 PM

A delay in the slow sequence will not delay the main scan. The delay will wait at least 60 seconds. It may go longer, due to waiting on the main scan.

Log in or register to post/reply in the forum.