Basic language problems


#1

Hi Tim,
Here is the program i used on an EWON 201 previously. I cant get mos of this to work on the 205

Rem — eWON start section: Cyclic Section
eWON_cyclic_section:
Rem — eWON user (start)
ONDATE 1,“00 01 * * 1-5”,“Gosub Email_file” Rem server is 1 hour ahead, this will be done once a week.
ONDATE 2,“00 10 * * 1-5”,“Gosub Initialize_file” Rem write all zeros in data file. this wil be done once a week.
Rem — eWON user (end)
End
Rem — eWON end section: Cyclic Section
Rem — eWON start section: Init Section
eWON_init_section:
Rem — eWON user (start)
a%=Trigger@
Onchange a%, “gosub Batchdata”
Rem — eWON user (end)
End
Rem — eWON end section: Init Section
Rem — eWON start section: Batchdata
Rem — eWON user (start)
Batchdata:
a%=Trigger@
If a%=0 Then Return
Open “file:/usr/data.dat” For Text Append As 1 Rem This is done at each batch complete (Trigger)
Put 1, Time$;limestone_target@;limestone_actual@;GYPSUM_target@;GYPSUM_ACTUAL@;cement_target@;cement_actual@;mag_o2_target@;mag_o2_actual@;poly_target@;poly_actual@;citric_acid_TARGET@;citric_acid_actual@;laxative_target@;laxative_actual@
Close 1
Print Time$;“Data written”
Return
Rem — eWON user (end)
End
Rem — eWON end section: Batchdata
Rem — eWON start section: Email_file
Rem — eWON user (start)
Email_file:
Sendmail "CJOSACK@FLEXICON.com","", “From GigaCrete Flexy”, “&[$dtUF$fndata.dat]”
Print Time$;“Mail sent”
Return
Rem — eWON user (end)
End
Rem — eWON end section: Email_file
Rem — eWON start section: Initalize_file
Rem — eWON user (start)
Initialize_file:
Open “file:/usr/data.dat” For Text Output As 1
Put 1, “Date & Time”;“LS-TGT”;“LS-ACT”;“GYP-TGT”;“GYP-ACT”;“CEM-TGT”;“CEM-ACT”;“MG-TGT”;“MG-ACT”;“POL-TGT”;“POL-ACT”;“CA-TGT”;“CA-ACT”;“LAX-TGT”;“LAX-ACT”
Close 1
Print Time$;“File initialized”
Return
Rem — eWON user (end)
End
Rem — eWON end section: Initalize_file