Moving an axis to a particular distance using hal command.

More
29 Feb 2024 12:28 #294767 by Aravind
Hi,

Problem: Need to move 4th axis to a certain distance (say 100mm) using hal command.

I am configuring a machine where I need to move my 4th axis to certain distance (say 100mm) and I am trying to do it on a particular sequence in my ladder logic.
When a particular switch is activated, I want my 4th axis to move to this distance and stop. I was thinking that it could be possible if I assign the distance value to the position command pin joint.3.motor-pos-cmd. But I was wrong in that. It was an output from LinuxCNC GUI (I hope so). I couldn't find any other input pin for assigning the position command.

Is there any option for moving an axis to a certain distance from hal command.?

Hardware: EC500_v5 with remora firmware.

I am a beginner to LinuxCNC. Kindly help me in this learning process.

Hope to get a response.

-Aravind. 
Attachments:

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

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
29 Feb 2024 13:20 #294771 by tommylight
Just a stab in the dark, but maybe using hal to monitor the pin then activating an MDI command that runs certain gcode to move the axis/joint?
PyVCP panel can run MDI by clicking on buttons on screen, so just making that button controllable by physical switch should be doable.

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

More
01 Mar 2024 09:36 #294827 by Aravind
Is there any other method in which I can move the axis to a particular distance from classicladder ladder logic.?

-Aravind

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

More
01 Mar 2024 12:33 #294836 by spumco
Does the movement need to occur in the middle of a running G-code program?

Is the distance to be moved always the same?

 

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

More
01 Mar 2024 12:48 #294838 by Aravind
[ISSUE SOLVED]

Added a section in INI file for MDI command.
[HALUI]
MDI_COMMAND = G1 F500 A0
MDI_COMMAND = G1 F500 A50

Now I got halui.mdi-command-00 under Pins > halui mdi_command-00 in HAL Configuration window which I could run by a true command. And I was able so net one output variable in classicladder to this pin and was able to move the axis for the required distance.

-Aravind.
The following user(s) said Thank You: tommylight

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

Time to create page: 0.062 seconds
Powered by Kunena Forum