Proper timing in .ini and .hal

More
05 Oct 2020 19:29 #184997 by Mokuleia
Hi everyone,

I am new to the forum, to CNC and Linux so please excuse if my questions are a little too generic. I am currently building a XYYZ CNC machine (PrintNC to be exact) and I am running in some issues with establishing the proper timing values to be added in .ini and .hal. These files (both attached) were essentially provided to the PrintNC community by its founder, but few of us (mostly newbies) are still struggling with using them and getting our machines running.

Issue with .hal: for my motors to run, I found that I need to comment out (hash) all "setp parport.0.pin-0X-out-reset 1". Changing timing on "setp parport.0.reset-time" from 5000 to 6000 or 4000 did not help. Changing the port setting from PS/2 to EPP also did not help. For reference, the setp stepgen.X.Y values (1, 1, 27500, 27500) I am using come from the setup wizard I ran on a dummy test just to get these numbers. Could you please tell me what these "reset" command lines are about and how to get them to work properly?

issue with .ini: for some reasons, the base period and servo period values (100,000 and 1,000,000) provided by the wizard appear to be independent of timing values I entered during the test setup. Are these supposed to be just conservative values? Does LCNC rely instead on the more precise stepgen values entered in the .hal used instead ?

Thanks for your time.
Attachments:

Please Log in or Create an account to join the conversation.

More
06 Oct 2020 13:33 #185070 by BeagleBrainz
Info about the parallel port driver
linuxcnc.org/docs/2.8/html/hal/parallel-port.html

Read it a few times, might take a while to digest. Don't worry.

Please Log in or Create an account to join the conversation.

More
06 Oct 2020 14:38 #185078 by cmorley
reset allows one step per thread cycle - normally said to be 'double step.
This allows higher full speed.
'
IIRC - The wizard calculates the best thread timing based on latency test and step timing.

Please Log in or Create an account to join the conversation.

More
06 Oct 2020 14:38 #185079 by tommylight
Does the machine work ?

Please Log in or Create an account to join the conversation.

More
06 Oct 2020 14:43 #185081 by cmorley
again IIRC reset time is the time in nanoseconds between setting the step pin high and resetting back low.
If the time is too short the step driver might not catch the step signal transition.

Please Log in or Create an account to join the conversation.

More
06 Oct 2020 15:18 - 06 Oct 2020 15:28 #185085 by Mokuleia
Thanks for the replies guys.

To answer tommyligth, the machines does work but only if I uncomment those "reset-time" lines, so my guess I that I am disabling the doublefreq function.

Thanks for pointing me to the parallel port page. I did read it once but probably need to do it a couple more times ;-) I did find on that page that stepspace must be = 0, which was not the case in the .hal file I post yesterday (it had stepspace=1). Changing the value from 1 to 0 did not help unfortunately.

Note that this stepspace value (1) was provided through my test using wizard. Does it mean that I just can't use doublefreq at all? As an alternative I could leave stepspace to 0 and increase reset time beyond 5000 until the machine works, but I guess too high of a reset time (>10,000, that is 5,000 x2) values may defeat the purpose of double freq...
Last edit: 06 Oct 2020 15:28 by Mokuleia.

Please Log in or Create an account to join the conversation.

More
06 Oct 2020 16:39 #185097 by tommylight
Now i will assume you are using a BOB, and one with very slow opto-couplers, so set the reset time to 8000 or 10000.
Again, that is not important, if it works without those lines, it works, so do not worry about it and make some chips ! :)

Please Log in or Create an account to join the conversation.

Time to create page: 0.121 seconds
Powered by Kunena Forum