Jump to content

Default Acceleration Value


stuart264

Recommended Posts

Posted · Default Acceleration Value

I am trying to improve the print timing estimates in Cura for my Sunlu S9+ printer as up until now they have been a work of fiction so I installed fieldofView's "Printer Settings" plugin.

 

I have managed to pull all the values I need out of the Marlin firmware via Pronterface with the exception of 1 value, the "Default Acceleration Value" right now its zeroed after I turned up a note with google that if its zero it will default to the value in the firmware. I suspect its a calculated value from the M204 values,  but I cant find anywhere either how to calculate it or the formula. Can anyone help?

 

Firmware settings are:- 

echo:; Steps per unit:
echo: M92 X80.00 Y80.00 Z400.00 E95.88
echo:; Maximum feedrates (units/s):
echo:  M203 X500.00 Y500.00 Z10.00 E70.00
echo:; Maximum Acceleration (units/s2):
echo:  M201 X750.00 Y750.00 Z100.00 E1000.00
echo:; Acceleration (units/s2): P<print_accel> R<retract_accel> T<travel_accel>
echo:  M204 P300.00 R1000.00 T300.00
echo:; Advanced: B<min_segment_time_us> S<min_feedrate> T<min_travel_feedrate> X<max_x_jerk> Y<max_y_jerk> Z<max_z_jerk> E<max_e_jerk>
echo:  M205 B20000.00 S0.00 T0.00 X8.00 Y8.00 Z0.40 E5.00

 

  • Link to post
    Share on other sites

    Posted (edited) · Default Acceleration Value

    M201 is MAX Accel.  M205 is Jerk.  There is no "Max" for Jerk.

     

    If you enable Acceleration control in Cura and if you enter 5000 for X and 5000 for Y within Printer Settings you would be allowed to enter up to 5000 for any acceleration setting in Cura without the box turning red.  Cura would use those Accel numbers in its calculations and it is what Cura would put in the gcode file in an M204 line.

    But when your printer sees the M204 P5000 T5000 line it would say "Whoa...No Way" because internally M201 says Max X and Y acceleration is 750 and that is what the printer would use in IT'S calculations and the Cura estimate goes out the window.  That's usually where the time discrepancy comes from.

    With Pronterface you can send

    M201 X5000 Y5000

    M500

    The Max acceleration of the printer would become 5000 for X and Y and would be saved as the new default.  If your printer is a "bed slinger" like my Ender 3Pro then 5000 is much too high for the Y but if you were to do that and set the accel in Cura to 1000 then the Cura estimate would be closer to reality as the printer would use 1000 because it would be below the new Max.  Both Cura and the printer would be using the same numbers (although maybe somewhat differently).  I ain't saying this is perfect.

     

    And then there is Jerk.  Jerk units are mm/sec and if you think about it as minimum speed around a corner it's easier to get your head around it.

     

    This post processor was written by someone else.  It was never submitted to Ultimaker for inclusion into Cura.  I use it and I like it because it has a "Fudge Factor" to adjust the Cura estimate to what the printer is actually doing.

    ShowProgress.zip

    Unzip the file and copy "ShowProgress.py" to "C:\Program Files\Ultimaker Cura 5.1.0\share\cura\plugins\PostProcessingPlugin\scripts".  It will be available for you to load as a Post Processor.

    The fudge factor is "[Cura estimate]/[actual print time]".  Figure it out and enter it in the proper box.  A much closer estimate of time remaining should appear on the LCD via an M117 line added to the gcode.  Mine looks like:  1/180 | ET 30M.  I also added an M118 line so if you use it and have Pronterface running it bounces the same line back to Pronterface.

     

    Next, if you are running Windows I wrote this little app as a test for Accel and Jerk.  It's interesting and may give you some insight into what your printer can actually handle.  You have to be careful and start slow.  It is possible to unlock the MAX values and to put in numbers that are high enough to hurt your printer.  Some printers can handle much higher accelerations than others.

    Here is the download link to the aptly named

    Greg's Accel and Jerk Tool which is for Windows only and for Marlin type firmware.

    you can use it instead of Pronterface (it has a textbox for printer responses) and to print from the SD card IF the app works correctly for you.

     

     

     

    Edited by GregValiant
    • Like 1
    Link to post
    Share on other sites

    Posted · Default Acceleration Value

    Thank you, I plugged in some of those settings, and they look about right. That utility is a handy bit of software. Though unfortunately I cannot get the Accel and Jerk options to work as every time I try to load I get an error message below about Length must be greater than or equal to zero. But the Accel and Jerk tool in "Movement and Levelling" works fine.

     

    See the end of this message for details on invoking 
    just-in-time (JIT) debugging instead of this dialog box.
    
    ************** Exception Text **************
    System.ArgumentException: Argument 'Length' must be greater or equal to zero.
       at Microsoft.VisualBasic.Strings.Mid(String str, Int32 Start, Int32 Length)
       at EnderApp.PrinterSettings.CBLoadAccelJerk_Click(Object sender, EventArgs e)
       at System.Windows.Forms.Control.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ButtonBase.WndProc(Message& m)
       at System.Windows.Forms.Button.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    
    
    ************** Loaded Assemblies **************
    mscorlib
        Assembly Version: 4.0.0.0
        Win32 Version: 4.8.4390.0 built by: NET48REL1LAST_C
        CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
    ----------------------------------------
    Greg's Toolbox
        Assembly Version: 3.0.0.0
        Win32 Version: 3.0
        CodeBase: file:///C:/Users/stuar/AppData/Local/Apps/2.0/NNPPPYN7.5TP/E4PJDYKJ.H62/greg..tion_494a2a668a2f56ee_0003.0000_29fd9b5b313b57d4/Greg's%20Toolbox.exe
    ----------------------------------------
    Microsoft.VisualBasic
        Assembly Version: 10.0.0.0
        Win32 Version: 14.8.4161.0 built by: NET48REL1
        CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
    ----------------------------------------
    System.Windows.Forms
        Assembly Version: 4.0.0.0
        Win32 Version: 4.8.4390.0 built by: NET48REL1LAST_C
        CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    ----------------------------------------
    System
        Assembly Version: 4.0.0.0
        Win32 Version: 4.8.4360.0 built by: NET48REL1LAST_C
        CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    System.Drawing
        Assembly Version: 4.0.0.0
        Win32 Version: 4.8.4390.0 built by: NET48REL1LAST_C
        CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    System.Configuration
        Assembly Version: 4.0.0.0
        Win32 Version: 4.8.4341.0 built by: NET48REL1LAST_C
        CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
    ----------------------------------------
    System.Core
        Assembly Version: 4.0.0.0
        Win32 Version: 4.8.4390.0 built by: NET48REL1LAST_C
        CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
    ----------------------------------------
    System.Xml
        Assembly Version: 4.0.0.0
        Win32 Version: 4.8.4161.0 built by: NET48REL1
        CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------
    Accessibility
        Assembly Version: 4.0.0.0
        Win32 Version: 4.8.4161.0 built by: NET48REL1
        CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
    ----------------------------------------
    System.Runtime.Remoting
        Assembly Version: 4.0.0.0
        Win32 Version: 4.8.4161.0 built by: NET48REL1
        CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
    ----------------------------------------
    System.Management
        Assembly Version: 4.0.0.0
        Win32 Version: 4.8.4161.0 built by: NET48REL1
        CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Management/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Management.dll
    ----------------------------------------
    
    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.
    
    For example:
    
    <configuration>
        <system.windows.forms jitDebugging="true" />
    </configuration>
    
    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.

     

  • Link to post
    Share on other sites

    Posted · Default Acceleration Value

    Thanks for that.  You actually the first person to get back to me on whether there were any problems running it on other machines.

    I have a question in regards to where that error occurs...Does your printer use "Jerk" or "Junction Deviation"?

  • Link to post
    Share on other sites

    Posted · Default Acceleration Value

    Greg, apologies for the tardy response, I had an 18-hour print job running that I needed to finish before I could plug in the USB cable and interrogate the firmware.

     

    I had assumed with it being a new machine (Sunlu S9+) running Marlin 2.0.8.2 that it would have been set to the default "Junction Deviation" for that firmware version, but running M503 and looking at the M205 values, with their not being a deviation value I think its set to classic jerk, that's only an assumption so my M503 dump is below if you want to confirm that's correct.

     

    The firmware on this machine is a nightmare, Sunlu are literally taking the piss out of the open source licensing agreements for Marlin. I have asked multiple times for a copy of the configuration.h file and never got it, Sunlu keep "promising" to upload the code onto GitHub but never do it and that's for all their machines. And then I got reached out to by Sunlu's marketing / sales department, offering me a 75% discount code on a second S9+ in return for me revisiting a fair and honest review I posted online into a "positive review", firstly I refuse on moral grounds to doctor a fair review, and it would be a violation of professional ethical codes of conduct I have signed and secondly why should I buy a second machine when they haven't fixed the first one. When I buy a third printer, It's either going to be from a manufacturer whose name starts with a "U" or a "P"

     

    echo:  G21    ; Units in mm (mm)
    echo:; Filament settings: Disabled
    echo:  M200 S0 D1.75
    echo:; Steps per unit:
    echo: M92 X80.00 Y80.00 Z400.00 E95.88
    echo:; Maximum feedrates (units/s):
    echo:  M203 X500.00 Y500.00 Z10.00 E70.00
    echo:; Maximum Acceleration (units/s2):
    echo:  M201 X750.00 Y750.00 Z100.00 E1000.00
    echo:; Acceleration (units/s2): P<print_accel> R<retract_accel> T<travel_accel>
    echo:  M204 P500.00 R1000.00 T750.00
    echo:; Advanced: B<min_segment_time_us> S<min_feedrate> T<min_travel_feedrate> X<max_x_jerk> Y<max_y_jerk> Z<max_z_jerk> E<max_e_jerk>
    echo:  M205 B20000.00 S0.00 T0.00 X8.00 Y8.00 Z0.40 E5.00
    echo:; Home offset:
    echo:  M206 X0.00 Y0.00 Z0.00
    echo:; Auto Bed Leveling:
    echo:  M420 S0 Z10.00
    echo:  G29 W I0 J0 Z1.74250
    echo:  G29 W I1 J0 Z1.24500
    echo:  G29 W I2 J0 Z0.75500
    echo:  G29 W I3 J0 Z0.47750
    echo:  G29 W I0 J1 Z0.75250
    echo:  G29 W I1 J1 Z0.19750
    echo:  G29 W I2 J1 Z-0.14000
    echo:  G29 W I3 J1 Z-0.40000
    echo:  G29 W I0 J2 Z-0.12250
    echo:  G29 W I1 J2 Z-0.44250
    echo:  G29 W I2 J2 Z-0.97000
    echo:  G29 W I3 J2 Z-1.14250
    echo:  G29 W I0 J3 Z-1.00500
    echo:  G29 W I1 J3 Z-1.48250
    echo:  G29 W I2 J3 Z-1.78000
    echo:  G29 W I3 J3 Z-1.83750
    echo:; PID settings:
    echo:  M301 P24.29 I2.29 D64.47
    echo:; Power-Loss Recovery:
    echo:  M413 S1
    echo:; Z-Probe Offset (mm):
    echo:  M851 X-28.50 Y4.00 Z-2.60
    echo:; Filament load/unload lengths:
    echo:  M603 L0.00 U100.00
    echo:; Filament runout sensor:
    echo:  M412 S0 D6.00

     

    • Like 1
    Link to post
    Share on other sites

    Posted (edited) · Default Acceleration Value

    I came across a term in one of Sir Terry Pratchet's Discworld books regarding "women of negotiable affection".  I think it also applies to the business models of certain companies many of which are in east Asia.

     

    Now to the bug.  When you are a lazy, old, amateur hack and work late, you should never be surprised when you miss something.

    Your M503 response has the G29 lines and they include a "J" parameter.  That caused an error in my string parsing routine because I truncated the M205 string after searching for a "J" instead of before.

     

    That bug is fixed in the new link below.

    You don't need  to uninstall.  Running the Setup file will over-write the previous version.

    Greg's Toolbox

    When I loaded the program on my sons laptop it didn't display correctly.  Do the dialogs show all their controls on your computer?  

    Edited by GregValiant
    • Like 1
    Link to post
    Share on other sites

    Posted · Default Acceleration Value

    Only if you are referring to Sadie and Dotsie the "Agony Aunts"  🙂

    I worked Asian markets in technical purchasing for a very long time, Paul Midlers book "Poorly Made in China" ASIN B004G5Z2A8 was pretty much required reading for any newbies to that marketplace.

     

    The bug is fixed, and as far as I can see all the dialogue windows work, the installer though won't install over an existing installation as it says it's already installed, but works fine with an uninstallation.

     

    One thing I noticed and curiosity compels me to ask, there isn't any option to be able to upload a gcode file to the SD card, is that because of varying communication protocols between printers?

  • Link to post
    Share on other sites

    Posted · Default Acceleration Value

    The "Write to SD" command is M28 and it works on my Ender.  Uploading turns out to be as slow as molasses in January.  The button is actually still there on the Com page but I hid it because it's useless.  It takes about 2 seconds to copy a file to the SD using File Explorer and it takes about 2 hours to upload a small file.  I continue to play with the code once in a while trying to get it to perk up.  I think the problem is the processor in the printer coupled with the small buffer size of the USB port.  There is a bottleneck in there somewhere that really holds up the operation.

  • Link to post
    Share on other sites

    Posted · Default Acceleration Value

    I already looked at the  nuts and bolts of doing something similar, though I was coming at it from a different tack looking at using an inexpensive ESP32 board with a MicroSD breakout. The code to connect it on Wi-Fi and enable file transfers is  available for Arduino, the stumbling block has been that nobody seems to make a MicroSD card male connector to plug into the printer.  The other option is to replace the motherboard with a BigTreeTech SKR 3 series board as that has the sockets to plug in a ESP based Wi-Fi module to enable that functionality but that's a considerably larger cost,

     

    Its a shame the timing on the EzShare SD Modules was so bad, they came based on the much slower ESP8266 board just as the ESP32 was launching, they were aimed at the photographic community but a whole series of bad reviews over the poor file transfer speeds meant they didnt sell and and killed the concept pretty stone dead. 

  • Link to post
    Share on other sites

    Posted · Default Acceleration Value

    You can buy a "wifi enabled SD card" which is both an SD card and has wifi at the same time.  I put one in my DSLR camera.  You can have any computer with wifi read and write files to the SD card.

  • Link to post
    Share on other sites

    Posted · Default Acceleration Value

    Guessing that's a Toshiba FlashAir you have? Toshiba sold that division to Kioxia back in 2018 it's not EOL, but it is in their "legacy" list, so no new stock will be available and what stock is left is commanding an exorbitant premium.

     

    You are right and wrong about them, in a camera they work fine (Kioxia's main market share is memory for cameras) but they were limited to what file types they would handle for understandable security reasons as if misused being a perfect solution to jumping an air gap.

     

    There are still some available, but they are either rebrands of the EzShare boards based on the ESP8266 with incredibly slow transfer speeds, or expensive high-end ones for cameras that are file format restricted.

  • Link to post
    Share on other sites

    Posted · Default Acceleration Value

    Since we are talking about speed for a minute.

    FYI My transfer speed over the USB to write files to the SD card is ~46 lines/sec or 1.3kb/sec.  Those are pretty pathetic numbers.  A 1 million line gcode file would take around 6 hours to upload.  What really kills the deal is that there is no error checking.

    I'm researching sending binary data but I don't really expect a 100 fold increase in speed and I'm sure some firmware would not support M28 with the B1 parameter. 

    I like the app I wrote and the basic communicating it does over the USB works well.  Trying to stream something over the USB when configured as a Com port is just slow.

  • Link to post
    Share on other sites

    Posted · Default Acceleration Value

    That's a limitation in the Arduino based boards, most of them max out at 115200 baud on the serial line, in theory that's 14.0625 kbytes/s, but that is limited by about half the board's bus speed, in theory you could get the speed-up but not really in practise. You are better off offloading the transfer to some other hardware, which is why I researched the Wi-Fi enabled SD card adapters, but they turned out to be a technical dead end for the same reasons.

     

    Did some reading updating on past research I did on this subject, If you could find a male SD card connector that (preferably) came cabled, then the Raspberry Pi Zero 2 W would be the ideal bit of hardware, to build from, small, cheap and nimble with easily printed case designs.  It's just the adapter that's the issue.  It's a perfect opportunity though for someone who wants to have a sidehussle, get some 0.8 mm PCB's made to the right size with either header holes for right angle DuPont connectors or JST connectors from an online PCB manufacturer, if I had the design skills to sketch up a design I would have probably looked at getting a quote for them and seeing what the EOQ figures looked like.  

  • Link to post
    Share on other sites

    Posted · Default Acceleration Value

    And then those other companies we talked about would make them for 1/2 price with free shipping around the world.  It costs me $.50 just to mail a letter to a neighbor across the street.

  • Link to post
    Share on other sites

    Posted · Default Acceleration Value

    lol.  I do order fulfillment - I ship things around the world.  It's cheaper to ship something from china to the house across the street from me than for me to ship something to the house across the street from me.  This is definitely true for light weight packages under about 4 ounces (about $4 for me, <$1 for china) and still cheaper I think < 1 pound.  Not sure what it costs (for china) when you get above 1 lb but I suspect it's cheaper at all weights.

     

    My big advantage is speed.  Those <$1 shipping costs are for things that typically take 4-6 weeks to arrive in USA.  I can get a package within my zone for next day delivery for same price and across the country is 3 days worst case.

  • Link to post
    Share on other sites

    Posted (edited) · Default Acceleration Value

    Oh, you can guarantee it, I used to work purchasing in Far Eastern markets, it was always a running joke at trade conferences that there is no word in Mandarin for "intellectual property theft" 

     

    The only reason those low cost shipping prices exist is that you can use cheap labour to pick, pack and address them in China (N.B. not the only country involved), put the lot ready to mail in a container and use the 1874 Treaty of Berne to your advantage and through the UPU get the postal service in the arriving country to deliver them. I don't really like the situation, but with the way costs are spiralling in the UK, if It's something I need that I can afford to wait the 4-6 weeks for then I will, I know that sounds very mercenary but with my monthly direct debit for electricity jumping from £80 ($91.22) to £212 ($241.99)  I need to economize where I can.

     

    Edited by stuart264
  • Link to post
    Share on other sites

    Posted · Default Acceleration Value
    On 9/15/2022 at 9:00 AM, GregValiant said:

    I came across a term in one of Sir Terry Pratchet's Discworld books regarding "women of negotiable affection".  I think it also applies to the business models of certain companies many of which are in east Asia.

     

    Now to the bug.  When you are a lazy, old, amateur hack and work late, you should never be surprised when you miss something.

    Your M503 response has the G29 lines and they include a "J" parameter.  That caused an error in my string parsing routine because I truncated the M205 string after searching for a "J" instead of before.

     

    That bug is fixed in the new link below.

    You don't need  to uninstall.  Running the Setup file will over-write the previous version.

    Greg's Toolbox

    When I loaded the program on my sons laptop it didn't display correctly.  Do the dialogs show all their controls on your computer?  

    He is running jerk, as determined by the M205 line.
    ...
    echo:; Advanced: B<min_segment_time_us> S<min_feedrate> T<min_travel_feedrate> X<max_x_jerk> Y<max_y_jerk> Z<max_z_jerk> E<max_e_jerk> 
    echo: M205 B20000.00 S0.00 T0.00 X8.00 Y8.00 Z0.40 E5.00
    

     

    These other lines with the J in it is just a register for the Bed Mesh, using I and J as part of the array placeholders.
    ...
    echo:; Auto Bed Leveling:
    echo:  M420 S0 Z10.00
    echo:  G29 W I0 J0 Z1.74250
    echo:  G29 W I1 J0 Z1.24500

     

     

  • Link to post
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
    • Our picks

      • UltiMaker Cura 5.7 stable released
        Cura 5.7 is here and it brings a handy new workflow improvement when using Thingiverse and Cura together, as well as additional capabilities for Method series printers, and a powerful way of sharing print settings using new printer-agnostic project files! Read on to find out about all of these improvements and more. 
         
          • Like
        • 26 replies
      • S-Line Firmware 8.3.0 was released Nov. 20th on the "Latest" firmware branch.
        (Sorry, was out of office when this released)

        This update is for...
        All UltiMaker S series  
        New features
         
        Temperature status. During print preparation, the temperatures of the print cores and build plate will be shown on the display. This gives a better indication of the progress and remaining wait time. Save log files in paused state. It is now possible to save the printer's log files to USB if the currently active print job is paused. Previously, the Dump logs to USB option was only enabled if the printer was in idle state. Confirm print removal via Digital Factory. If the printer is connected to the Digital Factory, it is now possible to confirm the removal of a previous print job via the Digital Factory interface. This is useful in situations where the build plate is clear, but the operator forgot to select Confirm removal on the printer’s display. Visit this page for more information about this feature.
          • Like
        • 0 replies
    ×
    ×
    • Create New...