Divide Axis coordinate
- MarcoGaspar
- Offline
- Premium Member
Less
More
- Posts: 90
- Thank you received: 2
15 Mar 2017 11:38 #89657
by MarcoGaspar
Divide Axis coordinate was created by MarcoGaspar
Hello,
It's possible and how to add one button to Divide the coordinates of axis?
Best Regards,
Marco Gaspar
It's possible and how to add one button to Divide the coordinates of axis?
Best Regards,
Marco Gaspar
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1441
15 Mar 2017 13:02 #89659
by Todd Zuercher
Replied by Todd Zuercher on topic Divide Axis coordinate
Probably.
What do you mean by "Divide"?
What exactly do you want?
Do you just want to take the number shown in the DRO and divide it by another number?
What will the divisor be? Will it always be the same or will it be a variable?
What do you want to do with the product?
What do you mean by "Divide"?
What exactly do you want?
Do you just want to take the number shown in the DRO and divide it by another number?
What will the divisor be? Will it always be the same or will it be a variable?
What do you want to do with the product?
Please Log in or Create an account to join the conversation.
- MarcoGaspar
- Offline
- Premium Member
Less
More
- Posts: 90
- Thank you received: 2
15 Mar 2017 13:28 #89660
by MarcoGaspar
Replied by MarcoGaspar on topic Divide Axis coordinate
i want to take the number shown in the DRO and divide it by 2 (to center a workpice)
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1441
15 Mar 2017 13:52 #89661
by Todd Zuercher
Replied by Todd Zuercher on topic Divide Axis coordinate
Are you also going to want to command the axis to move to that point, or do you just want the number for calculating purposes?
Please Log in or Create an account to join the conversation.
- MarcoGaspar
- Offline
- Premium Member
Less
More
- Posts: 90
- Thank you received: 2
15 Mar 2017 14:00 #89662
by MarcoGaspar
Replied by MarcoGaspar on topic Divide Axis coordinate
i just want for calculate
I just want to make 0 on one side of the workpiece and on the other side i want to divide the value by half to set the X0 Y0 to the middle of the pice.
I just want to make 0 on one side of the workpiece and on the other side i want to divide the value by half to set the X0 Y0 to the middle of the pice.
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1441
15 Mar 2017 14:50 #89666
by Todd Zuercher
Replied by Todd Zuercher on topic Divide Axis coordinate
I think you could create a button (with GladeVCP or PYVCP) that could do this but it seems a lot of trouble.
If all you want is the number spit out it will take 2 lines of MDI code, so you will need to make a sub program that the VCP button calls with its MDI command. If you would like the button to move the axis to that half way point, it is actually a little simpler as one line of MDI code can do the job and you wouldn't need the sub program(s). You would have to set up a different button for each axis you want to do this with.
Any way, the MDI commands to just spit out the numbers would be, 1st to create a parameter variable and set it equal to the value you are after. And the 2nd one prints it out. First you would jog to the left edge of your piece, touch off that axis, jog to the other edge, then issue these two commands. (or press your button once that is configured).
To just move to the mid point the line of code would be.
The parameter numbers for the other relative axis potions are #5421=Y, #5422=Z, #5423=A...
If all you want is the number spit out it will take 2 lines of MDI code, so you will need to make a sub program that the VCP button calls with its MDI command. If you would like the button to move the axis to that half way point, it is actually a little simpler as one line of MDI code can do the job and you wouldn't need the sub program(s). You would have to set up a different button for each axis you want to do this with.
Any way, the MDI commands to just spit out the numbers would be, 1st to create a parameter variable and set it equal to the value you are after. And the 2nd one prints it out. First you would jog to the left edge of your piece, touch off that axis, jog to the other edge, then issue these two commands. (or press your button once that is configured).
#<half x.>=[#5420/2]
(debug, #<half x>)
To just move to the mid point the line of code would be.
G0 X[#5420/2]
The parameter numbers for the other relative axis potions are #5421=Y, #5422=Z, #5423=A...
Please Log in or Create an account to join the conversation.
- MarcoGaspar
- Offline
- Premium Member
Less
More
- Posts: 90
- Thank you received: 2
15 Mar 2017 14:59 #89668
by MarcoGaspar
Replied by MarcoGaspar on topic Divide Axis coordinate
Thanks
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1441
15 Mar 2017 16:13 - 15 Mar 2017 16:14 #89675
by Todd Zuercher
Replied by Todd Zuercher on topic Divide Axis coordinate
Maybe this line might be more useful, It would automatically change the touch off point to the mid point in one MDI command, without any movement of the machine.
First touch of the left edge (G54), then jog to the right edge, then issue this command, and the mid point will be set as the new G54 X0.
First touch of the left edge (G54), then jog to the right edge, then issue this command, and the mid point will be set as the new G54 X0.
G10 L20 P1 X[#5420/2]
Last edit: 15 Mar 2017 16:14 by Todd Zuercher.
The following user(s) said Thank You: MarcoGaspar
Please Log in or Create an account to join the conversation.
16 Mar 2017 18:48 #89765
by andypugh
If you are using the Axis interface and the Touch-off box then you can simply enter an arithmetic expression in the touch-off dialog.
Replied by andypugh on topic Divide Axis coordinate
i want to take the number shown in the DRO and divide it by 2 (to center a workpice)
If you are using the Axis interface and the Touch-off box then you can simply enter an arithmetic expression in the touch-off dialog.
Please Log in or Create an account to join the conversation.
26 Feb 2018 20:33 - 26 Feb 2018 20:52 #106560
by billykid
Replied by billykid on topic Divide Axis coordinate
I'm trying this function but I can not ... it seems to me to be # 5221 the g54 for x not 5420. however it does not divide me in half but does a random number.
thanks
Mauro
excuse me it was right 5420 works perfectly
thanks
Mauro
excuse me it was right 5420 works perfectly
Last edit: 26 Feb 2018 20:52 by billykid. Reason: solved
Please Log in or Create an account to join the conversation.
Time to create page: 0.115 seconds