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.

CR1000 Programming Language


Wx2day Dec 11, 2018 06:48 AM

What would syntax be to only output a table between 6am thru 6pm?

 Respectfully,

Wx2day


jtrauntvein Dec 11, 2018 12:18 PM

One of the parameters required by the DataTable declaration in CRBasic is a triggerVar parameter (this is the second parameter that is specified between the table name and the table size).  This second parameter is an expression that controls whether the table will be written.  A value of zero indicates that no write should occur where any non-zero value will indicate that the table should be written.


rlwoell Dec 11, 2018 12:49 PM

Below is a segment of a program I wrote that has the datatable write at the top of the minute through the tenth second.  The "timeisbetween will write from 0 seconds up to 10, but not 10.  The timeintointerval will write data at second 10.

DataTable(Table1,(timeisbetween(0,10,60,sec) or timeintointerval(10,60,sec)),-1)
 DataInterval(0,1,Sec,10)
 CardOut(0,-1)
 Sample(1,BattV,FP2)
 Sample(1,PTemp_C,FP2)
EndTable

While I haven't bench tested it yet, I think for your application the DataTable line would then be:

DataTable(Table1,(timeisbetween(6,18,24,hr) or timeintointerval(18,24,hr)),-1)

The first part should get hours 6 - 17 and the last part would catch hour 18.

Check out the help section on these parameters in the CRBasic editor. 


Wx2day Dec 14, 2018 07:10 AM

Thank You both for your reply.   jtrauntvein, I'll check the instruction in CRBasic you are referencing.

 rlwoell, I'll try in the instruction the interval 6-18 and se how it works.

Wx2day

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