Re: [Machinekit] PRU development helper scripts/tools for Machinekit?

2019-02-26 Thread Damien D
Thanks Charles!

In the end I did recompile the all Machinekit on BBB, took a while but it 
eventually worked and I got the dev. env. working now.

You may also want to look at the timer/capture modules, both in the 
> ARM system (with Linux drivers) and there's one module within the PRU 
> domain.  You can use these to time pulses and you will get several 
> orders of magnitude better accuracy (~10 nS) vs. trying to monitor the 
> signal with PRU software (~1-10 uS), but that may or may not be 
> important depending on the PWM frequency range.

10uS is already overkill for my needs ;)
I'm reading feedback signal from ClearPath motors 

 and 
the PWM frequency is only 50Hz. Also I'm using regular GPIO inputs because 
there is too much constraint with dedicated PRU inputs pinout.
Since I saw quite few video with people using those same ClearPath motors 
 on 
their CNC, I'm sure many would benefit from having this feature in 
Machinekit.

Also I would be happy to contribute to Machinekit project so I was 
wondering what are requirements/process to add a feature/push request to 
Machinekit official source code.

In order to integrate it at best into Machinekit source code, that would be 
great to have feedback on some question:
@Charles: As it seem you have done a lot of work in the hal_pru_generic 
driver, your feedback would be valuable :)

Since I'm not using dedicated PRU inputs, reading a regular GPIO input pin 
takes ~170ns (~190ns for GPIO bank 0). For this reason, I aim to read GPIO 
bank(s) not more that once per pru period and only if needed.

I see 2ways of doing that:

   1. read GPIO inputs "globally" (in similar way as it is done for GPIO 
   outputs in pru_wait.p 
   
).
 
   This requires to add some code in pru_wait.p 
   

and/or pru_generic.p 
   

 and 
   therefore extends a bit the overall pru period. The major advantage is that 
   it would allow any others hal pru "modules" to use any GPIO inputs (the hal 
   pru encoder could then be updated to work also with regular GPIO inputs).
   2. read GPIO inputs "locally" in the PWM reader pru task I'm 
   implementing. The drawback we will need to re-read GPIO input bank in every 
   hal pru "module" that use them and therefore wasting PRU period time.

I see the first solution as the best one.
Looking further, I saw that there is no much unused/free space in PRU 
register (r0-32), there are pretty much all used for something. However, I 
thought about this solution (using GPIOn_Clr and GPIOn_Set):

   - every time a PRU module/task want to read a GPIO pin, it set the 
   corresponding bit both GPIOn_Clr and GPIOn_Set registers. (I believe pru 
   module/task using GPIO as output never set both GPIOn_Clr and GPIOn_Set for 
   the same pin at the same time since that would be a non sense).
   - somewhere around pru_wait.p 
   

 check 
   if the result of logical AND (GPIOn_Clr + GPIOn_Set) differs from 0. If 
   it is then, perform a "long" (~170ns) reading on GPIOn and store the result 
   in GPIOn_Set. To avoid conflict with other GPIO outputs, only store 
   bits/pins where a read was requested. Then the PRU module/task that 
   requested the reading can read the pin state in GPIOn_Set on the next 
   pru period.

or maybe there is some easier solution allocating/using PRU RAM instead of 
direct PRU register r0-32 (GPIOn_Clr / GPIOn_Set)...
What are you thought? Do you have any better implementation idea/suggestion?

/Damien

PS: I'm using another account to post because of some unknown reason when I 
answer with my original google account my response got deleted right after 
I post it ( I tried 5times). I also tried to leave Machinekit group to 
re-join hoping it would reset something but now it seems I have no option 
to join again. fuck google! If anyone known how to solve that let me 
know.

On Sunday, February 17, 2019 at 4:07:02 PM UTC+1, Charles Steinkuehler 
wrote:
>
> On 2/17/2019 8:31 AM, Damien Dando wrote: 
> > Hi, 
> > 
> > Background: 
> > I'm building a CNC Lathe (see video here ), 
> I 
> > use ClearPath motors to control Z axis and the spindle. Those motors 
> can 
> > be configured to give torque feedback by outputting a PWM signal. I want 
> to 
> > be able to read the torque info 

Re: [Machinekit] 5-axis simultaneous, G-codes?

2018-02-18 Thread Damien D


On 18 Feb 2018, at 09:53, Bas de Bruijn wrote:
>
>
> On 18 Feb 2018, at 09:40, Damien D <damie...@gmail.com > 
> wrote:
>
> That's why I would like to know the list of G-codes command supported by 
> Machinekit/LinuxCNC
>
> They are here: http://www.machinekit.io/docs/index-user/#using-machinekit
>

thanks,

If anyone has already use Machinekit with 5axis simultaneous (ie. not only 
3+2axis) with TCP (Tool Center Point), I would be interested to know what 
CAM they have been using and which configuration they have used for 
kinematics :)
And if anyone has some idea about the cost for a 5axis simultaneous CAM 
software? <$1k?(I doubt), $1-5k?, $5-20k? more?

-- 
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] 5-axis simultaneous, G-codes?

2018-02-18 Thread Damien D
Thanks for your answer :)
 

> Not a subject I know much about, this seems to give the best overview of 
> the kinematics.
>
> http://linuxcnc.org/docs/ja/html/motion/5-axis-kinematics.html
>
> I think the XYZAC example at the very end is nearest what you are 
> proposing, with A and C rotating in relation to Z
>
I saw that page earlier, yes indeed that's something close to that I need.

The G codes remain the same, but the plane in which the axis operates may 
> limit them.
>
> Regards post processors, usually one for Mach is a good starting point, 
> being generally compatible.
>
Ok thanks for the info. Do you/anyone know what specific G-code commands is 
Mach using for 5axis program?
 

> Quite a few CAM packages have linuxcnc posts, either in the package or as 
> something available either from their forum or the linuxcnc forum. So check 
> either before you choose a CAM or before you write your own.
>
That's why I would like to know the list of G-codes command supported by 
Machinekit/LinuxCNC so I could figure out which posts can work. It seems 
that post processors usually state which specific G-codes commands they use 
to handle 5axis motions but if I don't know which G-code commands can be 
understood by Machinekit, it will be hard to find out which post processors 
can work.


On 17/02/2018 23:51, Damien D wrote:
>
> Hi,
>
> I'm planning on building a 5axis plasma cutter similar to this one 
> <https://groups.google.com/d/msg/machinekit/jTE2p9Jc6Fo/jXMEL5CXAwAJ> but 
> with one more axis to tilt the torch head.
> I'm thinking of starting from the existing maxkins kinematics (XYZBC) and 
> then modify it to my needs.
>
> Sorry if some questions seem 'stupid' but I'm quite new in CAM.. I'm 
> googling around and try to understand how the 5axis interface works between 
> CAM softwares and CNC controller (Machinekit).
>
> What I'm struggling to understand is what will be the G-codes supported by 
> Machinekit if I use the "maxkins" configuration?
>
> Does Machinekit support RTCP (Rotating Tool Center Point) like in this 
> video <https://www.youtube.com/watch?v=uj7zqI7Wdhw>. If yes, what are the 
> G-codes commands Machinekit can understand to handle RTCP?
>
> I would need to know that to chose/configure the post-processor.
> Or Maybe I should rather ask what post-processor (configuration) should I 
> use to produce G-code that can be understood by Machinekit?
>
> Thanks for your help,
>
> /Damien
> -- 
> 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.


[Machinekit] 5-axis simultaneous, G-codes?

2018-02-17 Thread Damien D
Hi,

I'm planning on building a 5axis plasma cutter similar to this one 
 but 
with one more axis to tilt the torch head.
I'm thinking of starting from the existing maxkins kinematics (XYZBC) and 
then modify it to my needs.

Sorry if some questions seem 'stupid' but I'm quite new in CAM.. I'm 
googling around and try to understand how the 5axis interface works between 
CAM softwares and CNC controller (Machinekit).

What I'm struggling to understand is what will be the G-codes supported by 
Machinekit if I use the "maxkins" configuration?

Does Machinekit support RTCP (Rotating Tool Center Point) like in this video 
. If yes, what are the G-codes 
commands Machinekit can understand to handle RTCP?

I would need to know that to chose/configure the post-processor.
Or Maybe I should rather ask what post-processor (configuration) should I 
use to produce G-code that can be understood by Machinekit?

Thanks for your help,

/Damien

-- 
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] machinekit kernel sources??

2018-02-16 Thread Damien D
Thanks everything works as I want now :)

I had to change "CONFIG_USB_MUSB_DSPS=m" to "CONFIG_USB_MUSB_DSPS=y" in the 
.config to get it work.

Le vendredi 16 février 2018 20:59:14 UTC+1, Robert Nelson a écrit :
>
> On Fri, Feb 16, 2018 at 1:45 PM, 'schooner30@btinternet' via 
> Machinekit  wrote: 
> > You should find the source package in the repo has the full source files 
> > 
> > 
> http://deb.machinekit.io/debian/pool/main/l/linux/linux_3.8.13.orig.tar.xz 
> > 
> > Don't bother trying to use apt, just download from the http link and 
> > unarchive it 
> > 
> > The config file distributed with the kernel should be able to be renamed 
> > .config in the source tree root dir and you have the build setup that 
> > produced the kernel in the package 
>
> Those files are out of date for that kernel: 
>
> linux_3.8.13-12~1jessie~1da.debian.tar.xz 2016-03-04 11:051.7M 
> linux_3.8.13-12~1jessie~1da.dsc 2016-03-04 11:051.8K 
> linux_3.8.13-12~1wheezy~1da.debian.tar.xz 2016-03-04 11:051.7M 
> linux_3.8.13-12~1wheezy~1da.dsc 2016-03-04 11:051.8K 
> linux_3.8.13.orig.tar.xz 2016-03-04 11:0568M 
>
>
> 3.8.13-xenomai-r83 was tagged: 
>
> https://github.com/RobertCNelson/bb-kernel/commits/3.8.13-xenomai 
>
> Jan 4, 2017 
>
> 10 months later.. 
>
> Regards, 
>
> -- 
> Robert Nelson 
> https://rcn-ee.com/ 
>

-- 
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] machinekit kernel sources??

2018-02-16 Thread Damien D
Thanks for your help, everything works as I want :)


Le vendredi 16 février 2018 20:59:14 UTC+1, Robert Nelson a écrit :
>
> On Fri, Feb 16, 2018 at 1:45 PM, 'schooner30@btinternet' via 
> Machinekit  wrote: 
> > You should find the source package in the repo has the full source files 
> > 
> > 
> http://deb.machinekit.io/debian/pool/main/l/linux/linux_3.8.13.orig.tar.xz 
> > 
> > Don't bother trying to use apt, just download from the http link and 
> > unarchive it 
> > 
> > The config file distributed with the kernel should be able to be renamed 
> > .config in the source tree root dir and you have the build setup that 
> > produced the kernel in the package 
>
> Those files are out of date for that kernel: 
>
> linux_3.8.13-12~1jessie~1da.debian.tar.xz 2016-03-04 11:051.7M 
> linux_3.8.13-12~1jessie~1da.dsc 2016-03-04 11:051.8K 
> linux_3.8.13-12~1wheezy~1da.debian.tar.xz 2016-03-04 11:051.7M 
> linux_3.8.13-12~1wheezy~1da.dsc 2016-03-04 11:051.8K 
> linux_3.8.13.orig.tar.xz 2016-03-04 11:0568M 
>
>
> 3.8.13-xenomai-r83 was tagged: 
>
> https://github.com/RobertCNelson/bb-kernel/commits/3.8.13-xenomai 
>
> Jan 4, 2017 
>
> 10 months later.. 
>
> Regards, 
>
> -- 
> Robert Nelson 
> https://rcn-ee.com/ 
>

-- 
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.


[Machinekit] machinekit kernel sources??

2018-02-16 Thread Damien D
Hi,

I'm using this working machinekit image: 
https://rcn-ee.com/rootfs/bb.org/testing/2017-02-12/machinekit/

As you might know, this kernel have some USB hot plug issue and I have a 
patch 

 
for it that I would like to apply.

For that I need to (re)compile the kernel and maybe also kernel modules 
(including those from machinekit?)..

At the moment I'm stuck at the easiest part, I cannot find/don't know where 
to look the exact sources that have been used to build the kernel within 
the image  
I'm using.

Does anyone know where I can find sources that have been used to 
produce the kernel (3.8.13-xenomai-r83) that is in this image? or even for 
the all rootfs image?

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.