Sets G92 offset by a custom component
- alessandro torre
- Offline
- New Member
-
Less
More
- Posts: 16
- Thank you received: 0
30 May 2016 14:15 #75243
by alessandro torre
Sets G92 offset by a custom component was created by alessandro torre
Hello,
I'm trying to figure out how can I change the offsets of the A axis, changing a pin value. Is it possible?
In our setup we link the position of the A axis to the cartesian velocity of XY plane ( 3d printing).
In another configuration, the position of the A is linked to the atan(Vx/Vy), to have a knife oriented in tangential way respect the trajectory.
We switch between normal commanded ( where axis.3.motor-pos-cmd is the driver ) or custom commanded ( where our component is the driver ).
But when we switch from one driver to another one, the values of commanded position are differents so it happen the A axis is commanded to do a new movements due to the change of driver.
i thought to solve this issue wiht this procedures depending by the case:
- when we switch from axis.3.motor-pos-cmd
we can synchronize the position reciving the actual position by halui.axis.3.pos-relative
- when we switch from component to the axis.3.motor-pos-cmd (Es. ax...pos-cmd=80 and ourcomponent.A-pos=10000)
we can synchronize the position, commanding an offset by the component.
We can't write axis.3.motor-pos-cmd pin ( not writeable) and we can't command from the component a movement equal to difference because this will execute a not desidered movement, so i thought to set the g92 A offset ( #5214 ) the differences between the values.
How can I set the offset parameter by a component? There is a writeable input pin to set this offset?
Any idea to how to solve this issue?
Thank You in advance for any suggestions
I'm trying to figure out how can I change the offsets of the A axis, changing a pin value. Is it possible?
In our setup we link the position of the A axis to the cartesian velocity of XY plane ( 3d printing).
In another configuration, the position of the A is linked to the atan(Vx/Vy), to have a knife oriented in tangential way respect the trajectory.
We switch between normal commanded ( where axis.3.motor-pos-cmd is the driver ) or custom commanded ( where our component is the driver ).
But when we switch from one driver to another one, the values of commanded position are differents so it happen the A axis is commanded to do a new movements due to the change of driver.
i thought to solve this issue wiht this procedures depending by the case:
- when we switch from axis.3.motor-pos-cmd
we can synchronize the position reciving the actual position by halui.axis.3.pos-relative
- when we switch from component to the axis.3.motor-pos-cmd (Es. ax...pos-cmd=80 and ourcomponent.A-pos=10000)
we can synchronize the position, commanding an offset by the component.
We can't write axis.3.motor-pos-cmd pin ( not writeable) and we can't command from the component a movement equal to difference because this will execute a not desidered movement, so i thought to set the g92 A offset ( #5214 ) the differences between the values.
How can I set the offset parameter by a component? There is a writeable input pin to set this offset?
Any idea to how to solve this issue?
Thank You in advance for any suggestions
Please Log in or Create an account to join the conversation.
- Todd Zuercher
-
- Offline
- Platinum Member
-
Less
More
- Posts: 4976
- Thank you received: 1373
30 May 2016 20:05 #75261
by Todd Zuercher
Replied by Todd Zuercher on topic Sets G92 offset by a custom component
If I'm understanding what your trying to do there seems to be a few options. One would be to use an offset hal component between axis.3.motor-pos-cmd and your custom component.
linuxcnc.org/docs/html/man/man9/offset.9.html
Or an other might be to modify your custom component to have an offset pin built into it.
linuxcnc.org/docs/html/man/man9/offset.9.html
Or an other might be to modify your custom component to have an offset pin built into it.
Please Log in or Create an account to join the conversation.
- alessandro torre
- Offline
- New Member
-
Less
More
- Posts: 16
- Thank you received: 0
31 May 2016 11:47 #75280
by alessandro torre
Replied by alessandro torre on topic Sets G92 offset by a custom component
Thank you Todd for your suggestion, but it could be easier if I could understand in which way g92 works.
I think it could be better if i can keep the normal g92 asset to give an offset.
I don't understand what really happen in the hal, when I wrote "G92 A100" in the MDI. What is the component that performs the offset ? Can i read that offset by my custom component?If yes, how?
Which is the pin that commands the value of the A axis relative in the GUI gmocappy?
I'm confused because I don't understand the flux. I read a value in the GUI that i don't find in pins, except as a difference of halui pins, but they are not real time.
Thank you in advance
I think it could be better if i can keep the normal g92 asset to give an offset.
I don't understand what really happen in the hal, when I wrote "G92 A100" in the MDI. What is the component that performs the offset ? Can i read that offset by my custom component?If yes, how?
Which is the pin that commands the value of the A axis relative in the GUI gmocappy?
I'm confused because I don't understand the flux. I read a value in the GUI that i don't find in pins, except as a difference of halui pins, but they are not real time.
Thank you in advance
Please Log in or Create an account to join the conversation.
- Todd Zuercher
-
- Offline
- Platinum Member
-
Less
More
- Posts: 4976
- Thank you received: 1373
31 May 2016 12:36 #75285
by Todd Zuercher
Replied by Todd Zuercher on topic Sets G92 offset by a custom component
G92 is a function of the RS274 command interpreter, and I'm not sure what are the exact files that it resides in, but it is burred deep in the heart of the inner workings of Linuxcnc and does not go through HAL or is really exposed there. The only way I know of to set a G92 offset is by triggering a Halui MDI command, a command line MDI command, or from a G-code file, and the only one of those three available as a HAL pin is the Halui MDI pin.
That is why I was suggesting using other HAL based offset options rather than G92.
That is why I was suggesting using other HAL based offset options rather than G92.
Please Log in or Create an account to join the conversation.
- giantstone
- Offline
- Senior Member
-
Less
More
- Posts: 55
- Thank you received: 0
24 Aug 2016 06:14 #79350
by giantstone
Replied by giantstone on topic Sets G92 offset by a custom component
Hi Todd, how did you go?
I have a similar situation,
I have a 4 axis cnc machine X Y Z A , and I need to change the offset of the Z axis in realtime.
I made my decision to change the Z offset by a USB to PWM device (Ginkgo viewtool) coordinated with linuxcnc controls ( but not controled by linuxcnc).
and I'm figuring out how to make A axis tanget to X,Y trajectories.
could you teach me how you linked the position of the A axis to the cartesian velocity of XY plane?
the attachment is a standard 4 axis config file.
I have a similar situation,
I have a 4 axis cnc machine X Y Z A , and I need to change the offset of the Z axis in realtime.
I made my decision to change the Z offset by a USB to PWM device (Ginkgo viewtool) coordinated with linuxcnc controls ( but not controled by linuxcnc).
and I'm figuring out how to make A axis tanget to X,Y trajectories.
could you teach me how you linked the position of the A axis to the cartesian velocity of XY plane?
the attachment is a standard 4 axis config file.
Please Log in or Create an account to join the conversation.
Time to create page: 0.088 seconds