Brother TC-225 Retrofit and Robot integration

More
22 May 2021 13:31 #209838 by PCW
Note that P=1 is only problem because you have the encoder scale
or analog out scale backwards, so you get a runaway.
These need to be fixed to make orient work

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

More
22 May 2021 13:51 #209839 by timfaber
ah okay, got it now:
[SPINDLE_0]
P = 1
I = 0
D = 0
FF0 = 1
FF1 = 0
FF2 = 0
BIAS = 0
DEADBAND = 0.0001
MAX_OUTPUT = 6000
ENCODER_SCALE = 4096
OUTPUT_SCALE = -6000

output scale sign changed to minus and set p equal to one again

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

More
More
29 May 2021 12:05 - 29 May 2021 12:21 #210617 by timfaber
Yeah, found it some time later. That really helped.
Now for which route to choose:
1) write my own hal file to use spindle indexing
2) use LaserK3000's github.com/laserK3000/tc215Retrofit/blob...215/brotherTC215.hal , which is using machinekit and has a brother TC215 instead of a TC225
3) Use orient V2? forum.linuxcnc.org/10-advanced-configura...ent-revised?start=50

Now I'm kind of leaning towards writing it myself since that would mean i really understand what is going on. And i really only need to index for a toolchange. point 2 and 3 seem to be much more capable and complicated than i need. My spindle is a servo motor with a +-10V drive

Any advice would be appreciated!
Last edit: 29 May 2021 12:21 by timfaber. Reason: Added info

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

More
29 May 2021 15:19 #210629 by timfaber
So i went with option 1 :laugh:

I've got the orient working using the example Andy Pugh
Now for the homing of the spindle, it has a a, b and z signal so i should be able to home the spindle using that. or at least make sure M19 R0 always ends up in the same orientation. I think this should be doable only need to figure out how. And i also want to home x,y and z using the z pulse. Any pointers in the right direction are welcome!

I also ran into the problem that M5 doesn't directly brake the spindle, is there some way to remap M5 to do something like M19 R0 or S1 M3 and then S0 since the M3 forces the spindle to change rather rapidly.

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

More
29 May 2021 16:13 #210634 by tommylight

I also ran into the problem that M5 doesn't directly brake the spindle, is there some way to remap M5 to do something like M19 R0 or S1 M3 and then S0 since the M3 forces the spindle to change rather rapidly.

I am pretty sure that has to be set on the VFD, the deceleration slope or full brake if the VFD had braking resistor.

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

More
29 May 2021 17:13 - 29 May 2021 17:14 #210639 by timfaber

I also ran into the problem that M5 doesn't directly brake the spindle, is there some way to remap M5 to do something like M19 R0 or S1 M3 and then S0 since the M3 forces the spindle to change rather rapidly.

I am pretty sure that has to be set on the VFD, the deceleration slope or full brake if the VFD had braking resistor.

It's a servo drive(+-10V) not a vfd, i suppose it want to see 0V for 0 rpm but somehow m5 doesn't accomplish that but S1 M3 does, the rapid deceleration that is.
Last edit: 29 May 2021 17:14 by timfaber.

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

More
29 May 2021 19:17 #210644 by tommylight
Might be that M5 disables PWM altogether while S1 does not.
Should be easy to test, in hal set the spinena pin together with servo enable, it is separate on 7i77 (assuming using 7i77) and test with M5, it should bring it to a stop immediately.

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

More
30 May 2021 08:45 #210664 by timfaber
I've got a 7i97, but in principle you where right. I had pwm enabled on machine startup and now m5 stops the spindle in something like 0.2s. Only problem was that it drifted away, so used a time delay to disable the pwm enable it after 0.25s or so.

Now im working on getting the pid settings of the spindle right for indexing. Im using near to set spindle-is-oriented, with orient.position and orient.command. Since i can seem to get orient.is-oriented to work, while my poserr is smaller than tolerance.
The following user(s) said Thank You: tommylight

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

More
30 May 2021 18:45 #210717 by andypugh
I have "add spindle homing to LinuxCNC"on my to-do list. But I haven't done it yet.

Basically you need to set index-enable true, then rotate the spindle through index. That should be all that is required.

You can do the first step just by adding a "setp" command in the HAL file. The slightly more complicated part is ensuring that the spindle rotates through index (to reset the encoder counts) before the first orient command.

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

Moderators: cncbasher
Time to create page: 0.269 seconds
Powered by Kunena Forum