Time display problem and config saving function.

Post Reply
nekosp
Posts: 4
Joined: 08 Feb 2017, 00:29

Time display problem and config saving function.

Post by nekosp »

Greetings.
It's my first post here, and I've used kisslicer for a while and love it.
Two things I would like to discuss with:


1.Time display problem:
Have bought a pro key for dual extruder, for a lame Creatbot's out-of-box DH02, and additional functions.
Kisslicer has done a fantastic job in tweaking printings to acceptable quality.

However, while I was trying to get printing remaining time displayed on the printer,
like

Code: Select all

M107 End in <TREMAIN>
which showed in .gcode as

Code: Select all

M107 End in 77:88:99
,

it only displayed

Code: Select all

End in 77
on the screen instead of expected

Code: Select all

End in 77:88:99
.

I'm using M$ Win7 64bit. I have tried changing time display style from
hh:mm:ss to hh_mm_ss or otherwise, and outputs in gcode files are still
hh:mm:ss, so that is irrelevant to system's time format.

I don't know if the character ":" can be displayed on printers otherwise.
However, can you please put an option for alternating time displaying method
for alternating ":" to other character that is not so problem-some?
Or is there any option I have missed? Please shed me a light on it.


2.Config saving make easier?
The only way I know to save each printer config regarding to different
printing speed, material, layer thickness, dual or single extrder..etc,
is closing activating kisslicer's window, edit ini files, then reopening it.

Could it be made so, that I can save these options on-the-fly, with new names,
while keeping the window opened?


Again, thanks for your excellent job and making it free / low priced!
It really revived my printer that is terrible to earth with factory setting
and software.
User avatar
EddyMI3D
Posts: 81
Joined: 03 Oct 2015, 17:12

Re: Time display problem and config saving function.

Post by EddyMI3D »

Hello nekosp!

To my information, M107 is to switch off the fan. Are you sure about this GCode?
I thinks it's a typo and you mean M117.
This does not work with every firmware: http://reprap.org/wiki/G-code#M117:_Display_Message

Regards,
Eddy
User avatar
EddyMI3D
Posts: 81
Joined: 03 Oct 2015, 17:12

Re: Time display problem and config saving function.

Post by EddyMI3D »

So, I tried this with my K8200 (Marlin Firmware).
I've got the same here. ":" is like a line break and "88" and "99" are interpreted as new (unknown) commands.
User avatar
EddyMI3D
Posts: 81
Joined: 03 Oct 2015, 17:12

Re: Time display problem and config saving function.

Post by EddyMI3D »

I'm a bit confused now:
I am using the "OctoPrint-DetailedProgress" with my OctoPi and the colons a shown correct on the printers LCD...

Edit:

I just checked it: "OctoPrint-DetailedProgress" sends the data with spaces instead of colons.
Last edited by EddyMI3D on 09 Feb 2017, 14:16, edited 1 time in total.
User avatar
EddyMI3D
Posts: 81
Joined: 03 Oct 2015, 17:12

Re: Time display problem and config saving function.

Post by EddyMI3D »

For your second point:
On the right bottom you can find the Copy and Delete buttons.
When you copy a profile (Style/Support/Printer/Material) a new entry in the correspondent file is generated.
Changes are saved every time you do one.
When you run Kisslicer on C:\Programs\Kisslicer, it could be that Kisslicer can not change the entries because of file authorisations.
When you run it in "C:\Kisslicer" or another drive it should work. You also could run Kisslicer as administrator.
nekosp
Posts: 4
Joined: 08 Feb 2017, 00:29

Re: Time display problem and config saving function.

Post by nekosp »

Hello Eddy,

Thanks for your reply.

And:

1.yes, as you said, it was a typo. I was busy back and forth then. It should be M117.
AFAIK, the printer I referred here is marlin based firmware as well. Not open sourced
however.

It's good to see someone other than me had reproduced the colon display problem.
I could get it rounded by manually replace all ":" in the gcode file, thank god not
many within there, with "_" (underline) or other regular signs.
However, it is a bit of annoying and could be more elegant if we can get it replaced
before the codes were generated;


2.Oh! I really have mis-interpreted that 2 buttons for over 2 years!
I took them as indicators but controllers. Thanks a lot! That will make my life easier.
nekosp
Posts: 4
Joined: 08 Feb 2017, 00:29

Re: Time display problem and config saving function.

Post by nekosp »

A semi auto modification method for this problem, with notepad++:

1.get a notepad++, and install python-script, with python 2.x if you don't have;
2.load a gcode file which generated with <TREMAIN> token;
3.run the script by selecting [plug-in] -> [python script] -> [scripts] -> [which_ever_you_named.py];
4.save and run the gcode on bots.

Now you should have the time format corrected for marlin bots and see full time string on screen.

Anyone could provide an automatic post-processing method for kisslicer 1.5 would be appreciated.

Detail:
I generated the gcode with "M117 End_in_<TREMAIN>", so I could use regular expression in notepad++
to find out strings I want to modify easily. The code I use is:

Code: Select all

# By Carl Huang, 20170410

# Start a sequence of actions that is undone and redone as a unit. May be nested.
editor.beginUndoAction()

# npp++ search/replace
ori_time_exp = r'End_in_([0-9]{2}):+([0-9]{2}):+([0-9]{2})'
alt_time_exp = r'End_in_\1h\2m\3s'
editor.rereplace( ori_time_exp , alt_time_exp )

# end the undo sequence
editor.endUndoAction()
It will not modify other time strings that is not specifically for telling remain printing time,
and the original / modified time string will be like:

Code: Select all

M117 End_in_11:22:33
/
M117 End_in_11h22m33s
so that you can see full time information on screen.

Copy code above and save as a .py file in

Code: Select all

C:\Users\[i][user name][/i]\AppData\Roaming\Notepad++\plugins\config\PythonScript\scripts
or

Code: Select all

C:\Program Files (x86)\Notepad++\plugins\PythonScript\scripts
for executing.

If you do not mind changing all time strings in gcode, then replace corresponding codes as this:

Code: Select all

# npp++ search/replace
ori_time_exp = r'([0-9]{2}):+([0-9]{2}):+([0-9]{2})'
alt_time_exp = r'\1h\2m\3s'
editor.rereplace( ori_time_exp , alt_time_exp )
Post Reply