MDI values not reflected in DROs
- Blackslacks
- 2 Star Member
- Posts: 87
- Joined: Mon Apr 16, 2018 10:16 pm
MDI values not reflected in DROs
Something I noticed after entering Gcode on the MDI page of Mach3 is that my dros do not show the values input. For example I zero the axis, enter and execute G1 x-3 y-5 the DROs read -2.9993 and -4.9996. If I repeat the same input again I'll get a different set of numbers but they are always a few ten thousands off. Why is this? Thanks in advance.
- djreiswig
- 4.5 Star Elite Contributing Member
- Posts: 1938
- Joined: Thu Nov 19, 2015 10:02 pm
- Location: SE Nebraska
Re: MDI values not reflected in DROs
Maybe the steps don't work out correctly to get the move to the exact ten thousand. Mach doesn't work in inches so much as it does in steps. If the inches aren't evenly divisible by the steps then it won't come out even.
Could also be the feedrate or motor settings causing it to not stop exactly.
Could also be the feedrate or motor settings causing it to not stop exactly.
2014 Bulltear (StarLab) 4x8
C&CNC EtherCut
Mach3, SheetCam, Draftsight
Hypertherm PM65
Oxy/Acetylene Flame Torch
Pneumatic Plate Marker, Ohmic, 10 inch Rotary Chuck (in progress)
C&CNC EtherCut
Mach3, SheetCam, Draftsight
Hypertherm PM65
Oxy/Acetylene Flame Torch
Pneumatic Plate Marker, Ohmic, 10 inch Rotary Chuck (in progress)
-
- 4.5 Star Elite Contributing Member
- Posts: 1816
- Joined: Mon Jun 12, 2017 6:43 pm
Re: MDI values not reflected in DROs
as posted below, how many steps per unit are you using for each axis, if they are not round numbers you won't get round numbers displayed
- Blackslacks
- 2 Star Member
- Posts: 87
- Joined: Mon Apr 16, 2018 10:16 pm
Re: MDI values not reflected in DROs
Ok thanks but what if I follow G1 x-3 y-5 with G92 x0 y0. That should zero the dros should it not? It does on the MDI but not when I enter it as a button script, which is my purpose for this. Its still a few 10thou off.
- djreiswig
- 4.5 Star Elite Contributing Member
- Posts: 1938
- Joined: Thu Nov 19, 2015 10:02 pm
- Location: SE Nebraska
Re: MDI values not reflected in DROs
Put a while ismoving loop after your move. It's trying to zero the dro before it is done with the move. I ran into the same thing before.
2014 Bulltear (StarLab) 4x8
C&CNC EtherCut
Mach3, SheetCam, Draftsight
Hypertherm PM65
Oxy/Acetylene Flame Torch
Pneumatic Plate Marker, Ohmic, 10 inch Rotary Chuck (in progress)
C&CNC EtherCut
Mach3, SheetCam, Draftsight
Hypertherm PM65
Oxy/Acetylene Flame Torch
Pneumatic Plate Marker, Ohmic, 10 inch Rotary Chuck (in progress)
-
- 4.5 Star Elite Contributing Member
- Posts: 1816
- Joined: Mon Jun 12, 2017 6:43 pm
Re: MDI values not reflected in DROs
as said in the previous post, you need to give the code time to finish before the next line especially if you are trying to do something (like set a temporary offset)
- Blackslacks
- 2 Star Member
- Posts: 87
- Joined: Mon Apr 16, 2018 10:16 pm
Re: MDI values not reflected in DROs
Thanx all.I rounded off my steps and my button seems to be working now.
Can someone please elaborate on the "while is moving loop"? I'm unfamiliar with it and may come in handy in the future. How is it done?
Can someone please elaborate on the "while is moving loop"? I'm unfamiliar with it and may come in handy in the future. How is it done?
- djreiswig
- 4.5 Star Elite Contributing Member
- Posts: 1938
- Joined: Thu Nov 19, 2015 10:02 pm
- Location: SE Nebraska
Re: MDI values not reflected in DROs
Put this between the two lines of code
While (IsMoving())
'Sleep, so other threads can run while we’re waiting
Sleep(100)
Wend
You can experiment with the 100. It's time in milliseconds. I have gone down to 1.
It loops while the axis is moving, and when the move is complete it goes to the next line.
While (IsMoving())
'Sleep, so other threads can run while we’re waiting
Sleep(100)
Wend
You can experiment with the 100. It's time in milliseconds. I have gone down to 1.
It loops while the axis is moving, and when the move is complete it goes to the next line.
2014 Bulltear (StarLab) 4x8
C&CNC EtherCut
Mach3, SheetCam, Draftsight
Hypertherm PM65
Oxy/Acetylene Flame Torch
Pneumatic Plate Marker, Ohmic, 10 inch Rotary Chuck (in progress)
C&CNC EtherCut
Mach3, SheetCam, Draftsight
Hypertherm PM65
Oxy/Acetylene Flame Torch
Pneumatic Plate Marker, Ohmic, 10 inch Rotary Chuck (in progress)