Home › Forums › TinyG › TinyG Support › cant make tinyg2 jogging or doing anything on due
- This topic has 10 replies, 2 voices, and was last updated 9 years, 6 months ago by cmcgrath5035.
-
AuthorPosts
-
April 13, 2015 at 9:49 am #7620qtfpMember
Hello,
I am finally flashing to due properly(). I don’t want to use any shield board. Now I connect to pin 2,5(step pulse/dir 1) and ground to logic analyzer and use chilipeppr to send command and observe. I am pretty sure I connect to the board by chilipeppr “serial-port-json-server”. I try to jog or send gcode like “G0 X39.2659”. They dont pulsing or did anything on the chilipeppr. X,Y,Z were always 0,0,0. Is there anything I need to do?
My computer is win7x64chrome.April 13, 2015 at 4:52 pm #7621cmcgrath5035ModeratorWhat build number of tinyG2 are you flashing?
You built with Platform=”gShield” and default settings?If tinyG2 and Chilipepper connect correctly, you should not need the Logic Analyzer, but of course it should work.
Any jogging commands or G code entered into the Serial Port Console command window should result in movement in the 3D display and XYZ readout in the AXES widget.A quick way to verify that you are connected is to issue a ‘?’ command (position report reques)’ or a $ command (short parameter list) in the Serial Port console and see an appropriate response.
Are you sure you have m1 mapped to the X Avis?
If you built with Platform=gShield, then DUE pin 2 is m1step and DUE pin , which is what you are monitoring.5 is m1dirApril 14, 2015 at 4:04 pm #7624qtfpMemberHello,
I finally got it worked. After install the win7 driver and plug into the native port, I can pulse into XYZA. I am trying things now.
There are something weird:1. If push jog too much, the console will show{“qr”:””} and then there will be no response anymore. This happen a lot..
2. I try to change PWM frequency( {p1frq:1000} ), but it still get 100Hz in Logic Analyzer. When “M5”, I still see pulsing.
3. In the “4” axis (A), if I set axis mode to radius, I really dont know what it means in widget(mm) For ex: when radius setting=1mm, “G0 A1” get A=57.296mm. Sorry, I dont get the idea.
4.There are lots of step motor driver can divide into like 20,128,256… rather than 2,4,8,16. For ex, mine is 20,so I set {“1”:{“ma”:0,”pm”:2,”po”:0,”tr”:4,”mi”:20,”sa”:1.8}} . Then I observe that when I “G0 X4”, the pulses counts 4001. and then “G0 X0”, the pulses counts 4001. One step more..
It is really amazing about tinyG2. For now, many people use mach3 to build their own CNC(I mean hard metal,precise CNC), I believe tinyG2 can replace it in the future. You got all the feature right:) I knew many people try to build 5 axis milling machine, Tinyg2 will be good candidate.
April 14, 2015 at 4:51 pm #7626qtfpMemberAlso, I want to see the “B” “C” axis. So, {“sr”:{“line”:true,”posx”:true, “posy”:true,”posz”:true,”posa”:true,”posb”:true,”posc”:true, “vel”:true, “unit”:true, “stat”:true, “feed”:true, “coor”:true, “momo”:true, “plan”:true, “path”:true, “gc”:true, “dist”:true}}. And the G2 will suspend… Can you tell me how to avoid suspend and get the position of B,C? Thanks!
“?” can only show
X position: 0.000 mm
Y position: 0.000 mm
Z position: 0.000 mm
A position: 0.000 deg- This reply was modified 9 years, 7 months ago by qtfp.
April 15, 2015 at 8:44 am #7628cmcgrath5035ModeratorFollowing your numbered comments/questions:
1. Jog “a lot”. As in many clicks, or long distance?2. PWM Frequency requires a tinyG reset to take effect, so you cannot change PWM Frequency from active session, because the default parameters reload with reset.
Solution is to recompile with the PWM parameters you want on bootup.
You did not say if you are building Master or Edge, so you will have to fill in the blanks here:
A. navigate in the github area on your machine to the ../TinyG2/settings/ directory
B. Copy the settings_name h file you specify in the build process to a new file. For example, copy settings_default.h to settings_qtfp.h.
C. Open settings_qtfb.h and edit the PWM parameters to your liking. To do this you will need to add some #defines to the basic file as they do not exist in the base settings_default.h file. Have a look at my exampleAround line 218 you will see a block I inserted.
Pick your values. Also, set #define P1_PWM_PHASE_OFF 0.000
by default it is 0.1, which is why it still pulses after M05
D. Recompile tinyG2, specifying your personalized settings file, settings_qtfp.h3.What are your settings for m4? If M4 is attached to Axis, $m4tr should be $m4tr=360 and G0 A1 should result in 1/360 revolution. Are the all the $m4 parameters consistent with a rotational axis? That will depend on what settings file you chose at compile.
4. AFAIK, tinyG2 only supports 2,4,8,16 or 32 microsteps per step. It is my understanding (not actual experience) that steps per revolution (200, 400, etc) are a motor property but microsteps per step are a property of the DRIVER device. Try ms=16 or32 to see if you get sane results.
5. B and C position – you are blazing new territory here. Your redefinition of the status report looks correct. It could well be Chilipeppr issue, I don’t believe the CP widgets are instrumented for B and C parameters.
A. Are the B and C axes enabled?
B. Are motors assigned to B and C?
C. Are the motor parameters assigned to B and C consistent?
D. If yes, try a simple move from the Serial Port Console, e.g. G0 B1 then read back the position from the Serial Port Console with $posb to see if it movedFYI, I am not sure what you mean by “tinyG2 suspend”. TinyG2 hangs (requires reset)? Are you sure it is tinyG2 and not CP?
April 15, 2015 at 1:18 pm #7631qtfpMember1.Just hold one arrow(like left arrow) on the keyboard, and in the console:
G91 G0 X0.5
G90
…….
…….
G91 G0 X0.5
G90
!
%{“qr”:””}
!
%{“qr”:””}
{“qr”:””}Then I cant control it anymore.
2.This is a little complicated, I may do in the future. Still, I learn your design 🙂
3.How to attach m4 to axis A? I want to attach m4:A m5:B m6:C THX
This is what I do:
{“1”:{“ma”:0,”pm”:1,”po”:0,”tr”:4,”mi”:20,”sa”:1.8}}
{“2”:{“ma”:1,”pm”:1,”po”:0,”tr”:4,”mi”:20,”sa”:1.8}}
{“3”:{“ma”:2,”pm”:1,”po”:0,”tr”:4,”mi”:20,”sa”:1.8}}
{“4”:{“ma”:3,”pm”:1,”po”:0,”tr”:360,”mi”:20,”sa”:1.8}}
{“5”:{“ma”:4,”pm”:1,”po”:0,”tr”:360,”mi”:20,”sa”:1.8}}
{“6”:{“ma”:5,”pm”:1,”po”:0,”tr”:360,”mi”:20,”sa”:1.8}}
Also I tried “$m4tr” and get “tinyg [mm] err: Unrecognized command or config name: $m4tr”
“tinyg [mm] err: Unrecognized command or config name: $m4”
I succeed compiling once, but I still use the file here:
http://synthetos.github.io/g2/4.When I used microstep=20, it still work. Is there any thing I should worry if I use 20? For my ballscrew, the pitch 4mm/round, so for 20micro*200step=4000, one pulse will be 1um, other like 16,32 will not get divisible in um.
5.
A.How to enable “B” and “C”?
B.does this command do the job?
{“5”:{“ma”:4,”pm”:1,”po”:0,”tr”:360,”mi”:20,”sa”:1.8}}
{“6”:{“ma”:5,”pm”:1,”po”:0,”tr”:360,”mi”:20,”sa”:1.8}}
C. I used the command in B.
D.I find I am using 0.78… I will edit this later
April 15, 2015 at 1:48 pm #7632qtfpMember5.D.
G0 B1
$posb
{“ej”:””}
B position: 288.000 deg
tinyg [mm] ok>I believe its tinyg2 hangs. I restart CP and serial-port-json-server, still get no response from console. After restar tinyg2, then I can control again.
I restart tinyg2 a lot..
Thanks for the reply in very detail 🙂April 15, 2015 at 11:26 pm #7633cmcgrath5035Moderatorqtfp
I am very confused here. I am focused on your Response to 1.), the jogging issue.What confuses me is that the jogging action (holding down the arrow key) shows repeated relative moves of 0.5 in the X direction.
When you release the key, a ‘freehold command’ (!), then a queue flush command (%). All this is normal EXCEPT the size of the move.
Have you set a custom jog increment of 0.5?2.) OK, we’ll pass on this for a bit.
3.) The proper command is $4tr, not $m4tr. etc. Review the command structures here:4.) No, you cannot make up your own microstepping rules, they are defined by the internals of the stepper driver devices. The only legitimate values are 1,2,4,8,16 and 32 for the 8825 drivers that are assumed for tinyG2.
If you have a 4mm/rev ballscrew and the stepper directly drives the threaded rod, then for motor 1:
$1tr=4mm
$1sa=1.8 (which is 360/200)
$1mi=16 (choose from 1,2,4,8,16,32)
tinyG2 calculates the movement per microstep and keeps track of the math.
If you really want to understand how microstepping works, look hereWarning, it is not an easy read.
5.) In general your JSON scripts for setting parameters look OK, but they look OK for a tinyG, not tinyG2. There are many more settings in the tinyG2 setup. Here is a parameter set for build 71.04, just as an example:
BUT, parameters are added from time to time, so you really need a full parameter list for your build, which I think is 78.02.
To get the full parameter list, you enter $$ in the Serial Port Console.
If you are using Chilipepper, you can also create a parameter backup using the procedure described here:The archive procedure will download the parameter list to your PC.
You are seeing (rotational) movement in the B axis, but too much; you commanded a 1 degree move and got 288 degrees.
For now, I’ll assume this is due to your use of $4mi=20.
Retry with a vaild mnicrostepping value.April 16, 2015 at 1:25 pm #7635qtfpMember1.In that test, I did set 0.5 for jogging, but even in default setting, it’s still the same hang.
4.Actually, I want to use LV8727 by due board. It provide 20 microstep. I just want to know if tinyg2 can use 20 microstep.
http://www.onsemi.com/pub/Collateral/ANDLV8727-D.PDF
5. I will try more and post results
Right now I don’t even have any hardware axis, I just connect to logic analyzer to test it quickly. I use stepper driver for many application. I also build simple code to use optical encoder to loop back actual position to the stepper and compensate.
Thanks for your efforts
So you are still heavily progress tinyg2, right?
This is one promising project!!April 16, 2015 at 7:52 pm #7639cmcgrath5035Moderatorqtfp
I am just a user, not Synthetos.
I learn from good user questions like yours.So now we understand why jogging was 0.5, that is good.
If you study the data sheets for the 8825 stepper driver and the LV8727 stepper driver, I think you will see the significant differences.
tinyG2 does not know how to program the LV8727.Just for experimentation purposes, try to run with a known valid microstepping setting, such as 16 or 32.
Does tinyG2 still hang?April 24, 2015 at 8:28 am #7659cmcgrath5035Moderatorqtfp
Give this section of the updated G2 wiki a readI believe it says if you want to use , say, 20 microsteps per step, tinyG will do step distance computation correctly, but you will have to manually set the right 3 bit code to tell the LV8727 what you want (or modify the code that drives the mi0-mi2 pins).
I would suggest you try to achieve some manner of movement sanity with 8 or 16 microsteps, likely ‘non-standard’ values don’t get as much testing.
-
AuthorPosts
- You must be logged in to reply to this topic.