odd/nonexistant homing behavior

More
31 May 2017 15:48 #93894 by JR1050
In the works is a custom machine that uses a rspi3 with a 7i90hd via spi. It has one axis, it is a stepper on Y and an encoder to read angular position on a sprocket. Until the other day, the Y axis was X. A change was made so the encoder, for joint_0, could be used on the sprocket. The hal and ini files were updated to reflect the stepper axis as now Y.
Problem, the stepper axis now will not search for home(it worked flawlessly before) where it is when the machine is powered up, is home. Other then changing the joint numbers from zero to one , nothing has changed. In addition, lcnc will no longer load halui. Attached are my files, any suggestions? Thanks

File Attachment:

File Name: knights_20...5-31.hal
File Size:10 KB

File Attachment:

File Name: knights.ini
File Size:3 KB
Attachments:

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

More
31 May 2017 17:08 #93898 by tommylight
[TRAJ]


AXES = 2 <<<<<<<<<<<<change this to 1
COORDINATES = Y
HOME = 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
CYCLE_TIME = 0.001
MAX_LINEAR_VELOCITY = 10.

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

More
01 Jun 2017 13:37 - 01 Jun 2017 13:39 #93928 by JR1050
Changing the number of axis produced a "joint_1 not found" error. I think i need to explain this better.

joint_0 is solely used for the encoder input,a rotary encoder is belt driven by a shaft to report differences between positions of a sprocket by counting pulses. It does not home or enable an amp. It just counts from one 45deg space to another.

joint_1 is a stepper driven linear actuator.

using the encoder on joint_0 with the linear axis produced a following error, as it should, therefore, the linear axis was moved to joint_1(y) and the encoder was left on joint_0 , as it is the only encoder available with the bit file i have. The Y axis moves, it will not home.

I am using the Axis GUI, when the machine is powered and out of estop, the Y axis on the jog window is grayed out until i click on it, then a black dot appears on it. When the stepper driven axis(Y) was X, this was not the case.

Im stuck......
Last edit: 01 Jun 2017 13:39 by JR1050.

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

More
01 Jun 2017 14:10 #93936 by Todd Zuercher
I don't understand why you are defining an encoder that Linuxcnc is not controlling as an axis or joint?
You can still read the encoder and use it as an input. Just leave the Y axis as joint0 and only define one axis in the Traj section.
What do you intend to do with the feedback you get from the encoder?

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

More
01 Jun 2017 14:30 - 01 Jun 2017 14:38 #93940 by JR1050
This is not a metal cutting machine, it is a pallet loader.

The encoder is attached to a shaft that is run by a gearmotor via a VFD (it does not use an analog signal, it is commanded by fwd/rvs inputs), the gear motor has lash in it and will not position accurately, an encoder was added to get a accurate angular position. A shot pin device locks the shaft in place when it reaches its target position. It is controlled by Lcnc.

I consider the encoder similar to a mpg, it uses an axis input, much like i set my mpg's up. It works perfect.

My issue is now i cannot get the linear axis to home. I have had weird homing issues in the past, due to unexplainable hal/ini problems. This should work outta the box, this is an abnormal problem. Im good at finding them .......It acts as home search velocity is set to zero, instead of -3.0.
Last edit: 01 Jun 2017 14:38 by JR1050.

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

More
01 Jun 2017 14:49 #93943 by tommylight
Ok, then leave that at 2, but you have to also have settings for both axis/joints below in hal and ini, although you are not using them.

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

More
01 Jun 2017 14:50 - 01 Jun 2017 14:55 #93944 by Todd Zuercher
I still see no reason to need (or want) to define the encoder as an axis. Axis are outputs that are controlled by the motion planner. This is an input. Read the encoder and use the data, but don't define it as an axis or joint.

Even an output to control a motor position does not have to be defined as an axis. Such as a servo or stepper that turns a tool carousel can be given its position/velocity commands completely separately and not be defined as an axis or even a joint.

(You don't define an MPG as a joint or axis either.)
Last edit: 01 Jun 2017 14:55 by Todd Zuercher.

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

More
01 Jun 2017 15:43 #93952 by JR1050
The easiest way to use an encoder is to use an defined encoder input. An encoder input doesnt have to control an axis, it can simply be used as a counter. To use the the encoder, you have define the axis to get the input. Are there other ways to wire a encoder as a counter, yes. Easiest is to use one of the axis encoders and not define it as an axis, like an mpg. I dont think you under stand what i am doing.

The discussion over the use/implementation of the encoder/axis is irrelevant, it works. The issue is joint_1 will not home.


-

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

More
01 Jun 2017 15:47 #93953 by Todd Zuercher
Joint_1 will not home because of your non existent joint_0.

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

More
01 Jun 2017 16:08 #93961 by Todd Zuercher
You have to have a joint_0 before you can have a joint_1. Even if you are not using it there has to atleast be a blank entry for joint_0 in the ini before further joint numbers are valid.
I've ran into this setting up W axis with Linuxcnc v2.7 and earlier. For example with my XYZW machines I had to add these lines to the ini file.
[AXIS_3]
[AXIS_4]
[AXIS_5]
[AXIS_6]
[AXIS_7]

I am pretty sure in Master you will still need to have a simular {JOINT_0] with nothing under it for joint_1 to be completely valid. It would be simpler just to set up Y as joint_0. Nowhere in your hal or ini are you referring to your encoder input as joint_0 or axis X. Just because you have it connected to encoder input 00 doesn't make it have anything to do with joint_0 or the X axis.

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

Time to create page: 0.093 seconds
Powered by Kunena Forum