Jog problem

If you have a question about the software please ask it here.

Jog problem

Postby danut1234 » Mon Nov 21, 2022 12:59 pm

UC100.JogOnSpeed(1, true, 10); starts a jog movement at 10% of maximum speed. I cannot stop it with UC100.JogOff(1);
UC100.JogOn(1, true, true); starts a jog movement at maximum speed. i CAN stop it with UC100.JogOff(1);
UC100.JogOn(1, true, true); if i change the third parameter to false, it does nothing

What i am doing wrong?
danut1234
 
Posts: 20
Joined: Thu Aug 25, 2022 9:26 am

Re: Jog problem

Postby eabrust » Tue Nov 22, 2022 4:37 am

HI Danut1234,

Reference this code chunk from this post : http://www.forum.cncdrive.com/viewtopic.php?f=4&t=4053&p=28518&hilit=jogonspeed#p28518


if you start jog with UC100.JogOnSPeed(axis, direction, speed), just call it again with speed=0 to stop the axis:

Code: Select all
  UC100.JogOnSpeed(1, true, 0) ' stop axis


regards
Eric
CraftyCNC: Plugins for UCCNC (and other neat stuff): http://www.craftycnc.com/plugins-for-uccnc/
eabrust
 
Posts: 319
Joined: Fri Sep 16, 2016 2:32 am
Location: Near Shirland IL, USA

Re: Jog problem

Postby danut1234 » Tue Nov 22, 2022 6:23 am

Thank you, Eric, it works.
I have tried also StopWithDeccel(); but it does not work.
But what is the purpose of UC100.JogOff(axis); ?

Are you an employee of cncdrive.com? or just a hobbyist and developed software for their products?

Dan
danut1234
 
Posts: 20
Joined: Thu Aug 25, 2022 9:26 am

Re: Jog problem

Postby eabrust » Tue Nov 22, 2022 12:06 pm

Danut1234,

I believe JogOff(axis) is tied to JogOn(axis), and they are both setup to start and stop an axis movement with no real control of speed. Like if your using the xbox control to jog an axis by button press only, you would use JogOn on 'downpress', and JogOff (of same axis) on 'uppress' to start stop the axis. JogOnSpeed is more useful for turning the analog sticks into variable speed motion.

I'm not affiliated w/ CNCDrive in anyway, I've figured out most of the API by trial/testing/error for fun as part of my hobby :D .

regards
Eric
CraftyCNC: Plugins for UCCNC (and other neat stuff): http://www.craftycnc.com/plugins-for-uccnc/
eabrust
 
Posts: 319
Joined: Fri Sep 16, 2016 2:32 am
Location: Near Shirland IL, USA

Re: Jog problem

Postby danut1234 » Tue Nov 22, 2022 1:24 pm

Thank you Eric for all the replies, you help me a lot :)
danut1234
 
Posts: 20
Joined: Thu Aug 25, 2022 9:26 am

Re: Jog problem

Postby cncdrive » Wed Nov 23, 2022 3:30 pm

Jogon and jogoff are for manual digital jog with "buttons" and jogonspeed is as Eric said is to control the jog in an "analog" way, e.g. with a potmeter or with handwheel or analog joystick.
cncdrive
Site Admin
 
Posts: 4292
Joined: Tue Aug 12, 2014 11:17 pm

Re: Jog problem

Postby danut1234 » Thu Nov 24, 2022 9:36 am

Thank you.
danut1234
 
Posts: 20
Joined: Thu Aug 25, 2022 9:26 am


Return to Ask a question from support here

Who is online

Users browsing this forum: Google [Bot] and 14 guests