Can a script to stop/start planner


#24

Is current time, the same the time the eWon uses in the Basic IDE? It seems like all of the code is working but comparator statement with the time.


#25

Can I take a look at this on teamviewer tomorrow morning and debug this?


#26

Yes. What time are you thinking?


#27

I got it to email out but no information in the body. The bit was already high when I hit run so it did not see the ‘Onchange’


#28

Hi Joseph, I’m free now, let me know if you’re available or what time you’ll be free to work on it today


#29

I get into work in another 45 mins. I’ll send over the team viewer I’d when I get in.


#30

That works for me


#31

Hello Tim,

I am not getting anything in the body of the email. Not sure why. Any insight?

ONDATE 1,“10 6 * * 1-6”,"@Entry1()"

ONDATE 2,“0 16 * * 1-6”,"@Entry2()"

Onchange “Test”,"@Testing()"

FUNCTION Entry1()

If Enable_Production_Email_1@ = 1 Then

$EmailTo$ = "josephm@unitedsalesinc.net"

$EmailCC$ = "josephm@unitedsalesinc.net"

$EmailSubject$ = “Daily Production Report”

$EmailBody$ = “”

$EmailBody$ = $EmailBody$ + “Bin Count Line 1/2 :” + STR$ Line_1_2_Dumped_Bins_Total@ + “Bins” +CHR$(13) + CHR$(10) // the CHR$(13) + CHR$(10) is the same as newline

$EmailBody$ = $EmailBody$ + “Bin Count Line 3 :” + STR$ Line_3_Dumped_Bins_Total@ + CHR$(13) + CHR$(10) // Second line of email

$EmailBody$ = $EmailBody$ + “Total Bin Count :” + STR$ Total_Bins_Dumped@ + CHR$(13) + CHR$(10) // Third Line of email… ect

$EmailBody$ = $EmailBody$ + “Total Box Count :” + STR$ Total_Boxes_Ran@ + CHR$(13) + CHR$(10) // Third Line of email… ect

$EmailBody$ = “”

// Want to include data such as graphs as an attachment? see: https://ewonsupport.biz/ebd/

$EmailAttachment$ = “&[$dtUF $fnreport_shift_1.html]”

$EmailContents$ = $EmailBody$ + $EmailAttachment$

SENDMAIL $EmailTo$, $EmailCC$, $EmailSubject$, $EmailContents$

Endif

ENDFN

FUNCTION Entry2()

If Enable_Production_Email_1@ = 1 Then

SENDMAIL "jasonp@unitedsalesinc.net", "josephm@unitedsalesinc.net", “FN lifts report”, “&[$dtUF $fnlifts_report.html]”

Endif

ENDFN

Function Testing()

$EmailTo$ = "jasonp@unitedsalesinc.net"

$EmailCC$ = "josephm@unitedsalesinc.net"

$EmailSubject$ = “Daily Production Report”

$EmailBody$ = “”

$EmailBody$ = $EmailBody$ + “Variable name” + STR$ test@ + “Bins” +CHR$(13) + CHR$(10) // the CHR$(13) + CHR$(10) is the same as newline

$EmailBody$ = $EmailBody$ + "Value of Second Tag is " + CHR$(13) + CHR$(10) // Second line of email

$EmailBody$ = $EmailBody$ + "Value of Third Tag is " + CHR$(13) + CHR$(10) // Third Line of email… ect

$EmailBody$ = $EmailBody$ + "Time: " + TIME$ + CHR$(13) + CHR$(10) // Gives the full date when this was sent

// Want to include data such as graphs as an attachment? see: https://ewonsupport.biz/ebd/

$EmailAttachment$ = “&[$dtUF $fnlifts_report.html]”

$EmailContents$ = $EmailBody$ + $EmailAttachment$

Endif

EndFN


#32

Disregard. Dumb mistake


#33

Hi Joseph,

Just want to make sure this was all set?


#34

Yes, Sorry about that.


#35

I am getting this error. “24 Var or keyword too long” I can’t seem to find how long it can be?

This is the script it is getting stuck on.

// $EmailBody$ = $EmailBody$ + “Line 3 Packing Sizer Production Time : " + STR$ Line_3_Packing_Sizer_Production_Time_Total@ + " Hours” + CHR$(13) + CHR$(10)


#36

It looks like the line you sent is commented out. Can you send me the full code in a notepad file?


#37

I figured it out. The eWon tag has a limitation on how long it can be in the script. I commented it out to see how the format looked as it wouldn’t send with the error. I change it to ‘Line_3_Packing_Sizer_Prod_Time’ and that was inside the limitation.