jogging after homing

More
10 Sep 2024 10:51 #309828 by Abdulkareem
jogging after homing was created by Abdulkareem
I have an issue while creating a custom Qtvcp GUI where if i jog the axes after homing all axes all the jogging buttons the move the x axis only but if the machine isnt homed everything works just fine i use action buttons here is a screenshot of my GUI and my handler file any help would be appreciatedĀ 
Attachments:

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

More
10 Sep 2024 12:39 #309837 by andypugh
Replied by andypugh on topic jogging after homing
Before homing you are jogging "joints" (0 , 1, 2,...)
After homing you are jogging axes (x, y, z, ....) , which run through the kinematics module, to calculate joint positions.
For a cartesian setup this distinction might seem pointless, but it save ambiguity in a lot of parts of the code.

Your jogging setup might be more convoluted than necessary.
If you _must_ use GUI buttons for jogging (hardware buttons are more reliable) then I would suggest using HAL buttons (ie, GUI elements that toggle a HAL pin) then wiring those HAL pins to the HAL jog inputs that operate independently of the GUI code.
The absolute most reliable way to jog is using MPGs that send counts to the "motion" module jog-counts pins. That is realtime all the way.
But if you want increment/continuous jogging from a button then you can use the "halui" pins.


The reason that I dislike keyboard jogging (which you are emulating, in some ways) is that it is possible for the GUI to miss the "key-up" event, and then the axis doesn't stop when you release the key.

Anyway, if using the halui inputs the answer to your original question is to wire the input to both joint and axis.

pseudo-code (I haven't checked what the actual GUI putput pin would be called)
net jog-x-plus qtvcp.pin.xplus
net jog-x-plus halui.joint.0.plus  halui.axis.x.plus
The following user(s) said Thank You: Abdulkareem

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

More
10 Sep 2024 13:00 #309841 by cmorley
Replied by cmorley on topic jogging after homing
on the action button did you set both properties 'joint_number' and 'axis_letter'?
The following user(s) said Thank You: Abdulkareem

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

Moderators: cmorley
Time to create page: 0.056 seconds
Powered by Kunena Forum