Re: [Emc-users] Sheet metal bending, machine measurement/accuracy, new E-mail

2020-09-29 Thread Nicklas Karlsson
> On Mon, 28 Sep 2020 at 22:03, Nicklas SB Karlsson
>  wrote:
> 
> > This kind of measurement device with a screw on the edge. It have 10µm
> > resolution or a little bit higher if eye balling between lines.
> 
> You might have more luck with a dial indicator.

Yes of course, wrote wrong. Used dial indicator to meausure backlash and micro 
meter to measure on machined part. 10µm resolution on both.

> Move the carriage 2mm one way, then zero the dial and move 1mm the
> other way. The difference between what the dial reads and 1mm is your
> backlash.

Got a difference of a few digits on scale so resolution of 10µm limit 
measurement accyracy of backlash. Measuring with micrometer I also got a 
difference on a few digits then trying same part several times.

As machine is old I expect some whear but are uncertain how much. There is wear 
on paint of front door so expect it have been used quite much.


Regards Nicklas Karlsson


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] large latency spike on gtk permission error

2020-05-30 Thread Nicklas Karlsson
> Hi everyone
> 
> I am a novice (read: clueless) in Linux internals, so bear with me if I 
> say something stupid.
> On a fresh install of 
> http://www.linuxcnc.org/iso/linuxcnc-2.7.14-wheezy.iso, on an old 
> machine AMD Athlon 64. I've been using it for several years with 
> LinuxCNC, worked, but wanted a newer version.
> Latency stays below 7000 ns whatever I do, except if I try to run 
> ksystemlog (a graphical log viewer) without sudo. As it doesn't have 
> permission to access /var/log/system without sudo, it display an error 
> dialog.
> When the error happens, the latency spikes a lot, 25 to 70 microseconds.
> Running ksystemlog with sudo does not impact the latency.
> Trying to set the uid bit on the program leads to the (expected) error 
> "This process is currently running setuid or setgid. GTK+ does not allow 
> this therefore Qt cannot use the GTK+ integration.". Interestingly, this 
> also causes the latency spike.

It is always good to notice things like this.

> Of course this is not a significant issue, just something to known about 
> so that I don't accidentally do it while LinuxCNC is running. But I was 
> wondering if someone (who, unlike me, knows whats really going on behind 
> this) might know if there is a larger group of things to avoid doing, 
> because they might also cause such a latency spike. Or know what I'm 
> doing wrong.

I have noticed pressing on/off button there is sometimes a delay of slightly 
more than 0.1 seconds. Holding down key so that it auto repeat and delay keep 
popping in a row. It does not make a difference for on/off but guess it's 
enough to make a dent in the part if happens for other keys.

Ethernet, at least with normal configuration sometimes send other messages not 
supposed to be there if used to communicate with machine only.


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Ethercat large messages, real time jitter --> delayed in other

2020-05-30 Thread Nicklas Karlsson
Sorry for the noise. Messages was to Ethercat device and discovered delay 
jitter was bound to write sync manager more or less continiously instead of 
only then needed. No good idea how this could happen but it did, now it works 
with usually very little jitter which is as expected and close to perfect!

> I have discovered then larger messages is sent over Ethernet there seems to 
> be something adding jitter on real time performance, like a few hundred micro 
> seconds. Not certain if accessing HAL memory might have performance 
> drawbacks, have seen memcpy(...) so do not think so but have not other good 
> idea. Anybody have any idea?
> 
> Regards Nicklas Karlsson


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] Ethercat large messages, real time jitter

2020-05-30 Thread Nicklas Karlsson
I have discovered then larger messages is sent over Ethernet there seems to be 
something adding jitter on real time performance, like a few hundred micro 
seconds. Not certain if accessing HAL memory might have performance drawbacks, 
have seen memcpy(...) so do not think so but have not other good idea. Anybody 
have any idea?

Regards Nicklas Karlsson


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] servo tuning questions yeha:) Ziegler Nichols

2020-05-06 Thread Nicklas Karlsson
Rembered the name, that's enough to find it in seconds Ziegler Nichols method 
https://en.wikipedia.org/wiki/Ziegler%E2%80%93Nichols_method 

On Wed, 6 May 2020 16:41:04 +1200
andrew beck  wrote:

> I'll have a play thanks
> 
> On Wed, May 6, 2020, 4:24 PM Nicklas Karlsson 
> wrote:
> 
> > Remove PID gains, try a step response on analog input signal controlling
> > speed and measure output? Then you have a good idea of response gains could
> > be calculated on computer.
> >
> > Have some other algorithm in course litterature, do not remember and have
> > too look it up, do not have time now.
> >
> > > nicklas
> > >
> > > just to clear up a few things
> > >
> > > the rs482 is for a chinese windows based tuning program.  it is
> > completely
> > > separate from linuxcnc.
> > >
> > > the drives do accept modbus but that is a job I have no fancy tackling
> > with
> > > linuxcnc lol
> > >
> > > and yes any tuning stuff you can find would be appreciated.  the problem
> > is
> > > I cannot use Halscope yet.  until I have the servos tuned already I think
> > > pretty close.   But I might be wrong so if anyone has some experience
> > here
> > > I would love to hear it.
> > >
> > > regards
> > >
> > > Andrew
> > >
> > > On Wed, May 6, 2020 at 3:53 PM Nicklas Karlsson <
> > > nicklas.karlsso...@gmail.com> wrote:
> > >
> > > > > Hi guys
> > > > >
> > > > > I have been trying to connect my laptop to my chinese servos via
> > rs485
> > > > for
> > > > > ages to get the tuning software working and am not having any luck.
> > > > >
> > > > > In the mean time I am just wondering what the best way to tune the
> > servos
> > > > > is?  Can I hook up a oscilloscope to something?  I am lost how that
> > would
> > > > > work but have one I can use if needed.
> > > > >
> > > > > I can manually change the pid parameters in the drive easily  I just
> > > > can't
> > > > > measure it very well.  other than listening for noise.
> > > >
> > > > Have some kind of algorithm in course litterature for the case then
> > there
> > > > is no model of the system and a similar problem today. Maybe I could
> > point
> > > > you in the right direction tonight.
> > > >
> > > > There are also some kind of auto tune function in Linuxcnc, what kind
> > of
> > > > update frequency do you get them using rs485?
> > > >
> > > >
> > > > Regards Nicklas Karlsson
> > > >
> > > >
> > > > ___
> > > > Emc-users mailing list
> > > > Emc-users@lists.sourceforge.net
> > > > https://lists.sourceforge.net/lists/listinfo/emc-users
> > > >
> > >
> > > ___
> > > Emc-users mailing list
> > > Emc-users@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/emc-users
> >
> >
> > ___
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
> >
> 
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] servo tuning questions yeha:)

2020-05-05 Thread Nicklas Karlsson
Remove PID gains, try a step response on analog input signal controlling speed 
and measure output? Then you have a good idea of response gains could be 
calculated on computer.

Have some other algorithm in course litterature, do not remember and have too 
look it up, do not have time now.

> nicklas
> 
> just to clear up a few things
> 
> the rs482 is for a chinese windows based tuning program.  it is completely
> separate from linuxcnc.
> 
> the drives do accept modbus but that is a job I have no fancy tackling with
> linuxcnc lol
> 
> and yes any tuning stuff you can find would be appreciated.  the problem is
> I cannot use Halscope yet.  until I have the servos tuned already I think
> pretty close.   But I might be wrong so if anyone has some experience here
> I would love to hear it.
> 
> regards
> 
> Andrew
> 
> On Wed, May 6, 2020 at 3:53 PM Nicklas Karlsson <
> nicklas.karlsso...@gmail.com> wrote:
> 
> > > Hi guys
> > >
> > > I have been trying to connect my laptop to my chinese servos via rs485
> > for
> > > ages to get the tuning software working and am not having any luck.
> > >
> > > In the mean time I am just wondering what the best way to tune the servos
> > > is?  Can I hook up a oscilloscope to something?  I am lost how that would
> > > work but have one I can use if needed.
> > >
> > > I can manually change the pid parameters in the drive easily  I just
> > can't
> > > measure it very well.  other than listening for noise.
> >
> > Have some kind of algorithm in course litterature for the case then there
> > is no model of the system and a similar problem today. Maybe I could point
> > you in the right direction tonight.
> >
> > There are also some kind of auto tune function in Linuxcnc, what kind of
> > update frequency do you get them using rs485?
> >
> >
> > Regards Nicklas Karlsson
> >
> >
> > ___
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
> >
> 
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Fluctuating RPM using CUI ATM 10 encoder

2020-05-05 Thread Nicklas Karlsson
> Do you have a dual trace 'scope?  Spin the spindle and look at the input
> and output of the opto-isolator.  See if there really is a lag.   If you
> have a new scope would you have it capture the screen and post it.   I'm
> really skeptical that those isolators are THAT bad.
> 
> Here is the datasheet for the opto.
> https://www.mouser.com/datasheet/2/143/EL817-G-26528.pdf
> They claim an 18 uS rise and fall time.A 1KHz square wave will have a
> 1000 uS period and a 500 uS pulse width at 2 KHz the pulse width is still
> more than 10X the raise time of the opto.But maybe the opto is a fake
> counterfeit part with very poor performance.

Opto couplers are rather slow. With a high resolution encoder frequency could 
be maybe up to a few hundred kHz, 
2000*period/revolution*3600rpm=12period/second=120kHz, 200PPR will be 12kHz 
at 3600rpm, 1/(2*18µs) = about 27778Hz = about a little bit below 28kHz if mad 
no misstake.


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Fluctuating RPM using CUI ATM 10 encoder

2020-05-05 Thread Nicklas Karlsson
> I have a PMDC motor I’ve scavenged along with the MC-2100 motor control
> from a treadmill rated for 1.5 hp @ 90 volts. I’ve been testing it with
> LinuxCNC v2.7.15 in a mock-up environment I built for testing. I’m able to
> control the spindle speed via PWM pulses to the controller (HD2 pin 4). M3
> S500 will get me somewhere between 520 and 580 rpm. You can hear the motor
> whine fluctuating with the RPM. I’ve also installed a CUI ATM 10 encoder on
> the back and seem to have it working with both an index and phase A signal.
> I have the jumpers on it set to 200 PPR but it can go all the way to 2048.
> I’m using a cheap china 5 axis BOB connected via parallel cable.
> 
> Does anybody have any idea why I’m get so much flux on the rpm? Surely this
> isn’t normal? I know enough about the HAL to be dangerous. Is there some
> things I can check to smooth this out? Thanks.

You are sure drive pwm signal outputs are constant duty cycle?


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] servo tuning questions yeha:)

2020-05-05 Thread Nicklas Karlsson
> Hi guys
> 
> I have been trying to connect my laptop to my chinese servos via rs485 for
> ages to get the tuning software working and am not having any luck.
> 
> In the mean time I am just wondering what the best way to tune the servos
> is?  Can I hook up a oscilloscope to something?  I am lost how that would
> work but have one I can use if needed.
> 
> I can manually change the pid parameters in the drive easily  I just can't
> measure it very well.  other than listening for noise.

Have some kind of algorithm in course litterature for the case then there is no 
model of the system and a similar problem today. Maybe I could point you in the 
right direction tonight.

There are also some kind of auto tune function in Linuxcnc, what kind of update 
frequency do you get them using rs485?


Regards Nicklas Karlsson


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Machine accuracy

2020-05-03 Thread Nicklas Karlsson
> On Sat, 2 May 2020 at 16:29, N  wrote:
> 
> > Did not check check then moving but expect a lot less accuracy then at move,
> 
> Bear in mind that when the tool position matters the tool is often
> stationary in the important direction.

Then it will be more than good enough for drilling, I do not have to do 
measurements by hand anymore then drilling/threading for example hole for 
cooling fins. Searched manual and did not immediately found how to control 
movement in (X,Y) plane with good position accuracy while less is required in Z 
direction.


Regards Nicklas Karlsson


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] File storage, configuration and other, git via USB

2020-05-02 Thread Nicklas Karlsson
As file storage for configuration and others have been discussed. I do not have 
internet access in workshop and also have similar problem.

Cloning a git repository on an usb stick might be an option which I tried 
today. A little bit complex but it works. Creata a git repository with the 
files unless you already have, insert usb stick, clone git repository in the 
directory there the usb stick is, insert usb stick in Linuxcnc computer, clone 
repository on usb stick onto file system on Linuxcnc computer.

Git is a little bit complex especially then it come to branching but this two 
step storing seems to work great, though did not yet commit any changes back 
the other way.


Nicklas Karlsson


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] cloning hard drive to new SSD

2020-05-02 Thread Nicklas Karlsson
> Hi guys just getting back with a report of what I did to try clone my hard
> drive.
> 
> I tried to clone it in linuxcnc first as described and failed.  then tried
> clone zilla,  then tried a few other programs to decrease the size.

Do not think cloning is a good idea since it is an exact binary copy, you 
probably need to copy the file or as you did below keep configuration files and 
reinstall.

> using G parted I reduced the size of the disc down to 40 gb and then used
> clone zilla to zone it to the SSD.  both programs seemed to work fine.  But
> I couldn't boot from that point.
> 
> at that point I just re wiped the SSD with my linuxcnc boot stick and gave
> up.  took me 30 mins to download everything I was missing and I was away
> making parts later that afternoon.
> 
> thanks everyone for taking time to help me out.  I learnt a lot of stuff
> but never actually succeeded.  and after a while I decided it was a waste
> of time anyway.  I could just keep my config files and re install.  The
> whole reason I was trying to clone was then I would keep the probe basic
> gui install files..
> 
> regards
> 
> Andrew


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Supplier for low-voltage (48V) servo motors?

2020-03-23 Thread Nicklas Karlsson
> Hi John, hi Andy!
> 
> On 23.03.20 17:13, John Dammeyer wrote:
> > In, Vancouver there is 
> > http://www.dmm-tech.com
> > 
> > Any particular reason why you want 48V?  I use the Bergerda 220VAC units 
> > and although shipping is expensive the motor/drive components do end up 
> > costing less than the similar units from dmm-tech.
> 
> ...
> The reason for the 48V system is mainly safety, as it makes the design
> so much simpler if you don't have to care about all the HV stuff inside
> the machine. Everything else runs off 24V, there is no single wire
> running through the machine carrying mains power.

Common mode voltage will also be lower, maybe inductance for electric time 
constant is lower and possibility to use MOFSET instead of IGBT might be a 
third reason. Lower inductance make possible faster dynamic response as torque 
change faster but also increase current ripple.

> The drive system supports several standard encoder interfaces, but
> nothing proprietary. Using the motor manufacturer's drive is not an
> option, as all motion components need to be connected to a high speed
> serial bus (similar to EtherCAT).

Similar to Ethercat, Sercos?

> Thanks and best regards,
> Philipp


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] linuxcnc openlung ventilators --> do not come close to other people

2020-03-23 Thread Nicklas Karlsson
Try to keep some distance to the people hanging in the meeting at my workplace. 
They sit in a relatively small room together for a long period of time so if 
one of them get sick he is likely to infect the others, they also tend to meet 
quite much other people.

Think to keep some distance is a rather good idea even if you know the other 
people well because disease does not know and make any difference.


> How can Linuxcnc people help with OpenLung?
> https://gitlab.com/open-source-ventilator/OpenLung
> 
> tomp
> 
> 
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] PMSM, STMBL Drive

2020-03-22 Thread Nicklas Karlsson
> On Sat, 21 Mar 2020 at 18:32, Nicklas Karlsson 
> wrote:
> 
> > > *rene-dev <https://github.com/rene-dev> * commented on May 7, 2018
> > > <https://github.com/rene-dev/stmbl/issues/91#issuecomment-386898077>
> > >
> > > IRAM256-1567A2 or IRAM256-1067A2 can be used as replacement, but they
> > > only have 15 and 10A, but thats plenty for most servos.
> > > they are still available at mouser.
> > >
> > > and I see they are near 26bucks at
> > >
> > > https://m.th.aliexpress.com/item/32839176520.html
> > >
> > > and later said
> > >
> > >
> > >   *rene-dev <https://github.com/rene-dev> * commented on Jun 21,
> > >   2018
> > >   <
> > https://github.com/rene-dev/stmbl/issues/91#issuecomment-399050388>
> > >
> > > All A2 models seem to be out of stock now. The A models can be bodged in:
> >
> > Decided discrete transistor was a good idea, have sometimes been in doubt
> > but then looking on availability of components it feels like a really good
> > choice. Have prototype boards but nothing I dare to sell yet.
> >
> >
> > Regards Nicklas Karlsson
> >
> >
> I looked at this the last time it was discussed and thought these might be
> a good choice. And re-lay the board;
> 
> https://za.rs-online.com/web/p/motor-driver-ics/1339905/

I am sure this module work fine as long as "size" is suitable for motor voltage 
and current.

> https://za.rs-online.com/web/p/microcontrollers/7238978/

That's an excellent Micro controller, have similar on my boards, there are 
plenty to chose from.


Nicklas Karlsson


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Question about index pulse on high resolution encoder --> laser distance sensor

2020-03-22 Thread Nicklas Karlsson
> On Sun, 22 Mar 2020 at 00:52, Leonardo Marsaglia  
> wrote:
> 
> > The only real problem I see is how
> > to get a good measure of the grinding wheel as you dress it.
> 
> You would have to turn the coolant off to measure, but have a look at
> laser triangulation distance sensors:
> https://www.micro-epsilon.co.uk/news/2018/2018-05-15-optoNCDT-1750LL/
> (specifically mentions grinding wheels)

It seems like a rather good measurement probe, always been in doubt about these 
using time as speed of light is very fast. Accuracy seems rather good unless 
coolant is subtracted from distance of course.


Nicklas Karlsson


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Question about index pulse on high resolution encoder

2020-03-21 Thread Nicklas Karlsson
> Answering to Andy and Gene,
> 
> I'm tracking the position of the spindle (now simulated with this encoder
> but in the final machine I'll be using a 1024 PPR encoder) resetting the
> position counter after each index pulse and using that as reference for a
> new turn of the spindle.
> 
> Do you think it's better for me to only use one index pulse to set the
> reference and then count the position output to keep tracking of the
> spindle position and whenever I sum 1024 pulses I get one turn? I mean, not
> using the index for each revolution, only using it as a reference starting
> point.

Sum 1024 pulses to get one turn is most probably the best choice otherwise 
there might be a one turn glitch if number of turns is not perfectly updated.

If you know number of pulses per turn best would however be to use index pulse 
to detect if any pulse is missed and maybe correct it. Have seen example for 
Micro controller from manufacturer there they made choice to reset counter at 
zero pulse from encoder but decided to connect input to caputer instead for 
this reason.


Got datasheet but did not immidately figure out signals from encoder, use to be 
either sin/cos or quadrature. 5000 lines and 125000 pulses per turn must be 
from the 25-fold interpolation, I would expect interpolation to add much. 5000 
lines per turn is in line with high resolution optical encoder from other 
manufacturer, have 2000P/R but think same manufacturer have some higher also.


Regards Nicklas Karlsson


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Question about index pulse on high resolution encoder

2020-03-21 Thread Nicklas Karlsson
> On Saturday 21 March 2020 04:04:03 Nicklas Karlsson wrote:
> 
> > > Hello guys,
> > >
> > > I'm testing a phisical encoder to simulate how the spindle will work
> > > with the external offsets. So far so good but I need to clarify
> > > something that I suspect. Here it comes:
> > >
> > > The encoder I'm testing is an ERN471 from Heidenhain. A beast of
> > > encoder. It says 5.000 line counts on the datasheet but also says it
> > > outputs 125.000 signal periods per revolution, so when I read it in
> > > LinuxCNC with a scale of 1 I find that I'm having 500.000 pulses per
> > > turn. A lot of resolution. ...
> >
> > Maybe me stupid. My machine had Heidenhein encoders but I did not get
> > them work and replaced them with 2000P/R encoders.
> >
> Don't be so hard on yourself. Probably the smartest move you could have 
> made. Those ERN471's would be much more suitable on a fraction of a turn 
> robotic arm.

You happen to have a datasheet for the ERN471 encoder?


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Question about index pulse on high resolution encoder

2020-03-21 Thread Nicklas Karlsson
> Hello guys,
> 
> I'm testing a phisical encoder to simulate how the spindle will work with
> the external offsets. So far so good but I need to clarify something that I
> suspect. Here it comes:
> 
> The encoder I'm testing is an ERN471 from Heidenhain. A beast of encoder.
> It says 5.000 line counts on the datasheet but also says it outputs 125.000
> signal periods per revolution, so when I read it in LinuxCNC with a scale
> of 1 I find that I'm having 500.000 pulses per turn. A lot of resolution.
> ...

Maybe me stupid. My machine had Heidenhein encoders but I did not get them work 
and replaced them with 2000P/R encoders.


Nicklas Karlsson


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] A hal question?

2020-03-20 Thread Nicklas Karlsson
> Oops.  Somehow a sentence below was trimmed.  Fixed.
> 
> > > But what happens when someone has a 2500 line encoder on the spindle 
> > > creating
> > > 10,000 edges per rev.  or 200,000 edges per second at 1200 RPM.  Now that 
> > > 8
> > > threads deep hole is 1.6million.  Again, not an issue with a 32 bit signed
> > > counter but a problem with a 16 bit.
> > 
> > Not an issue, the 16 bit hardware count is extended to 64 bits in the driver
> > (every servo thread) this does limit you to a 16 MHz maximum count rate at 
> > a 1
> > KHz servo thread but thats way above the capabilities of most encoders...
> > 
> 
> So let's see if I have the math right.  At 16MHz we have an edge every 0.063 
> MicroSeconds.  At most then we'd see 16,000 in a hardware 16 bit register 
> ever 1 millisecond (the 1 khZ servo rate).  This value is added to a 64 bit 
> integer.  Is the hardware counter cleared again?  If not 1 mS later it would 
> be 32,000 which is still positive.  But on the next 1 mS check it's now 
> 48,000 which is -17536 as a signed number and adding that to the 64 bit 
> counter would decrease the distance travelled or suggest the spindle has 
> slowed dramatically.
> 
> There are probably hardware quadrature encoder counters that can be set to 
> latch the value on command and clear the counter?  I haven't checked the 
> encoder on the BeagleBone for example to see if it has that feature.  
> Certainly your FPGA stuff can be set up to do that.

Pretty sure Beagle bone have. Use ordinary Micro controllers of different 
brands and usually PWM counter could be used to trigger sampling of quadrature 
position counter at updater or similar regular interval. Quite often I also 
trigger interrupt for control loop from same signal but sometimes signal 
trigger ADC and in such case interrupt from ADC then sampling is done might be 
a better option.


Regards Nicklas Karlsson


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Open source CNC architecture --> good power plug

2020-03-18 Thread Nicklas Karlsson
Yes these power plugs look good. Have some XLR they are cheap and good.

> The best power plugs are those round "powerCON" plugs.  But getting people
> to use them will take time.  Their good feature is that both genders have
> only plastic parts exposed when unplugged and they can't be put in wrong.
> The white version is locking.
> https://www.neutrik.com/en/neutrik/products/powercon/powercon-20-a
> 
> These were invented by the same people who make the "speakON" speaker
> jacks.These are the industry standard for pro audio.
> 
> 
> On Tue, Mar 17, 2020 at 5:28 PM Gene Heskett  wrote:
> 
> > On Tuesday 17 March 2020 16:55:56 Gregg Eshelman via Emc-users wrote:
> >
> > > As big as the UK plugs are, with the beefy prongs, I'm surprised they
> > > haven't been classified as weapons and banned. ;) One could bean
> > > another person real good with one of your extension cords...
> > >
> > > On Tuesday, March 17, 2020, 10:34:44 AM MDT, andy pugh
> > >  wrote:
> > >
> > >  On Tue, 17 Mar 2020 at 16:18, Rafael Skodlar  wrote:
> > > > American standard for power plugs is way better but I don't
> > > > recommend to use N for an antenna
> > >
> > > There are unpolarised olugs in the US.
> >
> > Yes, and the quicker they go away, the better off we'd be. But we've been
> > stuck with the SOB's since the REA came thru in late '45. But I expect
> > it will take at least 200 years since that is the plug most lamps come
> > with yet.
> > >
> > > If you want to be super careful use the UK BS1363 plug. You can't put
> > > them in the wrong way round. Even if you remove the earth pin from the
> > > plug (as the shutters are opened by the earth pin).
> > >
> > > Of course the UK plug introduces a different danger, they hurt like
> > > hell to stand on in the dark.
> > >
> > > https://www.youtube.com/watch?v=UEfP1OKKz_Q
> >
> > Not available on this side of the pond.
> > >
> > > ___
> > > Emc-users mailing list
> > > Emc-users@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/emc-users
> >
> >
> > Cheers, Gene Heskett
> > --
> > "There are four boxes to be used in defense of liberty:
> >  soap, ballot, jury, and ammo. Please use in that order."
> > -Ed Howdershelt (Author)
> > If we desire respect for the law, we must first make the law respectable.
> >  - Louis D. Brandeis
> > Genes Web page 
> >
> >
> > ___
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
> >
> 
> 
> -- 
> 
> Chris Albertson
> Redondo Beach, California
> 
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Non-circular boring. Linuxcnc style.

2020-03-15 Thread Nicklas Karlsson
Hex hole is rather useful for nuts.

> video coming...  :)  one gcode program - chamfer, hex and hole all
> poly-bored..
>  h
> 
> 
> 
> 
> On Sat, Mar 14, 2020, 6:47 PM Sam Sokolik  wrote:
> 
> > playing with being able to 'gear?' the x axis to the radius of the polygon.
> >
> > \
> >
> >
> > On Thu, Mar 12, 2020 at 11:12 AM dave engvall 
> > wrote:
> >
> >>
> >> On 3/12/20 8:53 AM, Sam Sokolik wrote:
> >> > I think you could with currently a negative tool diameter...   The
> >> problem
> >> > is - the axis keeping up.  The spindle would have to move slower.
> >> >
> >> > On Thu, Mar 12, 2020, 10:25 AM Ed  wrote:
> >> >
> >> >> On 3/12/20 10:03 AM, Sam Sokolik wrote:
> >> >>> Yes - and it really isn't that great.  the cutter edge isn't on the
> >> >> center
> >> >>> line of the spindle..  I had to tweek the angle of the tool so that it
> >> >> cut
> >> >>> the hex in the right orientation.  I am actually surprised it worked
> >> as
> >> >>> well as it did.
> >> >>>
> >> >>> (or who knows - maybe it is why it did work as well as it did. :) )
> >> >>>
> >> >>> I hope to find or sharpen a decent tool to try andy's tapered polygon
> >> >> this
> >> >>> weekend.  (I also think I could thread it... why?  no clue.  But why
> >> stop
> >> >>> now..)
> >> >>>
> >> >>> sam
> >> >>
> >> >> Pretty neat Sam!
> >> >>
> >> >>
> >> >> Now for your next test do the double hex on an OD.
> >> >>
> >> >>
> >> >> Ed.;-)
> >> >>
> >> >>
> >> >> Get the bugs worked out and then try something in steel. :-) Probbly
> >> using a roughing routine first to remove the bulk of the material. Still
> >> pretty fancy stuff.
> >> Dave
> >> >>
> >> >> ___
> >> >> Emc-users mailing list
> >> >> Emc-users@lists.sourceforge.net
> >> >> https://lists.sourceforge.net/lists/listinfo/emc-users
> >> >>
> >> > ___
> >> > Emc-users mailing list
> >> > Emc-users@lists.sourceforge.net
> >> > https://lists.sourceforge.net/lists/listinfo/emc-users
> >>
> >
> 
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] No mails

2020-03-06 Thread Nicklas Karlsson
Happens sometimes. Working on something but tired and going slowly forward.

> Same here. But it seems to be working.
> 
> El 6 mar. 2020 11:35, "Peter Blodow"  escribió:
> 
> > Gentlemen,
> > I haven't received any mail from the list since March 2nd. Is there
> > something wrong, or is there just no issue?
> > Peter
> >
> >
> > ___
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
> >
> 
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Emc-users Digest, Vol 166, Issue 122

2020-03-01 Thread Nicklas Karlsson
Usually have automatic login.

> I went to my shop the other day and it's been so long since I used my little 
> mill I cant remember my login. Any suggestions? I really dont want to have to 
> do a clean install.Chris
> null
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Kinematics, headless CNC

2020-02-22 Thread Nicklas Karlsson
Did not find list of kinematics module but. Do not think this kind of 
kinematics module exist, scara however come close and so could be a good 
starting point.

> > No attached drawing.
> 
> Trying to attach smaller version of drawing:
> 
> 
> 
> If it doesn’t work, see here:
> https://1drv.ms/u/s!AmALSPKTMQBkwTRPcAo195PaFmAh 
> 
> 
> This does have one rotary axis and one linear axis so I’m pretty sure that 
> simply setting the AXIS=2 with trivkins component won’t work.
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Back to confusing puzzles. SSR failure mode short circuit!

2020-02-22 Thread Nicklas Karlsson
> On Friday 21 February 2020 11:53:16 Nicklas Karlsson wrote:
> 
> > > Greetings all;
> > >
> > > I have added a 40 amp SSR in the relay box with the two that are
> > > sequencing the spindle's psu startup for a soft start, but its not
> > > intentionally connected to those 2  other than as a power src when
> > > its enabled.  Except this one is to be enabled by the E-stop.out
> > > signal when its on, f1 pushed once after start.  The idea is to turn
> > > on motor power etc to the remainder of the system with the F1 key.
> >
> > Be aware that failure mode of SSR I am pretty sure is short ciruit so
> > that it does not turn off. Expect SSR is implemented with a thyristor
> > or mayb triac and they will not turn off a load with low power factor.
> > Even though it is very likely to work most of the time I would not
> > fully trust a F1 button for emergency stop.
> 
> I'm aware of that, but so far I have had zero failures with the hoymk 
> brand of 40 amp 450 volt SSR's from mpja.com  since using 2 of them to 
> soft-start the spindle motor psu for about 3 or 4 years now. 2 of them 
> are controlling all motor power including a 1.5 horse vfd from a pi 
> running the sheldon.  So when lcnc isn't running, the Sheldon draws less 
> that 10 watts, and its monitor draws 11 watts.

I beleive you and it will probably not fail while changing tool. Table end 
stops in CNC machine are rather nice, not much will happen unless you ar inside 
machine which is rahter unlikely compared to end stop on road or maybe thru 
roof for some kind of lifting device both there you are inside vehicle, fail 
once in 10-20 years and killing rate might be rather high.


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Kinematics, headless CNC

2020-02-21 Thread Nicklas Karlsson
> I am working on a design for a small custom 2-axis machine with 2 joints. 
> Joint 0 is linear and oriented in the Y direction. Joint 1 is rotary and 
> mounted on Y.  See attached drawing.

No attached drawing.

> My question is, would I be best off creating a new kinematics module for this 
> machine, or can I simply reuse an existing one? I’ve never done any 
> kinematics math but this setup seems to require no more than a few trig 
> functions. Any pointers on where to start with this?

You look into the .ini configuration file. In the [TRAJ] section there is a 
variable/constant AXES=2

This should work if joint are 90 mechanical degree in between.

> ...
> Since this is a headless machine with no more than a few controls (on/off, 
> start, stop, reset, Emergency stop, etc) What is the best way to load G-code 
> and run it when a button is pressed? I presume that I don’t need to load a 
> GUI. I don’t want to load more than necessary to achieve a fast boot time.

No idea.


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Back to confusing puzzles. SSR failure mode short circuit!

2020-02-21 Thread Nicklas Karlsson
> Greetings all;
> 
> I have added a 40 amp SSR in the relay box with the two that are 
> sequencing the spindle's psu startup for a soft start, but its not 
> intentionally connected to those 2  other than as a power src when its 
> enabled.  Except this one is to be enabled by the E-stop.out signal when 
> its on, f1 pushed once after start.  The idea is to turn on motor power 
> etc to the remainder of the system with the F1 key.

Be aware that failure mode of SSR I am pretty sure is short ciruit so that it 
does not turn off. Expect SSR is implemented with a thyristor or mayb triac and 
they will not turn off a load with low power factor. Even though it is very 
likely to work most of the time I would not fully trust a F1 button for 
emergency stop.

I would consider these two above as a problem if you need some safe way to turn 
of machine then for example changing tool or climbing into the machine for some 
reason or for some reason need to tuch a part that might cut fingers.


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Open source CNC architecture - open source complexity OT, more off it

2020-02-16 Thread Nicklas Karlsson
> > If it were true then Universities and schools wouldn't exist. After all 
> > everything taught in school is a "Google search away".
> 
> There are a lot of extremely knowledgeable people out there with little 
> formal education.

Had a cheap farmer as project leader at my workplace, that's the only thing I 
know about him though I guess hopefully someone checked he had some kind of 
formal education.

> Universities and schools  are not the only way to 
> learn. They make learning easier because they present the information in 
> a carefully organized way.

There are plenty and quite many scientific articles available for free on 
Internet. Universities at least have some check, quite often a written Exam 
before course could be passed, a little hard to check what kind of 
books/articles someone have read and even more so what they might have learned.

> It's all about attitude. If you attack a problem with the 'I can do 
> this' attitude you probably can. Will you make mistakes? Of course. Will 
> you always succeed? Probably not. Will it be hard work? Yes. However if 
> you start off thinking this is too hard you are pretty much guaranteed 
> to fail. Unfortunately fewer and fewer people these days are willing to try.

Met this attitude then working, "it will all be fine if we just get the 
project". Quite often try even though I do not think I can do it or good enough.

> So is a 747. You don't have to know what hydraulic system 2 in a 747 
> does to fly in one, though if you are interested a quick search will get 
> you a diagram that shows you.

It must help to know something about the connection between the stick and the 
rudders.

> Motion control is complicated. Making a very versatile extensible motion 
> control system is even more so. If you want LinuxCNC's versatility you 
> have to accept it is going to be complex. Unless you are doing pretty 
> sophisticated stuff you don't need to know how it works internally. If 
> you do need to work on it you just concentrate on the area you need to 
> work on.

For motion control using an electric motor it is really good to know the 
equation of a DC motor. It's not that complex get thing moving but to make it 
perfect is and require knowledge in mechanics, electronics, mathematics and to 
some degree software.


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] install problems --> other hardware problem over heat, OT?

2020-02-01 Thread Nicklas Karlsson
Had problem with HP server, it sometimes turned off, I could hear the fan speed 
increase then it worked so for some reason I decided to remove cooling fin, 
clearad ir, added new paste. Then it worked much better, could hear it on the 
fan and that was a real suprise. If it happaned once I guess it could happen 
for others to, especially if old computers is used.


> Nearly all manufacturers of electronics from the 1990's into the early 21st 
> century ended up getting at least some of those faulty capacitors, such was 
> the massive quantity of counterfeits made with the bad electrolyte formula. 
> Apple seemed to have been especially hard hit.
> On Friday, January 31, 2020, 8:54:51 PM MST, dave engvall 
>  wrote:  
>  
>  Certainly an idea to check out. Never occurred to me but the I suppose 
> Intel  could be victim of that kinda of fraud as easily as other 
> vendors. It is on tomorrows list of things to do. Tnx
> 
> Dave
> 
> On 1/31/20 7:16 PM, Gregg Eshelman via Emc-users wrote:
> > Have you checked the board for leaking capacitors? Usually the pressure 
> > relief cuts on top of the cans split open.  
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] looking for advice on best wiring practices and grounding on cnc mills

2019-12-29 Thread Nicklas Karlsson
> I'll offer my recently purchased 6040 mill as prime evidence of paint 
> pretty much destroying my ability to ground anything.  And to complicate 
> things even a Q TLO measure is prevented by ceramic bearings in the 
> spindle which are an insulator. ...

Ceramic bearings might be there to prevent bearing currents, have no idea if 
this is a common problem.


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Using a laptop for testing purposes with linuxcnc

2019-12-03 Thread Nicklas Karlsson
> ... With the 
> kernel my rpi4 is running, and abusing it badly, the worst case latency 
> is nominally 180 microseconds, plenty quick enough to keep the card 
> happy. The only time I've seen a stutter is when driving it with the 
> keyboard, there I get a random stop that resembles lifting my finger off 
> the key for a couple hundred milisecs. Its clean and steady running 
> gcode, or from the mdi interface.

Experienced similar on ordinary computer with on/off button but are not sure if 
it happen otherwise to.


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] User Interface Addition

2019-12-03 Thread Nicklas Karlsson
> I've been asking about this for years and have been met with resounding 
> silence. I rather like the idea of doing it remotely. Not that most 
> cpu's can't handle it but tends to get one thinking shopwise rather then 
> just a single machine.
> 
> Thanks for poking the bear. ;-)
> 
> I have no idea what hooks are there or need to be added to make this happen.


Did not yet reached a point there there I got my first old scrapped machine 
running but have also been thinking about it. You have searched on internet if 
there are any standard for communication with machine? Download machine and/or 
tell machine to run a particular program?


Nicklas Karlsson


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] User Interface Addition

2019-12-03 Thread Nicklas Karlsson
Agree.

A higher level system not necessarily real time, ordinary computer works. Tell 
robot to insert part using program, then iserted feed program to CNC tell it to 
run it, then done tell robot to remove part ... or tell operator.


Have comment about server as this is according to my terminology which I think 
is the same as most other a device waiting flor clients to connect. Assuming 
Linuxcnc stand waiting for a command in user interface or connected over the 
network server will be run on Linuxcnc while client is run on a higher level. 
To have central higher level application run as server waiting for clients to 
connect would require programming in both ends.


> Having it controlled by a central server is probably a good idea.  But I 
> think the user interface at the machine would be best served by a tab or VCP 
> panel.
> 
> 
> 
> Sent from my Verizon 4G LTE smartphone
> 
> 
>  Original message 
> From: Chris Albertson 
> Date: 12/2/19 4:41 PM (GMT-05:00)
> To: "Enhanced Machine Controller (EMC)" 
> Subject: Re: [Emc-users] User Interface Addition
> 
> I think scheduling might be a useful feature but it is best done as a
> separate application.The schedule app could run CNC jobs on remote
> computers.   It would be able to do shop-wide scheduling on any number of
> CNC machines. Also, I think you'd want the scheduler to run on a
> computer that is not driving a CNC machine.You want the scheduler's
> user interface to be available at multiple screens and even a cell phone so
> a web-based interface would be best.
> 
> 
> 
> On Mon, Dec 2, 2019 at 1:17 PM Todd Zuercher  wrote:
> 
> > How hard might it be to add a Job Queue to one of the user interfaces?
> >
> > At our factory it is common for a supervisor to create a list of jobs that
> > are to be ran on a machine for the next shift(s).  I think it would be nice
> > if this could be handled as part of Linuxcnc.  The supervisor could build
> > the job list including:  file name and path, type of material to be used,
> > and number of parts needed (or file runs) then send that directly to the
> > Linuxcnc PC at the machine over the network.  Then Linuxcnc could use this
> > list to open the correct file for the machine operator, tell the operator
> > what material is to be used, keep track of the number of parts (or runs)
> > completed, and move on to the next item in the queue and load it's milling
> > file when ready, and on down the list.
> >
> > Todd Zuercher
> > P. Graham Dunn Inc.
> > 630 Henry Street
> > Dalton, Ohio 44618
> > Phone:  (330)828-2105ext. 2031
> >
> >
> > ___
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
> >
> 
> 
> --
> 
> Chris Albertson
> Redondo Beach, California
> 
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
> 
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Using a laptop for testing purposes with linuxcnc

2019-12-01 Thread Nicklas Karlsson
> In general, notebook computers are optimized for size and battery life.
> But Linux based CNC is running in Raspberry Pi and even smaller and lower
> performance computers and dong fine.Performance is not needed.  What is
> needed is low latency real-time performance.

For good real time performance it should not be disturbed to long time by 
something else. According to EDF and rate-monotonic scheduling interrupted by 
higher priority is OK provided execution times are short enough. Assuming dead 
line is equal to period latency up to just below period OK.

What I have seen then using Ethernet is latency and jitter is very low but a 
few minutes in between there might be a quite long delay, milliseconds or maybe 
even more. Not sure where problem is it could of course be in my hardware or 
even in the measurement mechanism since I did not investigate thoroughly, will 
probably check more carefully sooner or later.


Pretty sure Laptop is more than good enough, difference is not big.


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Using a laptop for testing purposes with linuxcnc

2019-12-01 Thread Nicklas Karlsson
Checked once and concluded in general Laptops is a little bit more expensive 
and have a little bit less perfomance in some combination. Internal expansion 
ports are also limited.

This should come as no suprise unless ordinary computer is similar in size. In 
general a smaller diameter 2.5 inch should be expected to have less storage 
capacity than a 3.5 inch, there is also a need to limit power use.

Think 3D graphics card may detoriate real time perfomance, large burst transfer 
of memory block databus?


> Hey guys.
> 
> I saw that some guys are using laptops with linuxcnc.  I only want them for
> testing.  Just wondering what laptops are good and any tricks to set it
> up.  I'm using Mesa pci cards so that might be a problem with a laptop.
> But any ideas would be appreciated.
> 
> Regards.
> Andrew
> 
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Question about HAL streamer

2019-11-13 Thread Nicklas Karlsson
Use the opposite sampler and might be able to help you if needed. You got the 
file format?

> Hello to all.
> 
> I want to experiment with HAL streamer to send some data to a custom
> component. The data will be read from a text file.
> 
> I would like to know if there is more information other than the one on the
> documentation. I have little time to experiment, so if there is any more
> information or some samples would be great.
> 
> I suspect I need to generate a clock signal in HAL and use it to feed my
> component and the streamer component. But I have never used it so I have
> more doubts that anything else.
> 
> Thanks as always.
> 
> Leonardo
> 
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Whereare you getting your wire from?

2019-10-29 Thread Nicklas Karlsson
Bought half a wagon load or so in different sizes a few years ago, then I do 
not need to run to store every time something should be connected. A good idea 
or not I still not know but I use some every now and then.

On Mon, 28 Oct 2019 22:46:04 -0400
Dave Cole  wrote:

> Menards was selling some surprisingly nice low voltage control wiring 
> with two conductors two years ago for a good price.   I bought a hundred 
> feet of it or so to wire up some air valves on a machine and I was in a 
> rush.
> It was real stranded copper and I believe it was 18 gauge.
> Two conductors in a jacket.
> Its been on the machine for 2 years now, no issues.
> 
> Dave
> 
> On 10/26/2019 6:28 PM, Gene Heskett wrote:
> > Greetings all;
> >
> >
> > I went out to wire that pump up today, but discovered that nominally 1/3
> > roll of small zip cord I thought I had, seems to have obtained some
> > growth hormone, grew legs and walked off.  Might not have been enough
> > anyway.
> >
> > So who has the miniature zip cord at the best price on this side of the
> > pond? I'd like a 50 or 100 foot spool.
> >
> > Cheers, Gene Heskett
> 
> 
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] With stepper motors running

2019-09-07 Thread Nicklas Karlsson
Have studied some extra math the last few years and got rid of some other 
problem but finally I got time. This is something old I had running a few years 
ago but accidently broke a year or two ago https://youtu.be/7--nyFGKvGY

My own hardware/software for joint steppers and BLDC spindle. Not perfect yet, 
might also be because workpiece was not fastened/moved, probably no big issues 
but I will not spend more time with it right now since I do not have any direct 
use for it.


Nicklas Karlsson


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Mesa PIN file description

2019-09-04 Thread Nicklas Karlsson
Know about some variable or similar in *.hal file to enable printing of pins 
the Linuxcnc is started.

> Hi all
> 
> Does anyone know of a document or a description somewhere that explains 
> the contents, structure and possibilities of the Mesa PIN file?
> 
> -- 
> 
> Regards / Groete
> Marius D. Liebenberg
> 082 698 3251
> 
> 
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Control theory book by "Michael Blösch", state space fee-forward control

2019-08-17 Thread Nicklas Karlsson
On Wed, 22 May 2019 09:47:21 +0100
andy pugh  wrote:

> On Wed, 22 May 2019 at 08:43, Nicklas Karlsson 
> wrote:
> 
> >  the conclusion it is very unlikely to come
> > from anything else than a book about control theory.
> 
> 
> Why not send him an email?
> I think that m.bloe...@imperial.ac.uk is very likely to work.

No answer.

I have checked other litterature on local University library and still feel I 
have a few unanswered question then it come to linear state space based control 
theory. Any suggestions?


Nicklas Karlsson


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Sampler, enable/disable to stop/start sampling

2019-08-07 Thread Nicklas Karlsson
> On Tue, 6 Aug 2019 at 05:13, Nicklas Karlsson 
> wrote:
> 
> > I found it useful to start capture os sample signal and quit then enough
> > samples have been taken with the enable signal. Difference from today is
> > sampling is stopped at negative flank of enable signal so that how many
> > samples are taken may be controlled from Linuxcnc instead of command line
> > which is useful then a series of commands should be record. Change is
> > simple and an extra option for example "-q" to sampler_usr to enable this
> > behaviour only then needed might be a good solution. If I make a patch
> > would anyone else think it would be good to add this?
> 
> 
> Is there any real disadvantage to leaving sampler loaded but disabled? (If
> I understand your suggestion properly)

Did not think about it, quit manually is possible so no serious disadvantage 
unless started from other software then it is useful because otherwise it's 
hard to tell then done. Should think about it and then I used it for a while ut 
might be the right time.


Nicklas Karlsson


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] Sampler, enable/disable to stop/start sampling

2019-08-05 Thread Nicklas Karlsson
I found it useful to start capture os sample signal and quit then enough 
samples have been taken with the enable signal. Difference from today is 
sampling is stopped at negative flank of enable signal so that how many samples 
are taken may be controlled from Linuxcnc instead of command line which is 
useful then a series of commands should be record. Change is simple and an 
extra option for example "-q" to sampler_usr to enable this behaviour only then 
needed might be a good solution. If I make a patch would anyone else think it 
would be good to add this?


In the code variables are declared at beginning of block as usual while values 
are set a few lines further down even though value is available already then 
variable is declared. Usually then value is available then variable is declared 
I use to set it directly and declare variable as a constant with "const" 
attribute then it is not supposed to change. With warnings in case variable is 
used unitialized it is not very important although I like to use the "const" 
attribute then variable is not supposed to change, I do not intend to make any 
patch for this but want to ask about your oppinion?


Regards Nicklas Karlsson


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Linuxcnc-application

2019-07-30 Thread Nicklas Karlsson
Know a little bit about welding. Have seen manufacturer of welding equipment 
claiming adding some welding on new parts used for digging might be good since 
weld is harder and wear slower.

I am however certain welding is a lot more expensive material than buying a 
solid block and are in doubt about strength. Adding a little bit on top for 
example then part wear I think however might be a very good idea. Tried it 
myself manually, some grinding where need but it worked.

It might be MIG welding is best for thin material but are very uncertain. MMA i 
used and it work on thick material though TIG might be better since it is 
possible to indenpendently control speed of material added and power for 
heating if I got everything correct.


Regards Nicklas Karlsson



> Aram
> 
> additive machining using MIG is very interesting
> I've seen laser welding used to repair expensive blisks for turbines.
> 
> I dont know about welding though,
> but I see many people trying to achieve this.
> 
> these maybe of use:
> 
> Design And Development Of A Low-Cost 3D Metal Printer
> https://jmerd.org.my/Paper/Vol.%2041%2C%20No.%203%20%282018%29/47-54.pdf
> 
> Additive Manufacturing Using MIG Welding
> https://www.ijresm.com/Vol_1_2018/Vol1_Iss10_October18/IJRESM_V1_I10_137.pdf
> 
> simpler welder
> https://reprap.org/wiki/Slicer_and_process_improvements_for_open-source_GMAW-based_metal_3-D_printing
> 
> btw: Michigan Tech's MOST projects have a few links that you may find
> interesting.
> 
> your welds looks similar to what the universities achieved so don't be
> disappointed!
> 
> hth
> tomp
> 
> On Tue, Jul 30, 2019 at 1:49 AM a k  wrote:
> 
> > https://youtu.be/JJsCT81T4N8
> >
> > On Sun, Jul 28, 2019 at 7:04 PM a k  wrote:
> >
> > > https://youtu.be/3TBTOxNLo2E
> > >
> > > On Sun, Jul 28, 2019 at 6:53 PM a k  wrote:
> > >
> > >> https://youtu.be/YiT_CgO1-1w
> > >>
> > >> On Sun, Jul 28, 2019 at 6:50 PM a k  wrote:
> > >>
> > >>> here are some info about what my project.
> > >>> combination of lcnc and welding need to see some problems .that i
> > >>> have
> > >>> https://www.youtube.com/watch?v=3TBTOxNLo2E
> > >>>
> > >>> On Sun, Jul 28, 2019 at 12:01 PM Gene Heskett 
> > >>> wrote:
> > >>>
> > >>>> On Sunday 28 July 2019 12:01:11 Jon Elson wrote:
> > >>>>
> > >>>> > On 07/27/2019 10:09 PM, a k wrote:
> > >>>> > > Hi
> > >>>> > > I am interesting if linuxcnc can host different groups , like
> > >>>> > > linuxcnc for application?
> > >>>> > >
> > >>>> > > Right now it is linuxcnc for lathe and mill.
> > >>>> > > Cutting process not under the any questions ,so only linuxcnc ...
> > >>>> > >
> > >>>> > > What about if lcnc does something more complex than simple metal
> > etc
> > >>>> > > cutting?
> > >>>> >
> > >>>> > A variant of LinuxCNC called Machinekit is often used with
> > >>>> > the BeagleBone and CRAMPS board to run 3-D printers.  Some
> > >>>> > people are using it with 5-axis mills.  I know that several
> > >>>> > tube benders have been built.  One of my customers is in
> > >>>> > Brazil and uses LinuxCNC to run a screen printing machine
> > >>>> > (there's a YouTube video of it). Recently, some additions
> > >>>> > have been added to do reverse path for wire and sinker EDM.
> > >>>> > I've heard rumors of gear hobbing machines, too.
> > >>>> >
> > >>>> > Jon
> > >>>> >
> > >>>> I've never cobbled up a wire spooler, but I've done lots of EDM,
> > mostly
> > >>>> burning out broken taps. But my threads when I'm done look a heck of a
> > >>>> lot better that that guy on you-tube who specializes removing broken
> > >>>> taps. He uses so much current he's arcing sideways and punching holes
> > >>>> in
> > >>>> the threads. I haven't automated the feed rate, mainly because I'm
> > >>>> usually operating in a blind hole, so I have to back out and clean the
> > >>>> electrolyte out of the hole, its got so much metal in it thats its
> > gone
> > >>>> conductive. For that, I really should rig a small water pu

Re: [Emc-users] Real time data write to file, unexpected real time delay --> sampler, halsampler

2019-07-28 Thread Nicklas Karlsson
> There is a LOT more to this.
> 
> 1. Dual or multi-core CPUs add some complexity because all the CPUs share a
> common memory.   What if all four CPUs try to run the "test and set" at the
> same time?  Also, you can no longer assume an interrupt handler has
> exclusive use of memory.
> 2. what if the process uses two queues?  Process A might hold access to
> Queue X and process B holds Y and then each waits for the other process to
> release the other queue and the system deadlocks.
> 3. what if there are more than two processes?  How to ensure that access to
> the queue is fairly sharded between four or six users?
> 4.  What if the CPU you are using lacks a test and set instruction?
> 
> There are good solutions but today NO ONE has to solve these problems
> solutions were worked out 50 years ago.

I use: message queues, signaling mechanism, shared memory functions, 
semaphores. Then available and needed which is not always the case, if I spend 
some time I could add operating system on Micro controller if needed.

Today I get the feeling development is going away from quality to plenty of new 
progamming languages not adding to much new. Usually with dynamic typing and 
allocation on the heap with garbage collection as the only solution while I 
regard these as the last solution then others do not work. Static types and 
local variables is my first choice as long as they work which of course is not 
always the case.


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Real time data write to file, unexpected real time delay --> sampler, halsampler

2019-07-28 Thread Nicklas Karlsson
You are right, think the sampler, sampler_usr solved this properly. The simple 
Micro controllers I usually use is single core and no instruction reordering.

Software is usally also low complexity, instruction for atomic write and check 
might however be available, operating systems are available if needed and/but 
hardware interrupt is usually the choice because task i triggered byt hardware, 
it is very common to trigger task execution from PWM timer which make the 
interrupt handler a really good choice for the task then interrupt with 
priority is available.

> There is a LOT more to this.
> 
> 1. Dual or multi-core CPUs add some complexity because all the CPUs share a
> common memory.   What if all four CPUs try to run the "test and set" at the
> same time?  Also, you can no longer assume an interrupt handler has
> exclusive use of memory.
> 2. what if the process uses two queues?  Process A might hold access to
> Queue X and process B holds Y and then each waits for the other process to
> release the other queue and the system deadlocks.
> 3. what if there are more than two processes?  How to ensure that access to
> the queue is fairly sharded between four or six users?
> 4.  What if the CPU you are using lacks a test and set instruction?
> 
> There are good solutions but today NO ONE has to solve these problems
> solutions were worked out 50 years ago.
> 
> On Sat, Jul 27, 2019 at 10:22 AM John Dammeyer 
> wrote:
> ...
> > > > ...
> > > > I sometimes use similar scheme on Micro controller, read pointer
> > chasing
> > > a
> > > > write pointer. For atomicity I use read modify write of variable from
> > one
> > > > process only and assumed read/write of variable is atomic and as I use
> > > > interrupts with priority I also know one process may interrupt the
> > other
> > > > but not the opposite so I have been able to get by without disabling
> > > > interrupt. Reading process will always get either new or old value.
> > > >
> > > > Sampler, halsampler seems to work great though I get some problem with
> > > > overrun though a single missed value sometimes does not matter to
> > > much. I
> > > > think halsampler use a similar method, read pointer chasing a write
> > > > pointer. In case of full FIFO old value are overwritten which works
> > great.



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Real time data write to file, unexpected real time delay --> sampler, halsampler

2019-07-27 Thread Nicklas Karlsson
> ...
> But we are talking about a system that runs on an RTOS.Every RTOS I've
> seen provides some kind of queue for interprocess communication so the
> programmer does not have to worry about details like this.  It is really
> easy to get DIY queueing software wrong so it is best to use the
> well-debugged API provided by the OS.

There is some kind of queue for Linux RT patch but unfortunately I did not find 
the header files in the search path. sampler, sampler_usr works great so I use 
these. I few times I had problem with memory allocation which where solved by 
computer restart, have not looked why but would guess it happened because 
program aborted at wrong point the I did something wrong.


Regards Nicklas Karlsson


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Real time data write to file, unexpected real time delay --> sampler, halsampler

2019-07-27 Thread Nicklas Karlsson
On Fri, 26 Jul 2019 22:06:23 +1000
Erik Christiansen  wrote:

> On 22.07.19 18:48, Nicklas Karlsson wrote:
> > Algorithm data is filled in a round buffer and sending/saving process
> > should send/save the tail in not to small blocks. One counter for
> > filling and one for sending/saving should do the trick. Atomic
> > increment including overflow should solve the problem but as each
> > counter is updated by one process only I guess atomic read/write is
> > eough if properly done and I expect using an int will be atomic but
> > maybe there could be an ordering problem if CPU reorder instructions?
> > Or?
> 
> On and off over 30 years, I wrote multi-threaded telecommunications call
> control software, initially for trunk systems, then for PABX. It was
> embedded real-time, run for years without a reboot, and no dropped calls 
> allowed.
> 
> What worked for me there, for foolproof interprocess communication was a
> simple circular buffer with a read pointer chasing a write pointer. If
> same, it's empty, else data available. I always  wrote the buffer in
> assembler, and simplified circularity-wrapping by making its length a
> binary multiple and wrapping with a bitmask. Message packets were also
> of binary multiple length - often as little as 4 bytes.
> 
> Atomicity? I always disabled interrupts during a queue read or write.
> Those assembler functions took around 2.5 uS on a 20 MHz AVR ATmega, and
> half of that is context switching. The remainder included setting and
> clearing the semaphore which tells the consuming process whether there's
> anything in the buffer.

I sometimes use similar scheme on Micro controller, read pointer chasing a 
write pointer. For atomicity I use read modify write of variable from one 
process only and assumed read/write of variable is atomic and as I use 
interrupts with priority I also know one process may interrupt the other but 
not the opposite so I have been able to get by without disabling interrupt. 
Reading process will always get either new or old value.

Sampler, halsampler seems to work great though I get some problem with overrun 
though a single missed value sometimes does not matter to much. I think 
halsampler use a similar method, read pointer chasing a write pointer. In case 
of full FIFO old value are overwritten which works great.


Regards Nicklas Karlsson


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] ... unexpected real time delay --> HAL oscilloscope, logging method, sampler

2019-07-23 Thread Nicklas Karlsson
On Tue, 23 Jul 2019 05:38:13 -0400
Mark  wrote:

> On 7/23/19 05:27, Nicklas Karlsson wrote:
> >>
> > You are right why bother with DHCP then static IP adress work. I have done 
> > before but get the feeling someone removed the buttons in the newer user 
> > interface, I use debian and will figure it out.
> >
> > Did not think about it, HAL oscilloscope do logging, this must of course be 
> > the correct place to look.
> >
> >
> > Regards Nicklas Karlsson
> 
> 
> Yep. Static IP's are set and forget.  Low overhead, and you can use your 
> host files as your DNS and simplify things.

Just have to find the lost buttons. I found file sampler.[ch] do more or less 
what I want.


Nicklas Karlsson


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] ... unexpected real time delay --> HAL oscilloscope, logging method

2019-07-23 Thread Nicklas Karlsson
> > ...
> > In this case iptables is used to get exclusive access to the Ethernet port. 
> > I am sure it have worked before but think it have been with fixed IP adress.
> >
> >
> > Nicklas Karlsson
> 
> Why bother when a static IP address works and has a lot less system
> overhead, along with the latency of the packet filtering?  I'd stay
> away from iptables unless you really need to use it.

You are right why bother with DHCP then static IP adress work. I have done 
before but get the feeling someone removed the buttons in the newer user 
interface, I use debian and will figure it out.

Did not think about it, HAL oscilloscope do logging, this must of course be the 
correct place to look.


Regards Nicklas Karlsson


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Real time data write to file, unexpected real time delay (rt_fifo.h)

2019-07-22 Thread Nicklas Karlsson
On Thu, 18 Jul 2019 23:07:08 +0100
andy pugh  wrote:

> On Thu, 18 Jul 2019 at 22:01, Nicklas Karlsson 
> wrote:
> 
> > It seems by no suprise writing real time to data to file within real time
> > task have a negative impact on likelihood of real time delay.
> >
> 
> With RTAI and kernel modules I don't think that is is even possible.
> 
> I tried non blocking fcntl(...) function and O_NONBLOCK flag without
> > success. Adding some kind of buffer in for example shared memory between
> > written by real time task and let another lower priority task write is a
> > solution
> 
> 
> Take a look at how streamer and hal_streamer do exactly this.

I also found there already exist a real time implementation in "rt_fifo.h" but 
unfortunately I do not find among the include files on my hard drive so 
probably it's not part of the versin I have or I might be looking at the wrong 
place.

Nicklas Karlsson


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Real time data write to file, unexpected real time delay

2019-07-22 Thread Nicklas Karlsson
On Thu, 18 Jul 2019 23:07:08 +0100
andy pugh  wrote:

> On Thu, 18 Jul 2019 at 22:01, Nicklas Karlsson 
> wrote:
> 
> > It seems by no suprise writing real time to data to file within real time
> > task have a negative impact on likelihood of real time delay.
> >
> 
> With RTAI and kernel modules I don't think that is is even possible.
> 
> I tried non blocking fcntl(...) function and O_NONBLOCK flag without
> > success. Adding some kind of buffer in for example shared memory between
> > written by real time task and let another lower priority task write is a
> > solution
> 
> 
> Take a look at how streamer and hal_streamer do exactly this.

Output values are as I could tell round buffer and I guess the filling up 
mechanism works. I have round buffer implementation on micro controller filled 
up with high frequency and send several values at a lower priority. There are 
good margin for overfill so sending is more of fast enough in average. In case 
values are not sent in time oldest are overwritten and never sent and a counter 
to keep if this happen. On Micro controller I know high frequency may interrupt 
lower frequency but no the opposite.

Algorithm data is filled in a round buffer and sending/saving process should 
send/save the tail in not to small blocks. One counter for filling and one for 
sending/saving should do the trick. Atomic increment including overflow should 
solve the problem but as each counter is updated by one process only I guess 
atomic read/write is eough if properly done and I expect using an int will be 
atomic but maybe there could be an ordering problem if CPU reorder 
instructions? Or?


Regards Nicklas Karlsson


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] ... unexpected real time delay --> iptables: Permission denied (you must be root)

2019-07-22 Thread Nicklas Karlsson
On Mon, 22 Jul 2019 10:13:59 -0400
Mark Wendt  wrote:

> On Mon, Jul 22, 2019 at 10:05 AM Nicklas Karlsson
>  wrote:
> >
> > I discovered iptables where not used which might be part of the problem and 
> > more important since write to file is normally not used. I think the 
> > problem is I use DHCP but fixed manually entered IP-adress is needed, I use 
> > Debian if that make a difference, can anyone confirm this is the problem.
> 
> iptables not in use should not really be a problem.  When in
> operation, it's a packet filtering firewall, with it's associated
> overhead.  With iptables not running, you shouldn't see the associated
> overhead, nor should you see any blocking based on the packet
> filtering rules.

In this case iptables is used to get exclusive access to the Ethernet port. I 
am sure it have worked before but think it have been with fixed IP adress.


Nicklas Karlsson


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] ... unexpected real time delay --> iptables: Permission denied (you must be root)

2019-07-22 Thread Nicklas Karlsson
I discovered iptables where not used which might be part of the problem and 
more important since write to file is normally not used. I think the problem is 
I use DHCP but fixed manually entered IP-adress is needed, I use Debian if that 
make a difference, can anyone confirm this is the problem.


On Thu, 18 Jul 2019 23:07:08 +0100
andy pugh  wrote:

> On Thu, 18 Jul 2019 at 22:01, Nicklas Karlsson 
> wrote:
> 
> > It seems by no suprise writing real time to data to file within real time
> > task have a negative impact on likelihood of real time delay.
> >
> 
> With RTAI and kernel modules I don't think that is is even possible.
> 
> I tried non blocking fcntl(...) function and O_NONBLOCK flag without
> > success. Adding some kind of buffer in for example shared memory between
> > written by real time task and let another lower priority task write is a
> > solution
> 
> 
> Take a look at how streamer and hal_streamer do exactly this.
> 
> 
> -- 
> atp
> "A motorcycle is a bicycle with a pandemonium attachment and is designed
> for the especial use of mechanical geniuses, daredevils and lunatics."
> — George Fitch, Atlanta Constitution Newspaper, 1916
> 
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Real time data write to file, unexpected real time delay

2019-07-18 Thread Nicklas Karlsson
On Thu, 18 Jul 2019 23:07:08 +0100
andy pugh  wrote:

> On Thu, 18 Jul 2019 at 22:01, Nicklas Karlsson 
> wrote:
> 
> > It seems by no suprise writing real time to data to file within real time
> > task have a negative impact on likelihood of real time delay.
> >
> 
> With RTAI and kernel modules I don't think that is is even possible.
> 
> I tried non blocking fcntl(...) function and O_NONBLOCK flag without
> > success. Adding some kind of buffer in for example shared memory between
> > written by real time task and let another lower priority task write is a
> > solution
> 
> 
> Take a look at how streamer and hal_streamer do exactly this.

Yes. They do it with a FIFO and the FIFO is what I need.

Have done FIFO in embedded Micro controller with similar purpose before and 
used two "counters" to keep track of position within buffer, properly 
implemented I think it works perfect if it is known one process may interrupt 
the other but not the opposite as have been the case, if the FIFO get full 
oldest value is overwritten which in many cases is a good way to handle the 
situation in case there it not enough time available.


Nicklas Karlsson


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] Real time data write to file, unexpected real time delay

2019-07-18 Thread Nicklas Karlsson
It seems by no suprise writing real time to data to file within real time task 
have a negative impact on likelihood of real time delay.

I tried non blocking fcntl(...) function and O_NONBLOCK flag without success. 
Adding some kind of buffer in for example shared memory between written by real 
time task and let another lower priority task write is a solution. With a large 
enough real time demand will be lowered to fast enough in average and even 
though not proved to be fast enough it is very likely to work every time which 
is good enough. Or do anybody else have a better solution?


Regards Nicklas Karlsson


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] OT; Induction servo motor

2019-06-30 Thread Nicklas Karlsson
> On Sunday 30 June 2019 11:31:28 Nicklas Karlsson wrote:
> 
> > On Sun, 30 Jun 2019 10:39:27 -0400
> >
> > Gene Heskett  wrote:
> > > On Sunday 30 June 2019 06:18:24 Roland Jollivet wrote:
> > > > A while back there was some discussion on using an induction motor
> > > > as a servo motor. I can't find the thread..
> > > >
> > > > Yesterday, at the scrapyard I hauled two of these exact motors off
> > > > a roller press;
> > > > http://www.lithronix.com/komori/komorimatic-water-fountain-roller-
> > > >actu s-power-motor-rebuilt-ni20-200fg-x4kt
> > > >
> > > > I was quite disappointed to find out there was no permanent
> > > > magnets in them, and there were no matching drives.
> > > > So they are induction, but perhaps made differently to your
> > > > general induction motor.
> > > > It's a beast of a motor for 200W...At least they come with a
> > > > 1000 P/R encoder
> > >
> > > Since the link doesn't say how many wires go into the motor, if its
> > > 2 or 3 phase etc, its hard to make good guesses.
> > >
> > > If its a 3 wire motor, a small 250 volt input vfd would be a good
> > > driver, and I would couple the encoder up to feed back to the vfd,
> > > such that you'd have a position servo. You would need to program the
> > > vfd to not shut down at the lower frequencies, and to not deliver
> > > more than the 1.3 amps per winding even when the vfd thinks its
> > > detecting a locked rotor. The encoder, for a position servo would
> > > need to be something that could be converted to ABX because you'd
> > > need to record the home position as x counts from the index.  And
> > > I'd gate the z signal thru the home switch. Home by driving to the
> > > home sw closure, then track the counts to the z signal running in
> > > the same direction and call that home.
> > > ...
> >
> > Vector control is needed for fast dynamic response, it's a little bit
> > extra tricky for induction motor.
> >
> >
> > Nicklas Karlsson
> >
> How so, Nicklas? I am reverseing a normal 3 phase 1 hp century induction 
> motor thats probably 50 yo, fast enough to make the spindle belts yelp 
> in my 11x54 Sheldon. With a 1.5 hp rated clone vfd. Its sequenced 
> somewhat in my .hal file, basically by turning the vfd down to about 10 
> hz, then stopping it which puts dc on the windings, and when the encoder 
> says it is slow enough, gating the reversal on thru and ramping it back 
> up to speed. Makes the belts yelp but the vfd doesn't complain.

Well if you take your time it is possible to run, it's a simple algorithm and 
work well. Vector control is only needed then there is a need for fast and 
accurate response otherwise I also use simpler algorithm.


Nicklas Karlsson


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] OT; Induction servo motor

2019-06-30 Thread Nicklas Karlsson
On Sun, 30 Jun 2019 10:39:27 -0400
Gene Heskett  wrote:

> On Sunday 30 June 2019 06:18:24 Roland Jollivet wrote:
> 
> > A while back there was some discussion on using an induction motor as
> > a servo motor. I can't find the thread..
> >
> > Yesterday, at the scrapyard I hauled two of these exact motors off a
> > roller press;
> > http://www.lithronix.com/komori/komorimatic-water-fountain-roller-actu
> >s-power-motor-rebuilt-ni20-200fg-x4kt
> >
> > I was quite disappointed to find out there was no permanent magnets in
> > them, and there were no matching drives.
> > So they are induction, but perhaps made differently to your general
> > induction motor.
> > It's a beast of a motor for 200W...At least they come with a 1000
> > P/R encoder
> >
> Since the link doesn't say how many wires go into the motor, if its 2 or 
> 3 phase etc, its hard to make good guesses.
> 
> If its a 3 wire motor, a small 250 volt input vfd would be a good driver, 
> and I would couple the encoder up to feed back to the vfd, such that 
> you'd have a position servo. You would need to program the vfd to not 
> shut down at the lower frequencies, and to not deliver more than the 1.3 
> amps per winding even when the vfd thinks its detecting a locked rotor. 
> The encoder, for a position servo would need to be something that could 
> be converted to ABX because you'd need to record the home position as x 
> counts from the index.  And I'd gate the z signal thru the home switch. 
> Home by driving to the home sw closure, then track the counts to the z 
> signal running in the same direction and call that home.
> ...

Vector control is needed for fast dynamic response, it's a little bit extra 
tricky for induction motor.


Nicklas Karlsson


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] OT; Induction servo motor --> Micrel/Microchip Ethernet PHY KSZ8081

2019-06-30 Thread Nicklas Karlsson
> On Sun, Jun 30, 2019 at 8:21 AM Nicklas Karlsson <
> nicklas.karlsso...@gmail.com> wrote:
> 
> > > A while back there was some discussion on using an induction motor as a
> > > servo motor. I can't find the thread..
> >
> > You know howto get Micrel/Microchip Ethernet PHY KSZ8081 to auto negotiate
> > with each other and I give you some
> 
> 
> Forgive me but how is Micrel KSZ8081 related to AC induction motors?

Use it communicate with the servo motor.


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] OT; Induction servo motor --> Micrel/Microchip Ethernet PHY KSZ8081

2019-06-30 Thread Nicklas Karlsson
> A while back there was some discussion on using an induction motor as a
> servo motor. I can't find the thread..

You know howto get Micrel/Microchip Ethernet PHY KSZ8081 to auto negotiate with 
each other and I give you some more help?


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] OT; Induction servo motor

2019-06-30 Thread Nicklas Karlsson
On Sun, 30 Jun 2019 12:18:24 +0200
Roland Jollivet  wrote:

> A while back there was some discussion on using an induction motor as a
> servo motor. I can't find the thread..

I think I know how this should be done but had to fight it for a while. Now it 
seems performance is very good, maybe similar to a permanent magnet motor but I 
did not compare though good performance on higher rpm I am still a little bit 
uncertain about. I used a slightly different algorithm I did not find in 
books/articles that seems to work really well.

Some drives have vector control of induction motor but do not know performance 
of these.

> Yesterday, at the scrapyard I hauled two of these exact motors off a roller
> press;
> http://www.lithronix.com/komori/komorimatic-water-fountain-roller-actus-power-motor-rebuilt-ni20-200fg-x4kt
> 
> I was quite disappointed to find out there was no permanent magnets in
> them, and there were no matching drives.
> So they are induction, but perhaps made differently to your general
> induction motor.
> It's a beast of a motor for 200W...At least they come with a 1000 P/R
> encoder

1000 P/R is most probably good enough.


Nicklas Karlsson


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] Ethernet PHY KSZ8081, auto negotiation with others but not itself

2019-06-29 Thread Nicklas Karlsson
I have an Ethercat card there I choosed KSZ8081 as PHY, driver for Ethernet, 
datasheet with registers where not available for chip used in reference design 
BCM4251XA1KMLG and KSZ8081 is common so I expected it work.

It auto negotiate with others, ordinary computer, switch, other ethercat card 
but not other card with the same PHY KSZ8081. I could actually put ethercat 
cards with KSZ8081 closest to computer another ethercat card in between an 
ethercat card with KSZ8081 at the then and work counter say it is communication 
in between all three cards in the chain.

Registers suggest aut negotiation work, ack is sent but link up never occur. Do 
anybody have any idea?


Regards Nicklas Karlsson


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] LinuxCNC Processor

2019-06-13 Thread Nicklas Karlsson
> We've been discussing various kinds of modules to make a dedicated LinuxCNC 
> processor.
To run the real time part and put user interface on ordinary computer?


Nicklas Karlsson


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Increasingly OT: [Was: Re: How come.... --> Low voltage system --> cable price, copper expensive

2019-05-31 Thread Nicklas Karlsson
On Mon, 27 May 2019 20:44:59 -0700
Chris Albertson  wrote:

> The low volts significantly raise the cost.  I remember buying wire (some
> years ago) for a system on my sailboat and paying $5 per foot.

Copper is expensive so for cables higher voltage is cheaper.


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Increasingly OT: [Was: Re: How come.... --> battery safety due to high current, DC relay

2019-05-30 Thread Nicklas Karlsson
> Theoretically, yes, an inverter would then also have less I²R losses than
> at 48v. And there are 120v inverters ...

Yes but there might be difference in voltage drop for transistors then maximum 
current is lower. For an electric motor sum of currents is the same so then 
wind for a higher voltage current need to make more turns.


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Increasingly OT: [Was: Re: How come.... --> Low voltage system

2019-05-27 Thread Nicklas Karlsson
On Sun, 26 May 2019 13:07:51 -0400
Dave Cole  wrote:

> There are some good reasons to use a 24 or 48 volt DC bus power system 
> for smaller systems.
> The chance of electrocution is pretty low for a 48 volt DC system in a 
> dry environment.
> Once you get above 50 volts or so things change.

Yes stay below 50 volts is good for electrocution but fire may be a problem for 
higher power since current must be higher.

48 volt I think is standard in telecom and some electric fork lifts or similar 
use it.

> 
> 24 volts is quite a practical voltage level for smaller systems.

Have nothing to say against it.

> Do a search for 24 volt inverters and you will find many.   48 volt, not 
> as many.
> 
> I'm thinking hunting cabin, small cottage, larger boat, remote shed, etc.
> 
> Now if you want to do your entire house and have typical house loads it 
> seems like a 120V+ DC bus system would make more sense.

For entire house standard voltage is probably the solution but if there are 
high power loads with a rectifier choosing same or diode voltage drop above 
this might be a good choice.


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Control theory book by "Michael Blösch"

2019-05-22 Thread Nicklas Karlsson
The two page short hand notation I have seems to refer to different
chapters and at least at one point in text there is an explicit reference
to a chapter. Short hand notation is purely control theory without anything
refering to an application so I the conclusion it is very unlikely to come
from anything else than a book about control theory.

The list is impressive so to check the list of publications might be very
usful. It is a common problem authour look young on book but are old in
reality, I also slowly start to get the same problem.


Regards Nicklas Karlsson

Den tis 21 maj 2019 kl 23:41 skrev Stuart Stevenson :

> Heh, his name came up in the search results. I thought maybe the spelling
> was close enough to be the same man. It must be an old picture because he
> doesn't look old enough to have done everything he has listed. Maybe the
> book you are looking for is one of his.
>
> On Tue, May 21, 2019, 3:33 PM Nicklas Karlsson <
> nicklas.karlsso...@gmail.com>
> wrote:
>
> > In doubt, the list impressive and seems he have used control theory in
> > many applications but it should most probably a book about control theory
> > in general. I have only two pages with summation of many of the useful
> > things then using state feedback but no title, these pages of however
> looks
> > promising for a good book. Even though I used control theory in practice
> > there is a few things then using state feedback I do not yet fully
> > understand.
> >
> >
> > > Don't know if this is the same guy but this gentleman seems to have a
> > > background in control theory.
> > >
> > > https://scholar.google.com/citations?user=fn6GhgoJ=en
> > >
> > >
> > >
> > > On Tue, May 21, 2019, 7:10 AM Nicklas Karlsson <
> > nicklas.karlsso...@gmail.com>
> > > wrote:
> > >
> > > > I have two pages from some kind of book in control theory, it is a
> > short
> > > > summary. In the properties I find the name of author is "Michael
> > Blösch" do
> > > > anybody about this author so I could find the book?
> > > >
> > > >
> > > > Regards Nicklas Karlsson
> > > >
> > > > ___
> > > > Emc-users mailing list
> > > > Emc-users@lists.sourceforge.net
> > > > https://lists.sourceforge.net/lists/listinfo/emc-users
> > > >
> > >
> > > ___
> > > Emc-users mailing list
> > > Emc-users@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/emc-users
> >
> >
> > ___
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
> >
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Control theory book by "Michael Blösch"

2019-05-21 Thread Nicklas Karlsson
In doubt, the list impressive and seems he have used control theory in many 
applications but it should most probably a book about control theory in 
general. I have only two pages with summation of many of the useful things then 
using state feedback but no title, these pages of however looks promising for a 
good book. Even though I used control theory in practice there is a few things 
then using state feedback I do not yet fully understand.


> Don't know if this is the same guy but this gentleman seems to have a
> background in control theory.
> 
> https://scholar.google.com/citations?user=fn6GhgoJ=en
> 
> 
> 
> On Tue, May 21, 2019, 7:10 AM Nicklas Karlsson 
> wrote:
> 
> > I have two pages from some kind of book in control theory, it is a short
> > summary. In the properties I find the name of author is "Michael Blösch" do
> > anybody about this author so I could find the book?
> >
> >
> > Regards Nicklas Karlsson
> >
> > ___
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
> >
> 
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] Control theory book by "Michael Blösch"

2019-05-21 Thread Nicklas Karlsson
I have two pages from some kind of book in control theory, it is a short
summary. In the properties I find the name of author is "Michael Blösch" do
anybody about this author so I could find the book?


Regards Nicklas Karlsson

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Semaphores, from real time --> background process

2019-05-20 Thread Nicklas Karlsson
> > I need a semaphore or similar to signal from periodic task initialization
> > is needed. The concept of semaphores are weel known for me but in Linuxcnc
> > I found several implements, ordinary posix, rt_sem, rcs_sem_t. Any idea
> > which "implementation" is best to use?
> >
> 
> I have no idea, but I did find this (very old) example:
> https://github.com/LinuxCNC/linuxcnc/tree/master/src/rtapi/examples/semaphore

I decided standard posix sem_ini(...) sem_wait(...) sem_getvalue(...) 
sem_post(...) was a good idea ant it works great. As is now it is only used to 
put device in operational mode but it should also be able to handle non real 
time communication then there is a need or good idea to insert into the message 
sent periodically. Do not know how the rtapi_ semaphore is implemented but 
maybe tommorow I get an hour to look at it.


Nicklas Karlsson


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Unusual help request.

2019-05-19 Thread Nicklas Karlsson
> On Sun, 19 May 2019, Davide wrote:
> 
> > Date: Sun, 19 May 2019 16:26:26 +0200
> > From: Davide <77...@tiscali.it>
> > Reply-To: "Enhanced Machine Controller (EMC)"
> > 
> > To: Emc-users@lists.sourceforge.net
> > Subject: [Emc-users] Unusual help request.
> > 
> > Hi, I have a strange setup to solve. So I'm asking you an help, on the top 
> > of your knowledge (sorry for any language mistake) Some time ago I have 
> > built an inverted wire tetrapod, which was made by 4 winches placed at a 
> > max 
> > distance of 20 meters one each other in a rectangular shape. So until now 
> > it 
> > was ok to have a 48v 20A DC power supply and a parallel bob near my pc (an 
> > asrock q1900b-itx), and transmit step/dir signals thru ethernet cables to 
> > the stepper drivers inside the winches.
> >
> > Now I have to modify that to make a very little object fly inside a soccer 
> > arena, so the motors will be placed at 80 meters one each other, and i'm 
> > really worried that a step every 10 will arrive to the drivers, if any at 
> > all.. The further motor will be at 150mt if I'm lucky..
> >
> > An idea can be a mesa ethernet card, but I should use 4 of them, so I'm 
> > asking you if you think is possible to make 4 of them work with linuxcnc?
> >
> > Another can be convert in some way step dir signals to optic fiber 
> > transport. But i couldn't find anything to buy.
> >
> > Any other suggestion?
> > Thanks, Davide.
> >
> 
> 
> 150 meters is no problem for 100 KHz RS-422 (Spec is 1220 meters at 100 KBPS 
> ~= 50K steps/second) So just using good line drivers/ receivers should be fine
> It may even work with differential drivers and normal opto-isolated step 
> motor 
> drives driven differentially

You might also need terminators to avoid reflections.


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Unusual help request.

2019-05-19 Thread Nicklas Karlsson
On Sun, 19 May 2019 08:47:42 -0700
"John Dammeyer"  wrote:

> What's the maximum step rate you are using?   Depending on the rate you can 
> probably use either RS485 drivers/receivers or CAN bus transceivers. The 
> RS485 is true differential while the CAN bus is pseudo differential relative 
> to ground but good to 1Mbps.
> 
> In both cases, inside shielded twisted pair, those distances aren't a big 
> issue.CAN bus drivers require 120 Ohm impedance cable.   RS485 can use 
> cheaper 100 Ohm impedance cable.  Properly terminating each end with the 
> cable impedance (120 Ohm at each end for CAN, 100 Ohm at each end for RS485) 
> will result in a clean step/dir set of signals.

In doubt about requirements on cable impedance. For CAN bus drivers there 
should 120ohm terminator resistor on both ends. RS-485 is a little bit diffent, 
you most certainly find if you search on internet.


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] How come.... --> battery safety due to high current, DC relay

2019-05-19 Thread Nicklas Karlsson
> > For safety I learned relays fail open circuit while MOSFETs fail short
> > circuited, I also experienced MOSFET short circuit failure. Happen to
> > know anything more about this?
> >
> It is for this reason that higher current dc loads, which will often be 
> inductive are often of the t-bar design. The armature, when released 
> will rise and hit the crossbar contact with enough force to break the 
> microweld, but even that isn't trusted, so I've seen circuits that used 
> a 4 pole contactor with all 4 poles in series.

Tried two in series with buzzing sound sometimes but do not care to much about 
it since it's only temporary.

Maybe AC is a better choice then using relays?

> I'm sure you've all seen the familiar flywheel diode placed across the 
> relay coil to prevent the inductive spike when turning off the relay, 
> from rising more than a volt or two above the supply voltage, it is 
> absorbing the relay coils currant during the turn off period, preventing 
> the transistor from being over voltaged by the inductance and punched 
> thru for a permanent short.

Yes I also added this diode for myself.

> This also delays the relays release by a 
> few milliseconds. If controlled by a relay, the circuit should be 
> expected to have a few milliseconds of lag anyway.

How fast current decrease depend on resistance and should be possible to make 
this time shorter by for example adding zener diode or resistor in series with 
diode with a higher but limited turn off voltage spike.

> Modern mosfets can often withstand 1000 volts or more for short periods 
> of time, so a lot of research has gone into mosfet _drivers_ to do 2 
> things, 1st being to switch it as fast as possible to reduce its heat 
> dissipation during the transition,

This is indeed important for low switching losses.

> and 2nd to get the opposite side of a 
> switching circuit turned on just slow enough you don't have a short 
> because both sides are on at the same time, but you must get the 
> opposite side turned on with a minimum of dead time between them to 
> short circuit the voltage stress on the one just turned off. 5ns can 
> make or destroy in this case. The diff is that it works for decades, or 
> you break the mirror and let all the smoke out.

The dead time may add some voltage distortion and some devices have lower 
voltage drop then turned on, otherwise current is thru free wheeling diode.


Nicklas Karlsson


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] Semaphores, from real time --> background process

2019-05-19 Thread Nicklas Karlsson
I need a semaphore or similar to signal from periodic task initialization is 
needed. The concept of semaphores are weel known for me but in Linuxcnc I found 
several implements, ordinary posix, rt_sem, rcs_sem_t. Any idea which 
"implementation" is best to use?


Nicklas Karlsson


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] How come.... --> battery safety due to high current, DC relay

2019-05-19 Thread Nicklas Karlsson
On Fri, 17 May 2019 20:23:57 +1000
Erik Christiansen  wrote:

> On 16.05.19 21:18, Nicklas Karlsson wrote:
> > > ...
> > > I'd put the battery bank in an outbuilding.  If something shorts out and 
> > > the battery bank melts down, the little building may burn but my house 
> > > won't.
> > 
> > There certainly is a lot of power from a byttery and it could be a
> > little bit hard to turn off. You put a fuse at battery cable?
> 
> If local regulations do not require a HRC (High Rupture Capacity) fuse
> between the battery bank and any connection to it, then it's an
> invitation to disaster. A dc arc is much more difficult to extinguish,
> because there are no zero crossings, and molten metal can end up flowing
> on the floor.

I got the feeling DC arc is much hard to extinguish but found no good 
information about it. Then reading about how welding should be done and EDM I 
learned then air i ionized resistance get lower, in practice I know it is often 
hard to ignite the weld while it work for some distance then lit. I suspect and 
get the feeling then welding not the least from the ignition problem some 
distance could be kept then lit distance to keep air ionized depend on current, 
happen to anything about this?

> Small HRC fuses are generally in ceramic tubes, and are sand-filled, to
> quench the arc when the element fuses. The one I have on the desk beside
> me is a 100 A with a 100 kA (100,000 A) arc rupture capacity, but it's
> 27x44x49 mm, and is overkill. Just 10 times AH rating seems to be normal,
> i.e. 2000 A rupture capacity for a 200 AH bank. (The fault current will
> be limited by battery internal resistance.)
> 
> > I also think DC relays have to be a little bit different than AC
> > relays, used an ordinary AC relay for a few few days connected to a DC
> > voltage and even though two switches is connected in series it
> > sometimes make a buzzing sound then turned off.
> 
> Most relays and switches are marked with both AC and DC current ratings.
> The DC rating is always much lower, due to the difficulty of rupturing a
> DC arc. Rather than bother with maintenance/replacement due to contact
> deterioration after many switching cycles, I prefer to switch DC loads
> with MOSFETs - they're easy to parallel, as the inherently share.

Agree, as is evindent furher up in message.

For safety I learned relays fail open circuit while MOSFETs fail short 
circuited, I also experienced MOSFET short circuit failure. Happen to know 
anything more about this?


Regard Nicklas Karlsson


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Lead acid batteries --> Redox flow batteries

2019-05-18 Thread Nicklas Karlsson
On Fri, 17 May 2019 14:17:26 -0700
Chris Albertson  wrote:

> Have you run the numbers?  What do they cost per KWH over 10 years?   The
> cost of each battery is meaningless.
> The "price to beat" right now is about $500  (the cost to buy and maintain
> over 10 years in dollars/KWH)
> 
> THose Telco batteries do last a LONG time because the telcos NEVER
> discharge them but at 50% discharge they get about 500 cycles which is
> REALLY good compared to most LA batteries.   But in this use case --
> storing solar power they will see one cycle per day and a 500 cycle
> battery will not last two years.
It might be worth looking a redox flow batteries, if they are available in 
suitable size somewhere. I think number of cycles and service life is good but 
did only spent a minute or so looking. I would expect they are a particularly 
good solution for long discharge/charge cycles but suspect short bursts of high 
power would be a problem.


Nicklas Karlsson


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] How come....

2019-05-16 Thread Nicklas Karlsson
> ...
> I'd put the battery bank in an outbuilding.  If something shorts out and 
> the battery bank melts down, the little building may burn but my house 
> won't.

There certainly is a lot of power from a byttery and it could be a little bit 
hard to turn off. You put a fuse at battery cable? I also think DC relays have 
to be a little bit different than AC relays, used an ordinary AC relay for a 
few few days connected to a DC voltage and even though two switches is 
connected in series it sometimes make a buzzing sound then turned off.


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] Beagle bone, AM3358 Sitars, PRUs, (Seems to have the ordinary peripherals)

2019-05-15 Thread Nicklas Karlsson
I looked into the manual for the datasheet/manual for PRUs in Beagle bone 
AM3358 Sitara. It have one Cortex-A8 and two PRUs which are 200Mhz Risc 
processors. Beside some things usuaully not available in micro controllers it 
have very similar peripherals as an ordinary Microcontroller although maybe a 
little bit more of them than usual. It have three HRPWM units, these are 
usually useful for power supplies running at a few hundred kHz or so and may be 
used also for servo motors but most probably have a lot more resolution than 
needed.

I do not think PWM or UART are made in software then using these devices 
because the harware is there and it would be a rather hard or impossible task 
at least then running a few peripherals at the same time.

It is indeed a really good device but software PWM I do not believe as the 
hardware for is already there.


Regards Nicklas Karlsson


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Atomic pi --> software PWM

2019-05-14 Thread Nicklas Karlsson
> ...
> I have written machine code for the Bone's PRU for special 
> applications.  It is GREAT having a 32-bit CPU that can 
> toggle I/O pins in 5 ns. ...
I have done software toggling then no or not enough timers where available and 
consider real timers better, they are cheap so no reason to skip them for this. 
Some programmable logic might had been a good choice and or some peripherals 
like timers.


Nicklas Karlsson


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] How come.... Batteries

2019-05-14 Thread Nicklas Karlsson
Redox flow batteries might be a cheaper alternative. It might be likely not all 
available charging cycles are used for a long lasting battery. 20 cent per kWh 
hour, price for electricity I found in USA is in the range 7 - 23 cents per 
kWh, with an array on roof storage cost might be if you are unlucky storage 
come cost close to bying electricity. I have done calculations there storage 
cost for generated energy where higher than buying new electricity.


On Tue, 14 May 2019 10:36:42 -0700
Chris Albertson  wrote:

> If you are building a battery-based power system and space and weight are
> not issues then what you should care about is the "total watt-hours per
> dollar".
> 
> Here is an example,... You have a 100 amp-hour lead-acid battery at 12
> volts.  If it is lead-acid then you can only discharge to 50% if you want a
> reasonable lifetime.If it is a cheap batery it might last only 100
> charge cycles.   so 50% x 100 cycles x 100 amp-hours x 12 volts is 60 KWH.
>The cheap battery might cost $100 to you pay  $1.60 per KHW for battery
> power based on the replacement cost of the battery.  You can buy a higher
> quality battery for more money but your cost is going to be between $1 and
> $2. per KWH
> 
> So the cost of the battery power is 4 to 8 times high than the cost of
> power from the utility company.
> 
> But what if you buy higher quality batteries?
> 
> A Tesla "Power Wall" cost $6,800 (They used to be $10K)  it is a 13 KW
> capacity and is good for more than 3,000 charge cycles and is actually
> warrantied for 10 years.   It is maintenance free for 10 years.   Use with
> a waentry you have an incentive to use it for the full 3,650 cycles.
> Lets assume you only cycle it 3,000 times. That is under 20 cets per
> KHW for battery power.  It is dramtically cheaper then lead acid.
> 
> This is why Tesla is selling b'zillions fo power wall systems.   If you do
> care about space, these Power Wall units cn be mounted to an exterior wall
> and actually look attractive.
> 
> 
> 
> 
> 
> 
> On Tue, May 14, 2019 at 9:32 AM Dave Cole  wrote:
> 
> > I've been planning to put up an array on my roof.  But I have plenty of
> > space so I may do a ground level install.
> > It would be a lot easier to maintain.
> >
> > FLA batteries seem to be the general recommendation for a constant use
> > residential install.
> >
> > I've had chargers trash batteries when they failed.  I sure wouldn't
> > want that to happen to $10K worth of Lithium batteries!
> >
> > Weight isn't an issue.
> >
> > Dave
> >
> >
> >
> > On 5/9/2019 10:37 PM, Erik Christiansen wrote:
> > > On 09.05.19 10:24, Dave Cole wrote:
> > >> Erik,
> > >>
> > >> Do you have a blog going on your build?
> > >
> > > Now that's an idea. All I've started is the seeds of an article for
> > > "Owner Builder" magazine - the editor was interested when we last spoke.
> > >
> > >> I'd be very interested in your solar and battery setup for your off-grid
> > >> home.
> > > The existing home, from the 1950's & extended, only has a little 2 kW
> > > petrol generator. The new roof which will carry the solar arrays goes up
> > > in June, if the framing carpenters turn up on time. (Just off the phone
> > > to 'em half an hour ago.) There's 6 or 7 kW of equator-facing panels,
> > > but the west-facing hipped roof can only take 9 panels, so only 2.5 kW
> > > or so - but still enough to keep pace with a modest aircon.
> > >
> > > The best trick for allowing high power consumption straight from the
> > > arrays, yet limiting battery charge rate to permissible maximum, is to
> > > use a hybrid inverter - they're beginning to become more available now.
> > > The Redflow ZnBr battery has a limited max charge rate (44A), and pretty
> > > much any other does too, e.g. 20A/100AH of capacity for LiFePO4. The
> > hybrid
> > > inverter looks after that while delivering to load first.
> > >
> > > I like the Redflow, as it's a long-life unit, unkillable by 100%
> > > discharge. It does though need that once a fortnight to regenerate, so
> > > it can be handy to have another battery. For off-grid, just one 10 kWh
> > > battery is maybe enough for one occupant, but a second is great for
> > > visitors from the city. But the reflow is about A$14k (US$10k), so I've
> > > even been looking at old technology like NiFe. They're also robust, but
> > > can drink a lot of distilled water, emit quite a bit of hydrogen, and
> > > put out a bit of mist. About 80% energy recovery is common for a lot of
> > > battery chemistries, these included. Li-Ion, or better LiFePO4, are
> > > better efficiency-wise, but cycle life on deep discharge is less. Do
> > > your machining in sunlight, and only run lights, computers, tv, and a
> > > microwaved egg sanger at night, then they'll do well enough, I reckon -
> > > certainly long enough for a better technology to reach a better price.
> > >
> > > We know from laptops that Li-Ion loses capacity with age. The ZnBr unit
> > > is claimed to retain 

[Emc-users] motmod, servo period (sometimes run to often), catchup?

2019-05-04 Thread Nicklas Karlsson
If servo thread dead line is missed it try to catch this up later?


Nicklas Karlsson


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] motmod, servo period (sometimes run to often)

2019-05-04 Thread Nicklas Karlsson
Then I set servo period to 1 000 000 ns = 1 ms sometimes it is run more than 3 
times as often as supposed to. As I understand servo thread is run by motmod 
and period is set is a parameter. Do anybody have an idea what might be wrong?


Nicklas Karlsson


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] possibly good news for LinuxCNC (Fieldbus)

2019-04-22 Thread Nicklas Karlsson
Adding fieldbus support is without doubt something which really useful. I use a 
PLC at my workplace and it support several protocols, think it is: CANopen, 
Profibus, Ethercat, some other Ethernet, Modbus.

> Maybe this will be the icing on the cake for LinuxCNC to make the jump to 
> 3.0?
> 
> 
> 
> Hopefully this will re-introduce real time control to a 64 bit kernel.
> 
> Cheers, Gene Heskett


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Hardware emcmot?

2019-04-12 Thread Nicklas Karlsson
I have been thinking in similar paths, there is NML communication between
parts. Then trying to separate I got the impression maybe real time part
work but axis did not work properly. I also get the impression real time
performance have gotten better for ordinary Linux run on ordinary computer
which would make separating less useful but still good.

Den fre 12 apr. 2019 kl 02:48 skrev bari :

> My dream would be "broadcon" going out of business ending all the Rpi crap.
>
> A big bag of cash falling from the sky over all the LCNC devs homes.
>
> Someone putting effort into 4+ axis open source CAM or other useful
> software.
>
> On 4/11/19 7:42 PM, Danny Miller wrote:
> > Well, what I would ideally picture is a realtime hardware motion
> > controlled coupled to a Raspberry PI running Linux non-RT, the PI is
> > hooked to a PC and has an embedded http server.  At that point you
> > access it via browser and load and control control your job from the
> > PC interface.  estop etc is still on the hardware.  At that point it
> > does not matter if you use Windows or Linux.
> >
> > Danny
> >
> > On 4/11/2019 7:19 PM, bari wrote:
> >> I disagree. The problem is making the machine configuration easy. If
> >> LCNC ran on Winders or Androids, many would still complain about how
> >> difficult it is to configure. Active High vs Low for Limit switches,
> >> Home switches, Step and Dir signals, encoder pulses per rev. etc etc is
> >> far to challenging for many to deal with.
> >>
> >> On 4/11/19 2:41 PM, Chris Albertson wrote:
> >>> If the machine controler could run on a me=aintstream OS (like
> >>> Windows 10)
> >>> and on a normal notebook PC it would be orders of magnitude more
> >>> popular
> >>> and widly used
> >>
> >>
> >> ___
> >> Emc-users mailing list
> >> Emc-users@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/emc-users
> >>
> >
> >
> > ___
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
>
>
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] SPI comms for linuxcnc (was Re: Rock64 pre-orders on Banggood.) --> CPU + Ethercat + FPGA/CPLD but no PRU

2019-03-31 Thread Nicklas Karlsson
A CPU with Ethernet and a builtin FPGA/CPLD to implement the SPI ports would 
probably be a very good device for an SPI router, probably also very cheap. 
Packets could routed to ordinary computer running Linuxcnc as is today or split 
so that real time part is in the simple device. It is not to different from a 
PLC I have on my workplace, it is mounted on a din rail without any user 
interface except a reset start/stop/reset button, there is an Ethernet 
connecter used for the programming, it is also possible to connect user 
interface if needed but I have not investigated how it communicate.


I remember someone here talked about someone implementing PWM on a PRU. I did 
on an ordinary Micro controller once, I guess code could be reused but I do not 
want to do it again. A timer with compare registers plus a few other things 
usually available in micro controllers is really good at this.


On Thu, 28 Mar 2019 08:05:26 +0700
TJoseph Powderly  wrote:

> Gene hello
> 
> 
> 
> On 03/27/2019 08:13 PM, Gene Heskett wrote:
> > On Wednesday 27 March 2019 08:12:48 TJoseph Powderly wrote:
> >
> >> ( list apology, I seem to have replied to posters rather than to the
> >> list, and several times :-(
> >>
> >> re SPI comms Linuxcnc SBC microcontrollers ...
> >>
> >> it has been said on this mail list,
> >> that SPI is a good candidate for a bus technology to work _with_
> >> realtime.
> >>
> >> heres some work in that vein (maybe overlooked)
> >>
> >> yeltrow's work:
> >> a generic spi hal module so you can use other SPI devices ( rpi,
> >> arduino, mcp23s17, ENC28J60, theres a lot of spi stuff to hang onto
> >> such a bus )
> >> https://www.forum.linuxcnc.org/24-hal-components/28851-spi-bus-generic
> >> -driver-and-st-l6480
> >>
> > Interesting driver for the big stuffs. However, I wonder if yeltrow is
> > aware of rpspi.ko, now part of LCNC.  Not parport based but gpio,
> > written specificly for the rpi3b.  And I'm using it, writing to a Mesa
> > 7i90 at 42 megabaud, and reading back from the 7i90 at 25 megabaud
> > useing only 4 gpio pins for 2 or 3  target devices.
> I dont find source rpspi.c in my sources.
> cant google it except to find messages from you.
> 
> My RIP source tree is DGarr's external offset branch.
> 
> I dont have raspi.kp either.
> 
> Where are these files?
> 
> The files I was speaking of were generic spi utilities,
> not RPi to Mesa communication modules,
> They were attempts to make SPI available on any hardware platform to any 
> SPI device.
> They are attempts only ( one uses a parport but i guess that could be 
> altered to gpio )
> But from the parport, the author connects to many different SPI devices.
> 
> What file builds rpspi.ko ?
> 
> Maybe its private/unpublished work from Matsche ?
> 
> I cant find it on https://github.com/LinuxCNC/linuxcnc either.
> 
> Plz lemmeno
> TomP
> > Perusal of that code might be of help to yeltrow. gpio seems to be about
> > 10x faster than trying to simulate SPI over a parport.  The 7i90 has
> > both modes depending on the firmware loaded.
> >
> >> the files are on the forum for members linuxcnc-upload-2015-12-03.tar
> > So this work handily predates rpspi.ko. Still, theres obviously things to
> > be learned from the rpi version.
> >
> >> erste's work:
> >> for ethernet circumventing usb ( via spi
> >> interesting as spi and ethernet seem to be future avenues
> >> http://erste.de/ethraw/README
> >>
> >> theres other efforts but less coupled to the spi grail
> >>
> >> tomp
> >>
> >>
> >> ___
> >> Emc-users mailing list
> >> Emc-users@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/emc-users
> > Cheers, Gene Heskett
> 
> 
> 
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] SPI comms for linuxcnc (was Re: Rock64 pre-orders on Banggood.)

2019-03-30 Thread Nicklas Karlsson
> Thats another problem, can a comp have its own modules?
> Like, can a generic SPI host comp have specific client sub-comps?
> How to talk to different devices with same protocol?

I am using CANopen also over SPI but only implemented enough to get it working. 
There are SDO with acknowledge which may be used for configuration, they are 
sent with acknowledge. For real time there is PDOs which may be sent 
periodically.

> I cant right now, I'm attempting python calls to use the MCP23s17 i/o,
> its slow and non-realtime if I cant swing it, but for buttons, relays 
> and lights, thats ok.
> 
> BTW: Theres 2 spi buses on the rpi3b
> one SPI0 has 2 chip selects the other has 3 SPI1.

That's enough for a few cheap boards with high bit rate.


Nicklas Karlsson


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] SPI comms for linuxcnc (was Re: Rock64 pre-orders on Banggood.)

2019-03-27 Thread Nicklas Karlsson
On Wed, 27 Mar 2019 11:53:52 -0700
Chris Albertson  wrote:

> I think in this current context we are talking about distances of not much
> more than 10 centimeters. The signal would go from a GPOI header to a
> real-time controller like an FPGA or uP.   In typical use cases, SPI and
> I2C never leave the PCB and don't go over cables, although it could
> especially in one-off prototype work

That's right. Over longer distances something else is most certainly a better 
choice and maybe even if crossing an isolation barrier. Short distance with a 
maximum of a few devices fast and cheap.


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] SPI comms for linuxcnc (was Re: Rock64 pre-orders on Banggood.) --> protocol?

2019-03-27 Thread Nicklas Karlsson
> ...
> But if writing software you should not have to decide of lock in a certain
> communications method.   I like whatht ehauthors is ros-serial did, that
> w=said "Use any communications method that has these four fuctions: open,
> close, read, write.  THat pretty much means anything from a network socket
> to an RS232 cable.

It's nice to have some kind of common message format and that's why I am 
looking on CANopen.


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] SPI comms for linuxcnc (was Re: Rock64 pre-orders on Banggood.)

2019-03-27 Thread Nicklas Karlsson
On Wed, 27 Mar 2019 19:12:48 +0700
TJoseph Powderly  wrote:

> ( list apology, I seem to have replied to posters rather than to the 
> list, and several times :-(
> 
> re SPI comms Linuxcnc SBC microcontrollers ...
> 
> it has been said on this mail list,
> that SPI is a good candidate for a bus technology to work _with_ realtime.

Maybe not as a bus but chip select between devices over a short distance work. 
Isolation is possible but delay may cause problem at high speed. If drivers are 
kept close together and there are not to many of them which likely to be the 
case it is a good candidate.

CANopen is available for ordinary CAN networks and over Ethercat. SDO protovol 
may be a very good candidate for configuration to get a more or less standard 
format, *.eds files may be used as a standard dictionary format, expedited 
transfer of up to 32 bit at a time is relatively simple to implement, to add a 
sequence number might be a good idea so that severel messages could be on the 
the they thru the system but for configuration to wait a short while is OK 
since there usually only is a need for a few numbers. I have som code is 
somenone need it. PDOs are simple if harcoded, mapping and communication 
parameters are harder but may not be needed for a working system.

SPI is very common on Micro controllers, cheap and fast but only over very 
short distances, there certainly are limitations.

> heres some work in that vein (maybe overlooked)
> 
> yeltrow's work:
> a generic spi hal module so you can use other SPI devices ( rpi, 
> arduino, mcp23s17, ENC28J60, theres a lot of spi stuff to hang onto such 
> a bus )
> https://www.forum.linuxcnc.org/24-hal-components/28851-spi-bus-generic-driver-and-st-l6480
>  
> 
> the files are on the forum for members linuxcnc-upload-2015-12-03.tar
> 
> erste's work:
> for ethernet circumventing usb ( via spi
> interesting as spi and ethernet seem to be future avenues
> http://erste.de/ethraw/README
> 
> theres other efforts but less coupled to the spi grail
> 
> tomp
> 
> 
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


-- 
Nicklas Karlsson 


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Mister/Coolant --> health problem

2019-03-25 Thread Nicklas Karlsson
> Just spent 2-3 years wondering why I kept getting sick so often and sometimes
> coughing for 3-4 hours a day. (I'm a non smoker and otherwise healthy) I spent
> most of the weekend machining aly blocks with coolant splashing all over the
> place on a knee mill and on Sunday night felt really sick. Finally the penny
> dropped, it is the coolant in the air I was breathing in that was the cause.
> The realization only came as I was doing 2 x 8 hour days machining which
> exacerbated the problem. 
> 
> I was booked in to see a immunologist next week for the coughing but I think I
> found the source of the problem. There could be 2 issues, the composition of
> the soluble oil or bacteria growth in the sump. The sump is a separate 60
> litre tank and is clean but I'm getting a bacteria test done on it now.  
> 
> This the reading that struck a cord. See here
> 
> https://www.osha.gov/SLTC/metalworkingfluids/metalworkingfluids_manual.html#e
> 
> Look at Respiratory Diseases. 
> 
> I may not be the only one this has happened to. 
> 
> Cheers Wallace.

My neighbor once warned me about zink fever then I was welding galvanized 
steel. Lead my have long term cognivitive effects but I have not seen any 
unusually stupid questions here. I have done forest work and conclude real work 
is not healthy.


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] CANopen configuration files, CiA 309-3 --> battery charing like home brewn mash, nothing about CiA 309-3?

2019-03-19 Thread Nicklas Karlsson
On Sun, 17 Mar 2019 19:03:07 -0400
Gene Heskett  wrote:

> On Sunday 17 March 2019 17:56:02 Nicklas Karlsson wrote:
> 
> > > ...
> > > So once every 1/2 second a message starting with 0x40A shows up on
> > > the bus and everyone sees it.  The Charger and in this case also a
> > > small display are the only ones interested in it.   The charger uses
> > > the information to set charge on/off, voltage and current.  The
> > > display grabs the information and shows what the current charge
> > > voltage and max current are set to.
> > >
> > > The charger also reports in a different message what it measures for
> > > battery voltage and what the current charge current is and it
> > > reports if it's enabled.  That's all identified by the Object
> > > Dictionary entries at 18xx and 1Axx.
> >
> > I am familiar with CANopen communication and also to some degree
> > battery charging. The old style open Lead-acid batteries should bubble
> > like home brewn mash before they are done.
> >
> Fraid not Nik. And this is TL;DR, but read it anyway. LA batteries might 
> bubble gently when being heavily charged, but every bubble is 
> electrolite lost forever and its hard on the plates.

You have to refill.

> Someone in the distant past at kxne-tv had put a 10 amp charger on a pair 
> of 220 AH truck batteries with a 47 ohm 5 watt resistor in series, so 
> they were getting about 600 ma as a trickle charge into the two of them 
> in parallel. So they were boiling at a good rate. ...

You have to stop then they bubble like home brewn mash, at least after a while. 
They should not bubble during trickle charge.

> ... Since it was 
> started weekly for a 15 minute dry run, it never needed that charger in 
> the first place.


> > CiA 309-3 is to access a CANopen device over TCP/IP and as I added it
> > could be used to access dictionary of devices connected to Linuxcnc.

Nobody have anything to mention about CiA 309-3?


Nicklas Karlsson


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] CANopen configuration files, CiA 309-3 --> battery charging

2019-03-19 Thread Nicklas Karlsson
> The worst thing thats happened to te life of a LA battery in the last 50 
> years has been the incorporation of the regulator into the alternator, 
> adding the resistance of the cable which softens the curve a lot, and 
> the relatively quick heating of the alternator.  Way faster than the 
> battery. Late vehicles are doing good to get 4 years out of a battery.  
> The wife's 2007 toy RAV4 is on its 4th battery now, and I don't believe 
> the acid has ever gotten up to 1.26 SG even after a 600 mile trip to FL, 
> or a 435 mile trip to NY from here. She has kin in both places she'll 
> never see again unless they come to us.

It might be good to bubble batteries a little bit to get acid circulating but 
driving the car probably have the same effect. I vaguely remember someone 
mentioned something about putting asphalt on gravel, flat enough surface and 
there are no circulating then driving.


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] CANopen configuration files, CiA 309-3

2019-03-19 Thread Nicklas Karlsson
> Nicklas, as soon as a lead-acid battery bubbles, it's losing water and 
> the plates cover with lead sulphate, increasing capacity and intrinsic 
> resistance. No, no.

You have to stop then then the lead-acid battery bubble like home brewn mesh.

> I got myself a handful of cheap 74N137 stabilizers. These are made 
> espacially by Motorola to maintain a constant charging voltage of 13.7 V 
> which is the exact limit before the gassing occurs. The current they 
> deliver is limited to 1 A. I placed them inside the housing of several 
> 12 V DC wall warts together with a small electrolytic capacitor. The 
> transformers of these little power supplies give more than 15 V AC so 
> there is enough headroom for regulating.
> Using those chargers the batteries of my vehicles are kept in perfect 
> shape all winter and in summer, too, when the tractor is not in use. I 
> have been using them for years now.
> Peter

It also works, there is a small change with temperature but can't remember 
exactly.


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] CANopen configuration files, CiA 309-3

2019-03-17 Thread Nicklas Karlsson
> ...
> So once every 1/2 second a message starting with 0x40A shows up on the bus 
> and everyone sees it.  The Charger and in this case also a small display are 
> the only ones interested in it.   The charger uses the information to set 
> charge on/off, voltage and current.  The display grabs the information and 
> shows what the current charge voltage and max current are set to.
> 
> The charger also reports in a different message what it measures for battery 
> voltage and what the current charge current is and it reports if it's 
> enabled.  That's all identified by the Object Dictionary entries at 18xx and 
> 1Axx.

I am familiar with CANopen communication and also to some degree battery 
charging. The old style open Lead-acid batteries should bubble like home brewn 
mash before they are done.


CiA 309-3 is to access a CANopen device over TCP/IP and as I added it could be 
used to access dictionary of devices connected to Linuxcnc.


Nicklas Karlsson


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] CANopen configuration files, CiA 309-3

2019-03-17 Thread Nicklas Karlsson
> > > Not all devices allow changing the PDO Mapping entries. ...
Then adding pin it does not matter how mapping was created though it is of 
course good with configuration options to configure mapping if needed, at least 
some PLCs do it like this.

> For example let's take a look at an object dictionary for a RPDO:  Here I 
> read each of the RPDO3 OD locations of Node 0x1A.
> ###6###,19/03/10,10:55:34,r,0A,1402:00,05,(5) We have 
> 5 entries
> ###6###,19/03/10,10:55:36,r,0A,1402:01,041A,( 1050)   It 
> responds to 0x41A
> ###6###,19/03/10,10:55:39,r,0A,1402:02,FF,(255)   
> Processed immediately
> ###6###,19/03/10,10:55:41,r,0A,1402:03,,(0)   No 
> inhibit time
> ###6###,19/03/10,10:55:44,r,0A,1402:04,06090011,(101253137)   Invalid read 
> error
> ###6###,19/03/10,10:55:46,r,0A,1402:05,,(0)   Event 
> timer is not used
> ###6###,19/03/10,10:55:57,r,0A,1602:00,03,(3) The 
> RPDO will have three values
> ###6###,19/03/10,10:56:08,r,0A,1602:01,60710010,( 1618018320) The first two 
> bytes go to 0x6071:00
> ###6###,19/03/10,10:56:11,r,0A,1602:02,60010008,( 1610678280) The next byte 
> goes to 0x6001:00
> ###6###,19/03/10,10:56:15,r,0A,1602:03,22720020,( 577896480)  The last 4 
> bytes go to 0x2272:00

0x1600 - 0x17FF are RPDO pins and end up as input pins.
0x1400 - 0x15FF are communication parameters and these may require som more 
thinking.

Read out these mapping and adding pins should be rather simple but naming is a 
little bit more complicated. Without an *.eds or *.dcf file for CAN networks or 
an esi? *.xml file for Ethercat pins adding pins which end with the (index, 
subindex) numbers are probably a good choice.

I suspect there will be cases then manually accessing the dictionary of devices 
is useful and discovered I already added a probably incomplete implementation 
of CiA 309-3 ASCII server in the linuxcnc driver. This may be used to read what 
is needed from dictionary and for configuration using the manual and/or a 
*.eds/*.dcf or esi *.xml file if available.


I did not find binary protocol. Do anybody know about a configuration tool 
which use or may use an CiA 309-3 gateway for communication? Or parse 
dictionary files?


Nicklas Karlsson


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] STM32 Blue Pill

2019-03-11 Thread Nicklas Karlsson
> About the ICE, all ARM processors have hardware debuggers built-in.
>   This helps a LOT with the case you described where you must
> debugging in the field.   Just any notebook PC and a USB cable.

Debugger for ARM is good. Trace function is really good then available, 
printf(...) is often very useful.


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] STM32 Blue Pill --> Microchip pin configuration

2019-03-11 Thread Nicklas Karlsson
> Too true.  The level of support for Microchip still exceed many of the other 
> systems.  Having said that I'd still rather use MPLAB-8 compared to MPLAB-X 
> but I can see why Microchip had to go in that direction. ...

I remember Microchip Micro controllers have a lot more freedom then it come pin 
configuration. There signal should be used it is selected where it should come 
from. Many if not almost all others have chosen the opposite direction and 
there are collisions.


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] STM32 Blue Pill

2019-03-11 Thread Nicklas Karlsson
> ...
> I upgraded the System Workbench for STM32 on my WIN-7 system and tried for 
> over an hour to create a simple Hello World Project.  It's been years since I 
> touched the ST family. ...

Now I think think it work really well but remember I had to struggle a while 
before.

I prefer the new LL drivers instead of the old HAL drivers but my programs are 
usually rather simple. I consider none of them really good. If compiler worked 
well registers should be a structure and there would be a warning if a value 
was uninitialized then higher level could be implemented on top of this but 
even going for a higher level programming there is always the problem if a bit 
is there are not.


Nicklas Karlsson


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Cheap vs expensive solar Re: OT: Where's them fires. [Was: Re Conversational mode.

2019-03-11 Thread Nicklas Karlsson
On Mon, 11 Mar 2019 09:19:48 + (UTC)
Gregg Eshelman via Emc-users  wrote:

> This guy in Australia tested a cheap $90 100 watt panel and one that cost a 
> lot more. The $90 panel significantly out performed the expensive 
> panel.https://www.youtube.com/watch?v=3-sc4rlV93g 

I think there are mono crystalline and poly crystalline but do not remember for 
sure.


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] CANopen configuration files

2019-03-10 Thread Nicklas Karlsson
I got problem, parameter value is not assigned then rtapi_app_main(...) 
function is called. The is the usual problem, I have to sleep and go to work 
tommorow.

On Sun, 10 Mar 2019 12:45:06 -0700
"John Dammeyer"  wrote:

> 
> 
> > -Original Message-----
> > From: Nicklas Karlsson [mailto:nicklas.karlsso...@gmail.com]
> > On Sun, 10 Mar 2019 09:45:02 -0700
> > "John Dammeyer"  wrote:
> > 
> > > Not all devices allow changing the PDO Mapping entries.  Some of them
> > first require setting the unit into a programming mode.  Then you write to
> > those locations.  Then send a save command.  On power up the device fills
> > them in itself.   You need to use SDOs to change those locations so you will
> > get back an RDO that shows success or failure.
> > > Others don't let you change them at all.
> > 
> > It will work as long as the mapping entries are possible to read. For
> > meaningful names and it is also neccessary to read an eds file, otherwise
> > there will be only numbers.
> 
> Well yes and no.
> For example let's take a look at an object dictionary for a RPDO:  Here I 
> read each of the RPDO3 OD locations of Node 0x1A.
> ###6###,19/03/10,10:55:34,r,0A,1402:00,05,(5) We have 
> 5 entries
> ###6###,19/03/10,10:55:36,r,0A,1402:01,041A,( 1050)   It 
> responds to 0x41A
> ###6###,19/03/10,10:55:39,r,0A,1402:02,FF,(255)   
> Processed immediately
> ###6###,19/03/10,10:55:41,r,0A,1402:03,,(0)   No 
> inhibit time
> ###6###,19/03/10,10:55:44,r,0A,1402:04,06090011,(101253137)   Invalid read 
> error
> ###6###,19/03/10,10:55:46,r,0A,1402:05,,(0)   Event 
> timer is not used
> ###6###,19/03/10,10:55:57,r,0A,1602:00,03,(3) The 
> RPDO will have three values
> ###6###,19/03/10,10:56:08,r,0A,1602:01,60710010,( 1618018320) The first two 
> bytes go to 0x6071:00
> ###6###,19/03/10,10:56:11,r,0A,1602:02,60010008,( 1610678280) The next byte 
> goes to 0x6001:00
> ###6###,19/03/10,10:56:15,r,0A,1602:03,22720020,( 577896480)  The last 4 
> bytes go to 0x2272:00
> 
> The user manual for this battery charger lists 0x6001 as the charger enable.
> Location 0x6071 is a 16 bit signed scaled value of Charger Set Current.
> Location 2272 is a 32 bit signed scaled value of Charger Set Voltage.
> 
> All of these locations are R/W and as long as the charger receives a 
> heartbeat from the CANopen Master.  Rather than send three SDO messages with 
> corresponding RDO replies  they are all packed into one PDO.
> 
> These values in the PDO configuration are normally set by the factory 
> including the NodeID 0x1A.  A USB dongle is plugged into it to configure 
> firmware upgrades, configuration and set the node ID.  An EDS file isn't 
> required.  But is really interesting when captured by the right kind of tool 
> such as one from port.de
> 
> ; This EDS file was created by the CANopen Design Tool 2.2.47.0.
> ; port GmbH Halle/Saale Germany, http://www.port.de, mailto:serv...@port.de
> 
> This tool can query a CANopen device and create a complete map of what is 
> what.  Of course you'd still have to know what is in 6071 and what the 
> scaling would be and the OD doesn't tell you that.
> 
> Here's a command to the charger from my system master as reported in logging 
> mode.
> Tx141A77301010070
> Broken apart it's 
> Tx1 41A 7 7301 01 0070
> 
> Tx1 means 11 bit ID transmitted from Channel 1
> 41A is the 11 bit ID for node 0x1A
> There are 7 bytes
> The first data value is 0x0173 and from above that's a scaled current setting
> The second data value is 0x01 which means the charger is enabled.
> The third data value is 0x7000 which is a scaled voltage setting.
> 
> This is all just done with a tool that reads from the CAN bus and formats the 
> output knowing that the messages are CANopen.  Once you know how the stuff is 
> organized any CANopen module is like an open book.
> 
> John Dammeyer
> http://www.autoartisans.com
> 
> 
> 
> 
> > 
> > Nicklas Karlsson
> > 
> > 
> > ___
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
> 
> 
> 
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


  1   2   3   4   5   6   7   8   9   >