Re: [Machinekit] Re: how to add toolchanger funtion to BBB with Xylotex cape

2018-03-05 Thread Aurelien
Hello

very usefull information for change variable to pin and move, this make a 
big difference for debugging !!

I no have Axis gui at all, i work with Cetus and Cetus don't show any 
rtapi_print_msg.


Also thanks for position_cmd and break before i'm very unsure about that !

i'm thinking from choose the best way enhance your code vs rewrite from 
scratch with your code.


Best regards

-- 
website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
https://github.com/machinekit
--- 
You received this message because you are subscribed to the Google Groups 
"Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to machinekit+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.


Re: [Machinekit] Re: how to add toolchanger funtion to BBB with Xylotex cape

2018-03-04 Thread Aurelien
Hi

Thanks i have now undo some change for ishomed and i have see work fine.

The commented parts i uncommented now, but it's same for function i try to 
add, i have moved one parts of your code to a case 4 but i'm not sure if i 
need to break or not at the end.


The most problem for now is to found a way for debuging, i ho have GUI so i 
use only SSHand this one never displayed this type of message try DEBUG= 1 
to 10 without success


rtapi_print_msg(RTAPI_MSG_ERR,"Error state in toolchanger - 
now disabled - unload toolchanger5\n");  


i think i understand bad how to work position_cmd position_req position_acum


Best regards

-- 
website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
https://github.com/machinekit
--- 
You received this message because you are subscribed to the Google Groups 
"Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to machinekit+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.


toolchanger.comp
Description: Binary data


Re: [Machinekit] Re: how to add toolchanger funtion to BBB with Xylotex cape

2018-03-04 Thread 'schoone...@btinternet.com' via Machinekit


On 03/03/18 16:17, Aurelien wrote:

Many thanks for reply

yes this is your code but modified by Mike Ross for 6 tool turret

For the Axis i have set as you says LINEAR and with trial and error 
have found the good SCALE for turn 360° exactly



i don't understand "You simply home axis A" because with this this 
component this is impossible without following error from classic setting,


You just set the homing values to 0, then A will show as homed with no 
movement.

(read www.machinekit.io/docs/config/ini_homing/)

If you have connected up properly, when homed the relevant pin will be 
true and allow the M6TN command without movement to initialise.


also impossible to move the motor by GUI. (hijack stepgen) (i think 
you know that lol)


It is not impossible, just load a config without the toolchanger 
component and A connected as normal to work out moves required



There is so much commented out in your component, including the tool 
number setting on homing provision, I am not going to get into
trouble shooting something that seriously diverges from the component I 
wrote.


I would get the original component working by reducing the tool numbers 
to 6 and changing the angles / steps between stations accordingly.


Even if you managed to get the ATC seeking the home switch, you have to 
update machinekit with the current tool number.


The method my component uses is simple, because it sets the number via 
M6, whilst not attempting to process the command.


It could be adapted to rotate the ATC until the home switch is triggered 
when A is homed, then trigger a halui MDI command to set the tool number.


What you need to be wary of is un-commanded movement and whether it will 
always be safe or if it is possible to foul a workpiece
or injure the operator when the ATC suddenly starts rotating during a 
homing procedure.



--
website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
https://github.com/machinekit
--- 
You received this message because you are subscribed to the Google Groups "Machinekit" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to machinekit+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.


Re: [Machinekit] Re: how to add toolchanger funtion to BBB with Xylotex cape

2018-03-03 Thread Aurelien
i think i have improved my first attemps now but not work fine for now ^^


i'm really short with coding so if you have any suggest for remove some 
mistake.

Best regards

-- 
website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
https://github.com/machinekit
--- 
You received this message because you are subscribed to the Google Groups 
"Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to machinekit+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.


toolchanger.comp
Description: Binary data


Re: [Machinekit] Re: how to add toolchanger funtion to BBB with Xylotex cape

2018-03-03 Thread Aurelien
Many thanks for reply

yes this is your code but modified by Mike Ross for 6 tool turret

For the Axis i have set as you says LINEAR and with trial and error have 
found the good SCALE for turn 360° exactly 


i don't understand "You simply home axis A" because with this this 
component this is impossible without following error from classic setting, 
also impossible to move the motor by GUI. (hijack stepgen) (i think you 
know that lol)

I try to replace  waiting M6Tn for first attemp with some code from 
Carrousel without good success ^^

--changed line 302 for  progress_level = 2

--and add case 2 line 338

Difficult for me to undrstand how line 262 to 304 work and make my own code.


I hope line 340 to 350 are ok but the next line not work like attempted

Realy thanks



-- 
website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
https://github.com/machinekit
--- 
You received this message because you are subscribed to the Google Groups 
"Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to machinekit+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.


toolchanger.comp
Description: Binary data


Re: [Machinekit] Re: how to add toolchanger funtion to BBB with Xylotex cape

2018-03-03 Thread 'schoone...@btinternet.com' via Machinekit

  
  
It would be very helpful if you actually said what you had found and
provided a link to it.

From the comments in the code, I can tell that it is one I wrote
some time ago and posted here
http://www.machinekit.io/docs/developing/toolchangers/
amongst other places, including on the Linuxcnc contributed
components wiki.

There are several problems with this type of ATC, that need to be
overcome. 

First is that it is extremely unlikely that your tool tips will be a
perfect '360 / number_of_tools' apart.
I found I had to move different amounts depending upon whether it
was a conventional cutting tool
or a VDI 20 mounted tool or drill.

Next there is how rotary axes are dealt with.
Unless care is taken, and incremental moves only are programmed, the
interpreter will try to take the shortest path to the required
position, which may entail running in reverse.
eg. if you are at 30 deg and program in 330 deg, it will attempt to
move 60 deg in reverse. You need to program for instance G90 A300 
to avoid ramming back against the pawl and stalling.

The only sure way to determine the movement amounts is to experiment
using MDI commands until you have consistent results.
Every ATC will be different, the one this was written for had 8
tools, not 6. (4 cutting 4 boring)

On my current lathe I abandoned degrees altogether and calculated
the number of steps required to move the distance, programmed A as a
linear axis 
and just moved by outputting incremental position_cmd.  Far simpler
to account for any differences in move between tool numbers.

To answer your second email

There is no provision for a ATC home switch, because the one it was
originally written for did not have one.

The code tells you how to home

                    // axis does not remember the current tool
number, so prompt for it when A axis homed.
    if(ishomed && !currenttoolnumber
&& !bWarn)
    {
    bWarn = true;  // just warn once, its not an
error as such but INFO won't display unless debugging is set 3+
    rtapi_print_msg(RTAPI_MSG_ERR, "No tool
selected. Use M6Tx to set current tool");
    break;..
    }

You simply home axis A, and if no tool number is set, you are
prompted to do a M6TN to set the tool number.

If you want an automatic rotation until the home switch is found
etc, you need to use elements of the carousel toolchanger in the
same page.

I think that one uses an amended iocontrol component however, which
I have no intention of publishing or supporting, so I would just use
the method outlined above
unless your programming is up to doing similar.

regards

On 02/03/18 22:39, Aurelien wrote:


  Hi


Now i have found good config for moving the turret but i
  like to report 2 issue.


First :
When you move from tool 1 to 6 with actual setting the past
  to pawl move too less compared to real amount moved 5x63° =
  .315     fudge factor is 14 so 315-14 = 301° !!!


If i'm not wrong :



  pin io float odd_move = 64      "distance from odd tool
station to even one";
  pin io float even_move = 64     "distance from even tool
station to odd one";
  pin io float divisor = 2        "used in calculating
reverse move to lock";
  pin io float fudge_factor = 24      "additional move to
ensure locking";  
  // fudge factor need to be selected higher than
"additional angle" x( nTool-1)
  // so 4°x(6-1) = 20  i have add +4 for make really sure.



In this way 5x64° = 320° - 24 = 296° so i'm sure the final
  position is 300° on the pawl with 4° more for locking


Please are you agree with this ?




Second :
Is not a real issue but need to be potnted for noob like
  me 


 if(!fjog  && (delay_index < (delay * 30)) )  
if your stepper is too slow the past to pawl not append so
  you need to increase this delay.




Br






  
  -- 
  website: http://www.machinekit.io
  blog: http://blog.machinekit.io
  github: https://github.com/machinekit
  --- 
  You received this message because you are subscribed to the Google
  Groups "Machinekit" group.
  To unsubscribe from this group and stop receiving emails from it,
  send an 

Re: [Machinekit] Re: how to add toolchanger funtion to BBB with Xylotex cape

2018-03-02 Thread Aurelien
For now i really don't understand how to initiate homing at first start 
with this component

I have a home switch for the turret but i don't know how to connect with 
the toolchanger.comp

Br

-- 
website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
https://github.com/machinekit
--- 
You received this message because you are subscribed to the Google Groups 
"Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to machinekit+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.


Re: [Machinekit] Re: how to add toolchanger funtion to BBB with Xylotex cape

2018-03-02 Thread Aurelien
Hi

Now i have found good config for moving the turret but i like to report 2 
issue.

First :
When you move from tool 1 to 6 with actual setting the past to pawl move 
too less compared to real amount moved 5x63° = .315 fudge factor is 14 
so 315-14 = 301° !!!

If i'm not wrong :

pin io float odd_move = 64  "distance from odd tool station to even 
one";
pin io float even_move = 64 "distance from even tool station to odd 
one";
pin io float divisor = 2"used in calculating reverse move to lock";
pin io float fudge_factor = 24  "additional move to ensure locking";  
// fudge factor need to be selected higher than "additional angle" x( 
nTool-1)
// so 4°x(6-1) = 20  i have add +4 for make really sure.

In this way 5x64° = 320° - 24 = 296° so i'm sure the final position is 300° 
on the pawl with 4° more for locking

Please are you agree with this ?


Second :
Is not a real issue but need to be potnted for noob like me 

 if(!fjog  && (delay_index < (delay * 30)) )  
if your stepper is too slow the past to pawl not append so you need to 
increase this delay.


Br



-- 
website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
https://github.com/machinekit
--- 
You received this message because you are subscribed to the Google Groups 
"Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to machinekit+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.


Re: [Machinekit] Re: how to add toolchanger funtion to BBB with Xylotex cape

2018-03-01 Thread Aurelien

>
> Hi all
>

I try to add thos component to my own config, i think i have understand 
some parts of the needed setup but i need to found the good stepgen 
parameter for move the good distance. (same as this config 6 tool turret 
each 60° with past pawl)

The most question for now is how to home the turret tool ??? 


With special link needed for this toolchanger i can't home or jog from 
standard function, is there really any possibility to have both linkage for 
use axis as normal and with toolchanger ?

Best regards

-- 
website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
https://github.com/machinekit
--- 
You received this message because you are subscribed to the Google Groups 
"Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to machinekit+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.


Re: [Machinekit] Re: how to add toolchanger funtion to BBB with Xylotex cape

2016-12-06 Thread Mike Ross
By defining the axis as a LINEAR axis in the ini, and by messing just a 
little with toolchanger.comp (removed the adjusting for greater than 360 
degrees - just let it accumulate) I am able to get repeatable tool changes 
for hundreds of tool changes - more than I expect would ever happen in a 
session.  As a hobby / weekend warrior I tend to shut my machines down 
quite regularly.  It may be that after several hundred (thousand) tool 
changes the toolchanger will try and reset or overflow its position but I'm 
good with it as is now.

I'll try and post this weekend the working files for anybody interested - 
the Beaglebone is terrible to use for internet connectivity so I tend to 
post from my main pc

Mike


On Saturday, December 3, 2016 at 2:07:51 AM UTC-5, Schooner wrote:
>
> There is an inherent problem with rotary axes when moving to absolute 
> positions, that they will try to take the shortest path.
>
> I prevented this in another component, by making the axis a linear one and 
> by trial and error getting the linear distance command that equated to the 
> rotation required and using this figure instead of degrees.
>
> It just requires holding a cumulative total and incrementing or 
> decrementing as required.
>
> You probably need to debug by checking the pin values over a series of 
> moves and check when this occurs and whether the amended calculation for 
> rolling over at 360 degrees is working, but the above is another way
>
> regards
>
>
>
> On 03/12/2016 03:07, Mike Ross wrote:
>
> Ok, I still have a small issue with the toolchanger I'm trying to sort out 
> - again pointers on where to look or how to troubleshoot are appreciated. 
>
> It seems that either after many tool changes or many tool positions (i.e 
> T1 to T6, then to T5, etc) it attempts to drive in the wrong direction.
>
> I'll try and figure this one out but I'm afraid its in the 
> toolchanger.comp code...
> I'm going to write a simple program that cycles the tool change and see if 
> I can get a repeatable result.
> Mike
> -- 
> website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
> https://github.com/machinekit
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Machinekit" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to machinekit+...@googlegroups.com .
> Visit this group at https://groups.google.com/group/machinekit.
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
https://github.com/machinekit
--- 
You received this message because you are subscribed to the Google Groups 
"Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to machinekit+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.


Re: [Machinekit] Re: how to add toolchanger funtion to BBB with Xylotex cape

2016-11-30 Thread schoone...@btinternet.com

Glad you got it going, perserverence will always win through:-)


On 01/12/2016 03:35, Mike Ross wrote:
I have the toolchanger working as intended!  I will post the revised 
files later after I have tuned up the axes for the correct steps per 
move etc. but I thought I'd post the rough solution for those interested.
After much studying of the code of hal file, the ini and the 
toolchanger.comp I was almost ready to take up coding a new 
toolchanger.comp that was much simplified (because I can't really 
write C), but then I had another thought.
On comparing the Xylotex.ini and Xylotex.hal with any of the other hal 
and ini for other BBB capes (CRAMPS, Probotix, BeBoPr, etc) I thought 
I'd try and get rid of the PID function on the stepper motors as only 
the Xylotex config has it and the others seem to work fine without PID 
on the stepgen.

That was the fix.
After that I was able to make and break all the right connections and 
now the toolchanger will cycle through the 6 positions and back up 
after it has arrived at the final position (and I still have my X and 
 Z axis working).


Thanks again for all the help along the way.

Mike

--
website: http://www.machinekit.io blog: http://blog.machinekit.io 
github: https://github.com/machinekit

---
You received this message because you are subscribed to the Google 
Groups "Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to machinekit+unsubscr...@googlegroups.com 
.

Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.


--
website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
https://github.com/machinekit
--- 
You received this message because you are subscribed to the Google Groups "Machinekit" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to machinekit+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.


Re: [Machinekit] Re: how to add toolchanger funtion to BBB with Xylotex cape

2016-11-27 Thread schoone...@btinternet.com

  
  

On 26/11/16 23:29, Mike Ross wrote:


  
  
> So the question is what am I supposed to link to?  There
are a few I can try but 
> its a bit painful doing it trial and error.

> help here is appreciated.


I'm not sure what Xylotex.hal file you started with, but the
example

configuration has entries for 4 axis (and the cape can support
more

using the IDC header):


https://github.com/machinekit/machinekit/blob/master/configs/ARM/BeagleBone/Xylotex/Xylotex.hal#L227-L279 
  I.
  
  I'm using the Xylotex.hal that is part of the machinekit
image from Robert Nelson.  
  
  
  You need
to make sure you are loading the hal_pru_generic driver with

the appropriate number specified for num_stepgens:


https://github.com/machinekit/machinekit/blob/master/configs/ARM/BeagleBone/Xylotex/Xylotex.ini#L3


...otherwise, you just need to tie whatever position command you
are

using for your tool changer to the hal_pru_generic stepgen
driver to

create the step/dir signals.


-- 
Charles Steinkuehler

cha...@steinkuehler.net

  
  
  
  So I have the stepgen making steps for the stepper motor when
I call an M6 toolchange.
  The problem I have now is 2 fold.
   1st is that I get a following error for the toolchanger.  I
sort of knew this would happen based on the notes but I can't
figure out what to unlink without screwing everything up.


Because the stepgen used to move the toolchanger is connected
directly to the component, any form of feedback will always result
in a 
following error
The component connects to stepgen.X.pos-cmd and the
stepgen.X.position-fb is not connected to anything, because
Machinekit has no knowledge of axis X being told to move, so will
error.



   2nd problem is that the tool changer doesn't do any kind of
backwards move even when I manage to get through the following
errors.  This means it won't lock in place after a tool change.


It should move back when sent a position which is before its current
one


  And while I'm at it I may as well admit my ignorance as to
how the toolchangers stepping speed is controlled?  
  


It is an axis in the ini file, its speed is set there

You can get rid of axis_1 completely and take 'A' out of the
COORDINATES =  X Z A line
since it is not an A axis that MK needs to know anything about


  
  
  here is the snip from the modified Xylotex.hal (I've named it
Compact5.hal) that has what I think is all the required info,
the toolchanger.comp is the one I compiled from Schooner
(attached here earlier).  I'll attach them all for completeness.
I did try changing a few values in the comp file but I'm pretty
sure that they aren't an issue (delay time, odd and even_move
values).
  
  
  My fundamental failure is to understand the connections
between toolchanger.comp, the Compact5.hal and the
hal_pru_generic driver.  I'm thinking part of it is that the
Xylotex.hal is using PID for the stepgen and that is messing my
understanding of things. 
  


Afraid I don't have a BBB etc so can't assist
This was written for a software stepgen operating on a parport

The easiest thing to do might be to have it as an A axis, connected
as normal and move it around by MDI commands
Once you can do that and work out what the move increments between
tools is, then disconnect the pos-cmd and position-fb and just
connect pos-cmd to the component and try it.


  Again any help is appreciated.
  Mike
  -- 
  website: http://www.machinekit.io
  blog: http://blog.machinekit.io
  github: https://github.com/machinekit
  --- 
  You received this message because you are subscribed to the Google
  Groups "Machinekit" group.
  To unsubscribe from this group and stop receiving emails from it,
  send an email to machinekit+unsubscr...@googlegroups.com.
  Visit this group at https://groups.google.com/group/machinekit.
  For more options, visit https://groups.google.com/d/optout.


  




-- 
website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit
--- 
You received this message because you are subscribed to the Google Groups "Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+unsubscr...@googlegroups.com.

Re: [Machinekit] Re: how to add toolchanger funtion to BBB with Xylotex cape

2016-11-26 Thread Mike Ross



> > So the question is what am I supposed to link to?  There are a few I can 
> try but 
> > its a bit painful doing it trial and error. 
> > help here is appreciated. 
>
> I'm not sure what Xylotex.hal file you started with, but the example 
> configuration has entries for 4 axis (and the cape can support more 
> using the IDC header): 
>
>
> https://github.com/machinekit/machinekit/blob/master/configs/ARM/BeagleBone/Xylotex/Xylotex.hal#L227-L279
>  

I.
>
I'm using the Xylotex.hal that is part of the machinekit image from Robert 
Nelson.  

You need to make sure you are loading the hal_pru_generic driver with 
> the appropriate number specified for num_stepgens: 
>
>
> https://github.com/machinekit/machinekit/blob/master/configs/ARM/BeagleBone/Xylotex/Xylotex.ini#L3
>  
>
> ...otherwise, you just need to tie whatever position command you are 
> using for your tool changer to the hal_pru_generic stepgen driver to 
> create the step/dir signals. 
>
> -- 
> Charles Steinkuehler 
> cha...@steinkuehler.net  
>

So I have the stepgen making steps for the stepper motor when I call an M6 
toolchange.
The problem I have now is 2 fold.
 1st is that I get a following error for the toolchanger.  I sort of knew 
this would happen based on the notes but I can't figure out what to unlink 
without screwing everything up.
 2nd problem is that the tool changer doesn't do any kind of backwards move 
even when I manage to get through the following errors.  This means it 
won't lock in place after a tool change.
And while I'm at it I may as well admit my ignorance as to how the 
toolchangers stepping speed is controlled?  

here is the snip from the modified Xylotex.hal (I've named it Compact5.hal) 
that has what I think is all the required info, the toolchanger.comp is the 
one I compiled from Schooner (attached here earlier).  I'll attach them all 
for completeness. I did try changing a few values in the comp file but I'm 
pretty sure that they aren't an issue (delay time, odd and even_move 
values).

My fundamental failure is to understand the connections between 
toolchanger.comp, the Compact5.hal and the hal_pru_generic driver.  I'm 
thinking part of it is that the Xylotex.hal is using PID for the stepgen 
and that is messing my understanding of things. 
Again any help is appreciated.
Mike

-- 
website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
https://github.com/machinekit
--- 
You received this message because you are subscribed to the Google Groups 
"Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to machinekit+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.


Compact5.hal
Description: Binary data


Compact5.ini
Description: Binary data


toolchanger.comp
Description: Binary data


Re: [Machinekit] Re: how to add toolchanger funtion to BBB with Xylotex cape

2016-11-23 Thread Charles Steinkuehler
On 11/23/2016 5:45 PM, Mike Ross wrote:
> I think I've identified the location of the problem, I just need some hints 
> on 
> how to get over it.
> 
> Watching the component pins I can see the position_cmd change when I issue an 
> M6 
> Tx command, but there is no stepper activity.
> 
> It seems to me that the problem is related to this being done on a BBB with 
> PRU ...
> The original toolchanger hal file has:
> net apos-cmd toolchanger.position.cmd => stepgen.3.position-cmd
> 
> I thought all I needed to do was update that to hpg.stepgen.03.position-cmd 
> and 
> all would be good but the Xylotex.hal file I'm editing doesn't have a 
> hpg.stepgen.03.position-cmd
> 
> So the question is what am I supposed to link to?  There are a few I can try 
> but 
> its a bit painful doing it trial and error.
> help here is appreciated.

I'm not sure what Xylotex.hal file you started with, but the example
configuration has entries for 4 axis (and the cape can support more
using the IDC header):

https://github.com/machinekit/machinekit/blob/master/configs/ARM/BeagleBone/Xylotex/Xylotex.hal#L227-L279

You need to make sure you are loading the hal_pru_generic driver with
the appropriate number specified for num_stepgens:

https://github.com/machinekit/machinekit/blob/master/configs/ARM/BeagleBone/Xylotex/Xylotex.ini#L3

...otherwise, you just need to tie whatever position command you are
using for your tool changer to the hal_pru_generic stepgen driver to
create the step/dir signals.

-- 
Charles Steinkuehler
char...@steinkuehler.net

-- 
website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
https://github.com/machinekit
--- 
You received this message because you are subscribed to the Google Groups 
"Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to machinekit+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.


Re: [Machinekit] Re: how to add toolchanger funtion to BBB with Xylotex cape

2016-11-23 Thread Mike Ross
I think I've identified the location of the problem, I just need some hints 
on how to get over it.

Watching the component pins I can see the position_cmd change when I issue 
an M6 Tx command, but there is no stepper activity.

It seems to me that the problem is related to this being done on a BBB with 
PRU ...
The original toolchanger hal file has:
net apos-cmd toolchanger.position.cmd => stepgen.3.position-cmd

I thought all I needed to do was update that to hpg.stepgen.03.position-cmd 
and all would be good but the Xylotex.hal file I'm editing doesn't have a 
hpg.stepgen.03.position-cmd

So the question is what am I supposed to link to?  There are a few I can 
try but its a bit painful doing it trial and error.
help here is appreciated.


On Tuesday, November 22, 2016 at 7:30:03 AM UTC, Schooner wrote:
>
>
>
> On 22/11/2016 03:11, Mike Ross wrote:
>
> Thanks, 
> I was able to compile the attached file once I created a posix folder 
> (there is an issue open about comp on xenomai) and I was able to copy it 
> over to the xenomai folder.
>
> I've managed to get Axis to run now but don't get a response from my 
> stepper when I issue a M6 Tx command.  I'll need to troubleshoot a bit 
> further and see what I've messed up, progres will be slow over the next few 
> days
>
> The place to start is with the Machine Configuration dialog open and 
> watching the component pins
>
> When you issue a m6tX command you should be able to watch the iocontrol 
> pins as well and see the command processed
>
> good luck
>
>
> Mike
>
> On Monday, November 21, 2016 at 10:48:42 AM UTC, Schooner wrote: 
>>
>>
>> On 21/11/16 07:55, schoo...@btinternet.com wrote:
>>
>>
>> On 21/11/16 01:16, Mike Ross wrote:
>>
>> Schooner - Thanks for the pointer - I had missed that I needed to install 
>> the component. 
>>
>> I had to add the machinekit-dev packages to be able to run the comp 
>> --install toolchanger.comp
>>
>> Now when I run that I get the following errors:
>>
>> toolchanger.c:55:5: error: unknown type name 'bool'
>>bool bEven;
>>^
>> toolchanger.c57:5:  error: unknown type name 'bool'
>>bool bToggle;   
>>^
>> toolchanger.c63:5:  error: unknown type name 'bool'
>>bool bWarn;   
>>^
>> toolchanger.c69:5:  error: unknown type name 'bool'
>>bool fjog;   
>>^
>> toolchanger.c71:5:  error: unknown type name 'bool'
>>bool bjog;   
>>^
>> I see that this is your original contribution - many thanks.  I hope I 
>> can get it working without being too much of a pain.
>>
>>
>> Yes I wrote this *many* years ago for Linuxcnc.  I still use it on the 
>> Boxford 240 lathe I wrote it for with Machinekit however, no reason to 
>> change what works.
>>
>> The bool issue is probably due to some changes in types introduced a 
>> while back, it can be got over simply by either defining bool, true, false 
>> etc or
>> using hal_bit_t
>> I think I defined them in instcomp to allow bool to be used in the main 
>> function, could just do the same to comp.
>>
>> I will look at it later and post an amended version which compiles with 
>> the current Machinekit.
>>
>>
>> I have changed the component to use hal_bit_t instead of bool.  
>> The #defines for true and false are already implemented in comp.
>>
>> I have also changed the other variables whilst I was at it.
>>
>> Params will become deprecated before too long in favour of i/o pins, 
>> since the only point of a param, was that you used not to be
>> able to create a pin with an initial default value, but now you can.
>>
>> Other variables should really be hal_typed, int should be either 
>> hal_s32_t or hal_u32_t depending upon the requirement, as an integer size 
>> can vary.
>> Likewise float should really be hal_float_t, which in fact is double, so 
>> that assignments are always correct
>>
>> This compiles for me so hopefully will get you going and you can fine 
>> tune the move values required between tools
>>
>> regards
>>
>>
>> -- 
> website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
> https://github.com/machinekit
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Machinekit" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to machinekit+...@googlegroups.com .
> Visit this group at https://groups.google.com/group/machinekit.
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
https://github.com/machinekit
--- 
You received this message because you are subscribed to the Google Groups 
"Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to machinekit+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit 

Re: [Machinekit] Re: how to add toolchanger funtion to BBB with Xylotex cape

2016-11-21 Thread schoone...@btinternet.com

  
  

On 21/11/16 07:55,
  schoone...@btinternet.com wrote:


  
  
  On 21/11/16 01:16, Mike Ross wrote:
  
  
Schooner - Thanks for the pointer - I had missed
  that I needed to install the component.
  
  
  I had to add the machinekit-dev packages to be able to
run the comp --install toolchanger.comp
  
  
  Now when I run that I get the following errors:
  
  
  toolchanger.c:55:5: error: unknown type name 'bool'
         bool bEven;
         ^
  toolchanger.c57:5:  error: unknown type name 'bool'
         bool bToggle;                       
         ^
  
toolchanger.c63:5:  error: unknown type name 'bool'
       bool bWarn;                       
       ^
  
  
toolchanger.c69:5:  error: unknown type name 'bool'
       bool fjog;                       
       ^
  
  
toolchanger.c71:5:  error: unknown type name 'bool'
       bool bjog;                       
       ^
  
  I see that this is your original contribution - many
thanks.  I hope I can get it working without being too much
of a pain.

  
  
  Yes I wrote this many years ago for Linuxcnc.  I still use
  it on the Boxford 240 lathe I wrote it for with Machinekit
  however, no reason to change what works.
  
  The bool issue is probably due to some changes in types introduced
  a while back, it can be got over simply by either defining bool,
  true, false etc or
  using hal_bit_t
  I think I defined them in instcomp to allow bool to be used in the
  main function, could just do the same to comp.
  
  I will look at it later and post an amended version which compiles
  with the current Machinekit.


I have changed the component to use hal_bit_t instead of bool.  
The #defines for true and false are already implemented in comp.

I have also changed the other variables whilst I was at it.

Params will become deprecated before too long in favour of i/o pins,
since the only point of a param, was that you used not to be
able to create a pin with an initial default value, but now you can.

Other variables should really be hal_typed, int should be either
hal_s32_t or hal_u32_t depending upon the requirement, as an integer
size can vary.
Likewise float should really be hal_float_t, which in fact is
double, so that assignments are always correct

This compiles for me so hopefully will get you going and you can
fine tune the move values required between tools

regards


  




-- 
website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit
--- 
You received this message because you are subscribed to the Google Groups "Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.

 
/*

EMC2 HAL component to implement ATC toolchanging in Boxford 240(F) CNC lathes

(c) ArcEye 09052011 schoone...@tiscali.co.uk

All values are metric

The same code with possible modification of values in

param rw float odd_move = 22.2 
param rw float even_move = 24 
will work for TCL 160 and TCL 125 and probably other lathes with the same 'move 
past pawl and reverse to stall against it' methodology.

These move figures are only half the actual move in degrees. The scaling takes 
care of the distance actually moved.
There is a very good reason for this.
It prevents the stepgen seeing any move as being in excess of 180degrees, 
therefore all moves between tool stations will be forward moves.
If you command a move to a position which is say 270degrees on a angular axis, 
the stepgen will try to move 90degress backwards 
to get to the same point by the shortest route.
In theory unlinking the stepgen dir signal and using our own should work, but 
it didn't and the axis wanted to go backwards all
the time despite the flag being set at TRUE (FWD).
As this worked perfectly, I preserved my sanity and just left well alone.

The 240 should have an index proximity switch signalling each station, but mine 
was U/S along with a lot of other low voltage components
My 160 did not have one and as I knew it could be indexed without, I did not 
replace the expensive Boxford 

Re: [Machinekit] Re: how to add toolchanger funtion to BBB with Xylotex cape

2016-11-20 Thread schoone...@btinternet.com

  
  

On 21/11/16 01:16, Mike Ross wrote:


  Schooner - Thanks for the pointer - I had missed
that I needed to install the component.


I had to add the machinekit-dev packages to be able to run
  the comp --install toolchanger.comp


Now when I run that I get the following errors:


toolchanger.c:55:5: error: unknown type name 'bool'
       bool bEven;
       ^
toolchanger.c57:5:  error: unknown type name 'bool'
       bool bToggle;                       
       ^

  toolchanger.c63:5:  error: unknown type name 'bool'
         bool bWarn;                       
         ^


  toolchanger.c69:5:  error: unknown type name 'bool'
         bool fjog;                       
         ^


  toolchanger.c71:5:  error: unknown type name 'bool'
         bool bjog;                       
         ^

I see that this is your original contribution - many
  thanks.  I hope I can get it working without being too much of
  a pain.
  


Yes I wrote this many years ago for Linuxcnc.  I still use
it on the Boxford 240 lathe I wrote it for with Machinekit however,
no reason to change what works.

The bool issue is probably due to some changes in types introduced a
while back, it can be got over simply by either defining bool, true,
false etc or
using hal_bit_t
I think I defined them in instcomp to allow bool to be used in the
main function, could just do the same to comp.

I will look at it later and post an amended version which compiles
with the current Machinekit.


  
Mike


On Saturday, November 19, 2016 at 8:28:00 PM UTC, Mike Ross
  wrote:
  
Hi everyone, I'm trying to add a toolchanger
  component to my config.  I have a Compact5 lathe that is
  converted to steppers and I've got that much working (X
  and Z).  I was also able to configure the toolchanger
  stepper as A axis to confirm its wired right.
  
  
  I've tried looking at and copying from the
toolchanger examples on the Machinekit.io documentation
but I've stumbled.
  
  
   A bit more background - I'm trying to copy the
example toolchanger for the Boxford 240 example( found
here: http://www.machinekit.io/docs/developing/toolchangers/)
as its very similar to my turret toolchanger, mine is
only 6 positions versus 8, but it too is a rotate past a
pawl and then back up against it type, no sensors, and
converted to a stepper motor.
  I've edited my hal, ini and the toolchanger.comp to
be what I think is correct...(i.e roughly correct - just
looking for motion at the right time and place - fine
tuning will come later).
  I seem to be failing to "load" the toolchanger
component based on the log file and error message?  
  
  
  

  
Debug
  file information:
  
  
stat:
  No such file or directory
  
  
Compact5.hal:286:
  insmod failed, returned -1:
  
  
do_load_cmd:
  dlopen: toolchanger.so: cannot open shared object
  file: No such file or directory
  
  
rpath=/usr/lib/linuxcnc/xenomai
  

  
  
  
  http://pastebin.com/2bMkjcnU
  
  
  
  Eventually I'd like to add spindle speed control as
well but for now 1 problem at a time.
  
  
  Any help with this is appreciated
  
  
  Thanks
  Mike

  

  
  -- 
  website: http://www.machinekit.io
  blog: http://blog.machinekit.io
  github: https://github.com/machinekit
  --- 
  You received this message because you are subscribed to the Google
  Groups "Machinekit" group.
  To unsubscribe from this group and stop receiving emails from it,
  send an email to machinekit+unsubscr...@googlegroups.com.
  Visit this group at https://groups.google.com/group/machinekit.
  For more