You are not logged in.

#1 2017-11-22 20:05:31

rob
Member
Registered: 2017-09-28
Posts: 54

Lamp hours update through external program

It would be great to be able to update lamp hours through external command. Same as there is a similar option to switch projector on/off. I have a non serial model, but I can read the value through external program.
Similar usb/serial options might be useful, too, even if some might be worked around.

PS: is there a way to show output from a command in "confirmation window" arisen from customized buttons? Or, vice versa, to have a button open a "input value" window to take arguments for a command?

Offline

#2 2017-11-23 06:54:05

Shahin
Administrator
Registered: 2016-02-17
Posts: 3,541

Re: Lamp hours update through external program

Use can use any external value in gcode boxes, using net or syscall keywords.
You can customize theme to support kind features. Also you can put custom inputs on setup page to get custom values, but it needs manual json editing.

Offline

#3 2017-11-23 08:12:11

rob
Member
Registered: 2017-09-28
Posts: 54

Re: Lamp hours update through external program

Great, thanks for the info. I will check it out next days and share back the solution.

Offline

#4 2017-11-23 12:11:25

rob
Member
Registered: 2017-09-28
Posts: 54

Re: Lamp hours update through external program

Just a clarification: if using USB/serial projector, is lamp hour updated each time the variable [[LampHours]] is evaluated (every layer print)? Or it is just at slicing time? Or during some events, like before printing start? Or only manually?

If any of the latter, it would be good to have a way to update the LampHours value from GCode (Something like [[LampHoursSet N]]). This way value could also be cheked from the interface.
Right now I can have the actual value from external program with something like [[ExecReturn ./getLampHours]] and use the expression in a formula to get exposure time for the layer. But I think running the external program as many times as layers in the print might slow things down and increase the number of steps which depends from external programs.
Being able to set it once before printing might more reliable option.

Offline

#5 2017-11-23 22:23:23

Shahin
Administrator
Registered: 2016-02-17
Posts: 3,541

Re: Lamp hours update through external program

Each time printer start printing. It will be more reliable if it could be read once.

Offline

#6 2017-11-28 20:52:21

rob
Member
Registered: 2017-09-28
Posts: 54

Re: Lamp hours update through external program

Shahin wrote:

Each time printer start printing. It will be more reliable if it could be read once.

So I will use ExecReturn to get the value for the formula, thanks.
About being able to visualize it, any chance to show ExecReturn value in a pop-up when pressing a Button? Or otherwise to update it manually? I could not find where the value is stored.

Offline

#7 2017-11-29 05:24:48

Shahin
Administrator
Registered: 2016-02-17
Posts: 3,541

Re: Lamp hours update through external program

You can get value by requesting /status url, it will returns json file including lamp usage time called LampHours

Offline

Board footer

Powered by FluxBB