Re: [Emc-users] RPI saga continues - SPI probably solved

2017-06-01 Thread Gene Heskett
On Thursday 01 June 2017 19:46:29 Bertho Stultiens wrote:

> On 06/01/2017 02:13 AM, Gene Heskett wrote:
> > Hi Bertho; I haven't heard any more, so I am wondering if you've
> > found any more "magic beans"?
>
> Yes, I think I've tracked down (most of) the problem(s). There are
> several factors that play a role. Not all are solved or maybe
> solvable, but the timing is much more stable, and very fast most of
> the time.
>
>
> Problem 1:
> The RPI3 has dynamic frequency scaling activated by default (ondemand
> governor). This makes the Pi hop between 600MHz and 1.2GHz core
> frequency. Very annoying and makes realtime rather unpredictable.
>
> Add a line to /etc/rc.local:
>   echo -n performance >
> /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
>
> This will disable the frequency hopping on boot and lock the cores to
> 1.2GHz.
>
Done but not rebooted for effect.
>
> Problem 2:
> The SPI peripheral input frequency appears to be hopping between
> 400MHz and about 250MHz. This probably originates somewhere in the
> Linux kernel as the kernel is in charge of clock-generation.
>
> Changing the cpu's frequency scaling governor to "performance" makes
> the clock more stable, hanging out at 400MHz most of the time, but
> I've seen lower frequencies once in a while. The spidev driver
> actually reads the (peripheral) clock frequency before a transfer
> starts and sets the divider for each transfer. However, I have, at
> this moment, no clue how to read the clock setting in userspace. This
> is a currently a minor issue and should not give rise to major
> problems.
>
>
> Problem 3:
> The hm2_rpspi driver was miscalculating the clock-divider by
> statically setting it to 8. This results in 50MHz SPI clock (400/8),
> which is what we've been seeing. The 32MHz clock is the also explained
> by the peripheral clock switching to ~250MHz.
>
> The code is now changed to do the calculation correct and is
> configurable with a module parameter "spiclk_rate" to set the clock
> (in kHz) and defaults to 33000kHz.
>
> It should be noted that the clock divider must be an even number,
> resulting in frequencies of 200MHz, 100MHz, 66.6MHz, 50MHz, 40MHz,
> 33.3MHz, 28.5MHz, 25MHz, etc.. down to 6.1kHz.
>
>
> Problem 4:
> The hm2_rpspi driver was missing memory barriers in the peripheral
> write/read operations. This resulted in inconsistencies. The code now
> uses memory barrier instructions to ensure consistency.
>
Sounds for sure like it ought to be more stable.
>
> I also unified the driver-code a bit and fixed some other problems I
> could see. It should be functional. The SPI transfers are faster now
> too. I've removed the inter-word delays by using the device's FIFO
> properly. The chip-select latency is also minimal (factor 2..3 better
> than spidev), but it can vary a bit if a (scheduling) interrupt delays
> ending the transfer. The cookie-read is done in 5.7us versus 16.5us
> using spidev.
>
>
> Attached are the changed files. The .c and .h file are the modified
> driver. These go in the source-tree at
> "~/linuxcnc-git/src/hal/drivers/mesa-hostmot2/" (after copy do cd into
> src and do make etc). The .hal and .ini files are the modified configs
> for the sheldon lathe, adding the frequency configuration parameter,
> and go in "~/linuxcnc/configs/sheldon-lathe/".
>
> Try the changes if you will.
I'll take a look. But when I had assembled the board stack and was 
checking it out while sitting on the table saws table, I had to spend a 
day sorting the .hal file out, it looked like I had last edited it with 
gedit, and I am glad I had a printout dated the 10th so I could restore 
it. gedit is a major screwup looking for a place to happen. I 
blacklisted it over a year ago as it scrambles the contents of a file 
around pretty reliably, so I've been using geany ever since.  Yeah, it 
has some warts, but  nothing to compare to gedits open boils.  Kate or 
Kwrite might be ok, but I could never fall in love with either.

ATM, I have hit a bad path thru the 7i90 to the direction output from the 
pwmgen.0 on gpio-21 to pin p1-43, thence thru the 7i42TA, its stuck on 
ground, meaning if I had power on the vfd, it would be running the motor 
backwards, so first thing tomorrow I have to remove at least 2 of the 
7i42TA's to get under them, and after putting a bad card marker on it  
try another 7i90 as I must have built it with a bad card I had 
previously blown.

I need to ask Peter if he repairs them, and if so how much $.  Seems I am 
doing it in wholesale qty's, or I picked up the wrong card, I have 4 
here, and I know for sure 3 are damaged.  Power on the vfd & stepper 
drivers is next. 

But I'm hoping the 7i42TA's will solve the blown 7i90 problem.

> I'm trying to build a new SD card with X 
> installed, but you should not stay awake for it to be finished (upload
> alone of the compressed images takes already 3..4 hours).

Ouch.

Thank you Bertho.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense 

Re: [Emc-users] RPI saga continues - SPI probably solved

2017-06-01 Thread Bertho Stultiens
On 06/01/2017 02:13 AM, Gene Heskett wrote:
> Hi Bertho; I haven't heard any more, so I am wondering if you've found 
> any more "magic beans"?

Yes, I think I've tracked down (most of) the problem(s). There are
several factors that play a role. Not all are solved or maybe solvable,
but the timing is much more stable, and very fast most of the time.


Problem 1:
The RPI3 has dynamic frequency scaling activated by default (ondemand
governor). This makes the Pi hop between 600MHz and 1.2GHz core
frequency. Very annoying and makes realtime rather unpredictable.

Add a line to /etc/rc.local:
  echo -n performance >
/sys/devices/system/cpu/cpufreq/policy0/scaling_governor

This will disable the frequency hopping on boot and lock the cores to
1.2GHz.


Problem 2:
The SPI peripheral input frequency appears to be hopping between 400MHz
and about 250MHz. This probably originates somewhere in the Linux kernel
as the kernel is in charge of clock-generation.

Changing the cpu's frequency scaling governor to "performance" makes the
clock more stable, hanging out at 400MHz most of the time, but I've seen
lower frequencies once in a while. The spidev driver actually reads the
(peripheral) clock frequency before a transfer starts and sets the
divider for each transfer. However, I have, at this moment, no clue how
to read the clock setting in userspace. This is a currently a minor
issue and should not give rise to major problems.


Problem 3:
The hm2_rpspi driver was miscalculating the clock-divider by statically
setting it to 8. This results in 50MHz SPI clock (400/8), which is what
we've been seeing. The 32MHz clock is the also explained by the
peripheral clock switching to ~250MHz.

The code is now changed to do the calculation correct and is
configurable with a module parameter "spiclk_rate" to set the clock (in
kHz) and defaults to 33000kHz.

It should be noted that the clock divider must be an even number,
resulting in frequencies of 200MHz, 100MHz, 66.6MHz, 50MHz, 40MHz,
33.3MHz, 28.5MHz, 25MHz, etc.. down to 6.1kHz.


Problem 4:
The hm2_rpspi driver was missing memory barriers in the peripheral
write/read operations. This resulted in inconsistencies. The code now
uses memory barrier instructions to ensure consistency.


I also unified the driver-code a bit and fixed some other problems I
could see. It should be functional. The SPI transfers are faster now
too. I've removed the inter-word delays by using the device's FIFO
properly. The chip-select latency is also minimal (factor 2..3 better
than spidev), but it can vary a bit if a (scheduling) interrupt delays
ending the transfer. The cookie-read is done in 5.7us versus 16.5us
using spidev.


Attached are the changed files. The .c and .h file are the modified
driver. These go in the source-tree at
"~/linuxcnc-git/src/hal/drivers/mesa-hostmot2/" (after copy do cd into
src and do make etc). The .hal and .ini files are the modified configs
for the sheldon lathe, adding the frequency configuration parameter, and
go in "~/linuxcnc/configs/sheldon-lathe/".

Try the changes if you will. I'm trying to build a new SD card with X
installed, but you should not stay awake for it to be finished (upload
alone of the compressed images takes already 3..4 hours).

-- 
Greetings Bertho

(disclaimers are disclaimed)
/*This is a component for RaspberryPi to hostmot2 over SPI for linuxcnc.
 *Copyright 2016 Matsche 
 *Copyright 2017 B.Stultiens 
 *
 *This program is free software; you can redistribute it and/or modify
 *it under the terms of the GNU General Public License as published by
 *the Free Software Foundation; either version 2 of the License, or
 *(at your option) any later version.
 *
 *This program is distributed in the hope that it will be useful,
 *but WITHOUT ANY WARRANTY; without even the implied warranty of
 *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *GNU General Public License for more details.
 *
 *You should have received a copy of the GNU General Public License
 *along with this program; if not, write to the Free Software
 *Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

/* Without Source Tree */
#undef WOST

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

#include "hal.h"
#include "rtapi.h"
#include "rtapi_app.h"

#include "rtapi_stdint.h"
#include "rtapi_bool.h"
#include "rtapi_gfp.h"

#include "rtapi_bool.h"

#if defined (WOST)
#include "include/hostmot2-lowlevel.h"
#include "include/hostmot2.h"
#else
#include "hostmot2-lowlevel.h"
#include "hostmot2.h"
#endif

#include "spi_common_rpspi.h"

MODULE_LICENSE("GPL");
MODULE_AUTHOR("Matsche");
MODULE_DESCRIPTION("Driver for HostMot2 devices connected via SPI to RaspberryPi");
MODULE_SUPPORTED_DEVICE("Mesa-AnythingIO-7i90");

#define MAX_BOARDS	1		// FIXME: Cannot be other than 1; need CE_0/CE_1 

Re: [Emc-users] Semi OT: Chinese servo motors Yifeng branded

2017-06-01 Thread Leonardo Marsaglia
Thank you guys.

I asked to the seller for manuals or any kind of documentation to start.
Then may be I give it a try and purchase a little one to test it out and
see how it works.

I'll let you know whatever happens.



2017-06-01 4:50 GMT-03:00 theman whosoldtheworld :

> something i buy servo from china ... there are 3 possibility:
>
> 1) the seller send all kit Delta brand (motor+drive+cable)
> 2) the seller send Delta Drive but china motor
> 3) the seller may be is a guy that buy by Hong Kong import office, whitout
> tax, and sell the goods on ebay.
>
> In my experience china motor is quite good, not excellent but good.
> SOmetime you can intercept some mitsubishi old or new contractor so the
> motor is really good. Some time you can intercepts other european/americans
> contractor, so the drive is very good. Normally in motor side you find
> yaskava quality (in china yaskawa motor layout is well know & copy).
>
> But you are buying from ebay ... so that the Chinese seller is not that it
> is particularly encouraged to be correct.
>
> Any how delta is good choice and in iTALY THE PRICE IS EQUAL TO THE PRICE
> ON EBAY + EBAY TRANSPORT COST + LOCAL TAX. So if you buy on ebay you pay:
> 755USD + 20-70USD transport cost by air + 755*1.22 as local tax + import
> tax 10-50USD = 1000-1200USD more or less  so for 1-3 pcs is not a good
> businnes ... choice a local (italian, france, portuguese ... as eusurplus
> sites ... seller) seller, more or less same price, + good assitance.
>
> bkt
>
> 2017-06-01 1:20 GMT+02:00 Chris Albertson :
>
> > The very first step in making a decision should be to download the user
> > manual for the Yifeng product and see if it really is what you need.
>  That
> > table does not have enough information.   Then if you find there is no
> user
> > manual, is the product cheap enough that you can buy samples and test
> them?
> >
> > I'm going through the same issue with smaller stepper motors about 1/3rd
> > the size of the Delta you linked to.  The best lowest price product might
> > even be good, might even be made in the same factory as the brand name
> but
> > no usable documentation so there is no way to know other than buying
> > samples
> >
> >
> > On Wed, May 31, 2017 at 11:46 AM, Leonardo Marsaglia <
> > leonardomarsagli...@gmail.com> wrote:
> >
> > > Hello to all.
> > >
> > > Looking for a good but cheap servo motor I came across an Ebay user
> from
> > > China that sells two brands mainly. One is Delta, wich I really trust
> and
> > > I've used their products. The other one is Yifeng wich is a lot cheaper
> > > than delta but I don't know anything about them.
> > >
> > > I attached a PDF with the prices of the Yifeng combos (servo+´drive)
> but
> > I
> > > don't have the list with the prices of the Delta brand. Anyway just to
> > have
> > > an idea here is a link to a Delta servo from this user on Ebay:
> > >
> > > http://www.ebay.com/itm/1-5KW-Delta-B2-AC-Servo-Motor-
> > > Driver-220V-Set-Kit-ECMA-E21315RS-ASD-B2-1521-B-/191559765539?hash=
> > > item2c99da0e23:g:pwYAAOSwzaJX7bhj
> > >
> > > And a similar servo motor and drive of the Yifeng brand is more or less
> > > USD352 (You can take a look at the PDF attached)
> > >
> > > So what do you think? The user seems of trust judging by the feedbacks
> he
> > > has.
> > >
> > > My doubt is if this Yifeng brand are worth a try. I can firmly say the
> > > Delta ones are a very good product.
> > >
> > > Thanks as always!
> > >
> > > --
> > > *Leonardo Marsaglia*.
> > >
> > > 
> > > --
> > > Check out the vibrant tech community on one of the world's most
> > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> > > ___
> > > Emc-users mailing list
> > > Emc-users@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/emc-users
> > >
> > >
> >
> >
> > --
> >
> > Chris Albertson
> > Redondo Beach, California
> > 
> > --
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> > ___
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
> >
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>



-- 
*Leonardo Marsaglia*.
--
Check out the vibrant tech community on one of the 

Re: [Emc-users] Simulations In Master?

2017-06-01 Thread Todd Zuercher
Perhaps a spoke too soon about it all working.

Linuxcnc started with my config using the new sim_parport but I'm running into 
a few bugs.
I don't know if the problem is my config, or a bug in Master.

The config is a 4 axis XYZW config, with only XYZW and joints 0,1,2,3 defined. 
(I really like the way the JA configuration works by the way, much nicer than 
before.)

The problems, when I first start the machine If I try to jog the W nothing 
happens, and this is printed to in the terminal window.

Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1437, in __call__
return self.func(*args)
  File "/usr/bin/axis", line 2498, in jog_minus
speed = get_jog_speed(a)
  File "/usr/bin/axis", line 1733, in get_jog_speed
if joint_type[a] == 'LINEAR':
IndexError: list index out of range

If I then try to issue an MDI command to move the W (which doesn't work since I 
didn't bother trying to make the sim config home-able)
then I can jog the W axis fine (no messages in the terminal window either).

Then after a bit the whole VM seems to freeze up.  I haven't been able to track 
down any clues about the freeze up yet. 

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Simulations In Master?

2017-06-01 Thread Todd Zuercher
I'm not sure that there are any.  I'll have to check what does and doesn't 
show.  I do know that the normal example configs with 1 port run fine in the VM 
(VirtualBox).


- Original Message -
From: "Sebastian Kuzminsky" 
To: "Enhanced Machine Controller (EMC)" 
Sent: Thursday, June 1, 2017 4:30:44 PM
Subject: Re: [Emc-users] Simulations In Master?

On 06/01/2017 01:22 PM, Todd  Zuercher wrote:
> I was trying to convert one of my machine configs to test with Master. 
> Testing in a VM.
>
> I've ran into a couple of snags though. The machine uses 3 parallel ports, 
> two of them in X-mode, and one as Out.
> When I try to run the config I get:
> Error: could not insert module 
> /usr/realtime-3.4-9-rtai-686-pae/modules/linuxcnc/hal_parport.ko: No such 
> device

Do you have three parallel ports enabled on your VM?  Does the linux 
parport driver see them?


-- 
Sebastian Kuzminsky

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Simulations In Master?

2017-06-01 Thread Todd Zuercher

Thanks Andy, I made a new component (sim_parport2) and that seemed to work.  
Perhaps someone should put a revised version of sim_parport in the main release.

- Original Message -
From: "andy pugh" 
To: "Enhanced Machine Controller (EMC)" 
Sent: Thursday, June 1, 2017 3:56:07 PM
Subject: Re: [Emc-users] Simulations In Master?

On 1 June 2017 at 20:22, Todd  Zuercher
 wrote:
> Any suggestions?

It's a very simple comp.
https://github.com/LinuxCNC/linuxcnc/blob/master/src/hal/components/sim_parport.comp
So adding the extra pins needed should be trivial.

(I can't help feeling that it could be an awful lot shorter too, using the
pin in bit pin_##_in [15] format and just living with there being some
pins that don't actually exist)

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

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Simulations In Master?

2017-06-01 Thread Sebastian Kuzminsky

On 06/01/2017 01:22 PM, Todd  Zuercher wrote:

I was trying to convert one of my machine configs to test with Master. Testing 
in a VM.

I've ran into a couple of snags though. The machine uses 3 parallel ports, two 
of them in X-mode, and one as Out.
When I try to run the config I get:
Error: could not insert module 
/usr/realtime-3.4-9-rtai-686-pae/modules/linuxcnc/hal_parport.ko: No such device


Do you have three parallel ports enabled on your VM?  Does the linux 
parport driver see them?



--
Sebastian Kuzminsky

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Simulations In Master?

2017-06-01 Thread andy pugh
On 1 June 2017 at 20:22, Todd  Zuercher
 wrote:
> Any suggestions?

It's a very simple comp.
https://github.com/LinuxCNC/linuxcnc/blob/master/src/hal/components/sim_parport.comp
So adding the extra pins needed should be trivial.

(I can't help feeling that it could be an awful lot shorter too, using the
pin in bit pin_##_in [15] format and just living with there being some
pins that don't actually exist)

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

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] Simulations In Master?

2017-06-01 Thread Todd Zuercher
I was trying to convert one of my machine configs to test with Master. Testing 
in a VM. 

I've ran into a couple of snags though. The machine uses 3 parallel ports, two 
of them in X-mode, and one as Out. 
When I try to run the config I get: 
Error: could not insert module 
/usr/realtime-3.4-9-rtai-686-pae/modules/linuxcnc/hal_parport.ko: No such 
device 
And if I try to convert the config to use sim_parport, I get: 
./Dig1.hal:73: Pin 'parport.0.pin-01-in-not' does not exist 

So apparently my VM won't start a config with 3 parallel ports (it will start 
the demos with only 1). 
And sim_parport doesn't work with X-mode parallel port configurations. 

Any suggestions? 
-- 

 

Todd Zuercher 
mailto:zuerc...@embarqmail.com 

 
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] emc2 openProfibus

2017-06-01 Thread Nicklas Karlsson
Right now I design away from Ethernet within machine because with my computer 
and switches and it does not work perfect. Whatever the reason is I simply 
can't do anything about it.



On Thu, 1 Jun 2017 10:32:27 -0700
Chris Albertson  wrote:

> Modern Ethernet does not have a collision problem.  It uses a switched
> topology.  All of the cables are point to point.  One end is on your device
> the other is on a switch.  The switch has enough performance and bandwidth
> to drive all cables at full wire speed.
> 
> The switch adds very little latency.  Modern switches (if they can) do not
> buffer the entire Ethernet packet as the older first generation switches
> did.  They now will read the packet header and pick off the "to" address
> then cut the bits over to the correct outbound cable.
> 
> For sending data to 18 different motors, Ethernet would work fine,  Use a
> 24 port switch.
> 
> I have a small robot arm that is controlled by 7 channels of PWM.   I use a
> single chip device that has 16 PWM output pins and uses i2C input. Cost is
> under $5   It would be easy to use two of these chips but the resolution is
> poor   I can control the PWM duty cycle only to about one part in a
> thousand.  The over the bus protocol is defined by the chip maker and I
> have no choice but to use that.
> 
> 
> 
> On Thu, Jun 1, 2017 at 12:04 AM, Nicklas Karlsson <
> nicklas.karlsso...@gmail.com> wrote:
> 
> > > If Ethernet is "complex" then PowerLink is "very complex" as it is a few
> > > layers over top of Ethernet.
> > >
> > > Is there a list of requirements some place?   What are the end points,
> > > processes that run on a CPU of some kind.
> > >
> > > I've been doing this kind of work for ages but you can't select anything
> > > without a detailed set of requirements
> >
> > It is rather simple to send or receive via UDP/IP or TCP/IP for example
> > via Ethernet. UDP/IP is one way packets. TCP/IP send acknowledge which add
> > bandwidth requirement in the opposite direction. To make sure packets
> > within a particular time period may however be harder.
> >
> > Then sending point to point over an ordinary serial channel like UART or
> > SPI data usually arrive practically instantly and there are no collisions.
> > UART or SPI is also very cheap. Software for simple point to point may also
> > be very simple. A bus have huge advantages then it come to number of nodes
> > but there may be collisions.
> >
> > Even though collisions are a small problem to make it work perfect during
> > periodic communication may be surprisingly hard while for a simple serial
> > channel it is no problem at all.
> >
> >
> > Regards Nicklas Karlsson
> >
> > 
> > --
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> > ___
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
> >
> 
> 
> 
> -- 
> 
> Chris Albertson
> Redondo Beach, California
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] emc2 openProfibus

2017-06-01 Thread Chris Albertson
Modern Ethernet does not have a collision problem.  It uses a switched
topology.  All of the cables are point to point.  One end is on your device
the other is on a switch.  The switch has enough performance and bandwidth
to drive all cables at full wire speed.

The switch adds very little latency.  Modern switches (if they can) do not
buffer the entire Ethernet packet as the older first generation switches
did.  They now will read the packet header and pick off the "to" address
then cut the bits over to the correct outbound cable.

For sending data to 18 different motors, Ethernet would work fine,  Use a
24 port switch.

I have a small robot arm that is controlled by 7 channels of PWM.   I use a
single chip device that has 16 PWM output pins and uses i2C input. Cost is
under $5   It would be easy to use two of these chips but the resolution is
poor   I can control the PWM duty cycle only to about one part in a
thousand.  The over the bus protocol is defined by the chip maker and I
have no choice but to use that.



On Thu, Jun 1, 2017 at 12:04 AM, Nicklas Karlsson <
nicklas.karlsso...@gmail.com> wrote:

> > If Ethernet is "complex" then PowerLink is "very complex" as it is a few
> > layers over top of Ethernet.
> >
> > Is there a list of requirements some place?   What are the end points,
> > processes that run on a CPU of some kind.
> >
> > I've been doing this kind of work for ages but you can't select anything
> > without a detailed set of requirements
>
> It is rather simple to send or receive via UDP/IP or TCP/IP for example
> via Ethernet. UDP/IP is one way packets. TCP/IP send acknowledge which add
> bandwidth requirement in the opposite direction. To make sure packets
> within a particular time period may however be harder.
>
> Then sending point to point over an ordinary serial channel like UART or
> SPI data usually arrive practically instantly and there are no collisions.
> UART or SPI is also very cheap. Software for simple point to point may also
> be very simple. A bus have huge advantages then it come to number of nodes
> but there may be collisions.
>
> Even though collisions are a small problem to make it work perfect during
> periodic communication may be surprisingly hard while for a simple serial
> channel it is no problem at all.
>
>
> Regards Nicklas Karlsson
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>



-- 

Chris Albertson
Redondo Beach, California
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] RPI saga continues - SPI probably solved

2017-06-01 Thread Bertho Stultiens
On 06/01/2017 02:13 AM, Gene Heskett wrote:
> Hi Bertho; I haven't heard any more, so I am wondering if you've found 
> any more "magic beans"?

Still looking into options.

There is that persy dayjob taking away attention from the real work ;-)
Seriously, it is exams-period and that requires some minimum attention
from my side. The least I owe my students is to have read their work.


-- 
Greetings Bertho

(disclaimers are disclaimed)

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] emc2 openProfibus --> openPowerlink

2017-06-01 Thread Nicklas Karlsson
Yes openPowerlink might be a really good choice. I implemented CANopen over UDP 
for configuration a few weeks ago and openPowerlink is adapted from CANopen.

The SDO communication from CANopen work really well for configuration and I 
guess it should also work well for between machine communication. SDO 
communication is rather simple to implement.



> nothing missed ... only not know the STMBL project  it seems quite
> simple obtain a calculated angle of joint for send the data to my program
> for 18 point delta calibration, so I find these project real interesting. 
> Apart
> from that, I'm investigating the possibility of having open industrial
> buses with high transmission capacity, to connect multiple Lcnc machines
> together but also other industrial devices. OpenPowerlink & openSafety
> seems quite good (not test in these time openlink realtime application ...
> nex week I think) ... but I'll be happy to try other ways. In addition to
> all the info I'm getting useful.
> 
> Thank you all.
> 
> bkt
> 
> 2017-06-01 1:44 GMT+02:00 Chris Albertson :
> 
> > > But the goal is to find the best industrial bus for communication
> > > between devices and open source ... openpowerlink seems quite open,
> > > master and slave side
> > > (ethercat for example in
> >
> >
> > I must have missed some of the requirements.  But from the above Ethernet
> > seem like an obvious solution.   It can push 1Gbit/second.  Latency can be
> > an issue if you use TCP/IP over Ethernet but one can just use UDP/IP or
> > even Ethernet frames.   And you can request users to use a dedicated
> > network.   UDP over a dedicated Gigabit network has just nanoseconds of
> > latency..  Basically the bit rate times the length of the datagram.
> > People have beaten this be packing the most time sensitive data in there
> > front of the packet.
> >
> > If you are taking about transferring data in a machine shop one other thing
> > is important and Ethernet does this too -- Galvanic isolation.  Ethernet
> > uses transformers on each end of the line and therefore has very good
> > common mode rejection.   But not trying the grounds together is a big
> > advantage in an industrial setting.
> > --
> >
> > Chris Albertson
> > Redondo Beach, California
> > 
> > --
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> > ___
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
> >
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Semi OT: Chinese servo motors Yifeng branded

2017-06-01 Thread theman whosoldtheworld
something i buy servo from china ... there are 3 possibility:

1) the seller send all kit Delta brand (motor+drive+cable)
2) the seller send Delta Drive but china motor
3) the seller may be is a guy that buy by Hong Kong import office, whitout
tax, and sell the goods on ebay.

In my experience china motor is quite good, not excellent but good.
SOmetime you can intercept some mitsubishi old or new contractor so the
motor is really good. Some time you can intercepts other european/americans
contractor, so the drive is very good. Normally in motor side you find
yaskava quality (in china yaskawa motor layout is well know & copy).

But you are buying from ebay ... so that the Chinese seller is not that it
is particularly encouraged to be correct.

Any how delta is good choice and in iTALY THE PRICE IS EQUAL TO THE PRICE
ON EBAY + EBAY TRANSPORT COST + LOCAL TAX. So if you buy on ebay you pay:
755USD + 20-70USD transport cost by air + 755*1.22 as local tax + import
tax 10-50USD = 1000-1200USD more or less  so for 1-3 pcs is not a good
businnes ... choice a local (italian, france, portuguese ... as eusurplus
sites ... seller) seller, more or less same price, + good assitance.

bkt

2017-06-01 1:20 GMT+02:00 Chris Albertson :

> The very first step in making a decision should be to download the user
> manual for the Yifeng product and see if it really is what you need.   That
> table does not have enough information.   Then if you find there is no user
> manual, is the product cheap enough that you can buy samples and test them?
>
> I'm going through the same issue with smaller stepper motors about 1/3rd
> the size of the Delta you linked to.  The best lowest price product might
> even be good, might even be made in the same factory as the brand name but
> no usable documentation so there is no way to know other than buying
> samples
>
>
> On Wed, May 31, 2017 at 11:46 AM, Leonardo Marsaglia <
> leonardomarsagli...@gmail.com> wrote:
>
> > Hello to all.
> >
> > Looking for a good but cheap servo motor I came across an Ebay user from
> > China that sells two brands mainly. One is Delta, wich I really trust and
> > I've used their products. The other one is Yifeng wich is a lot cheaper
> > than delta but I don't know anything about them.
> >
> > I attached a PDF with the prices of the Yifeng combos (servo+´drive) but
> I
> > don't have the list with the prices of the Delta brand. Anyway just to
> have
> > an idea here is a link to a Delta servo from this user on Ebay:
> >
> > http://www.ebay.com/itm/1-5KW-Delta-B2-AC-Servo-Motor-
> > Driver-220V-Set-Kit-ECMA-E21315RS-ASD-B2-1521-B-/191559765539?hash=
> > item2c99da0e23:g:pwYAAOSwzaJX7bhj
> >
> > And a similar servo motor and drive of the Yifeng brand is more or less
> > USD352 (You can take a look at the PDF attached)
> >
> > So what do you think? The user seems of trust judging by the feedbacks he
> > has.
> >
> > My doubt is if this Yifeng brand are worth a try. I can firmly say the
> > Delta ones are a very good product.
> >
> > Thanks as always!
> >
> > --
> > *Leonardo Marsaglia*.
> >
> > 
> > --
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> > ___
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
> >
> >
>
>
> --
>
> Chris Albertson
> Redondo Beach, California
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] emc2 openProfibus

2017-06-01 Thread theman whosoldtheworld
nothing missed ... only not know the STMBL project  it seems quite
simple obtain a calculated angle of joint for send the data to my program
for 18 point delta calibration, so I find these project real interesting. Apart
from that, I'm investigating the possibility of having open industrial
buses with high transmission capacity, to connect multiple Lcnc machines
together but also other industrial devices. OpenPowerlink & openSafety
seems quite good (not test in these time openlink realtime application ...
nex week I think) ... but I'll be happy to try other ways. In addition to
all the info I'm getting useful.

Thank you all.

bkt

2017-06-01 1:44 GMT+02:00 Chris Albertson :

> > But the goal is to find the best industrial bus for communication
> > between devices and open source ... openpowerlink seems quite open,
> > master and slave side
> > (ethercat for example in
>
>
> I must have missed some of the requirements.  But from the above Ethernet
> seem like an obvious solution.   It can push 1Gbit/second.  Latency can be
> an issue if you use TCP/IP over Ethernet but one can just use UDP/IP or
> even Ethernet frames.   And you can request users to use a dedicated
> network.   UDP over a dedicated Gigabit network has just nanoseconds of
> latency..  Basically the bit rate times the length of the datagram.
> People have beaten this be packing the most time sensitive data in there
> front of the packet.
>
> If you are taking about transferring data in a machine shop one other thing
> is important and Ethernet does this too -- Galvanic isolation.  Ethernet
> uses transformers on each end of the line and therefore has very good
> common mode rejection.   But not trying the grounds together is a big
> advantage in an industrial setting.
> --
>
> Chris Albertson
> Redondo Beach, California
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] emc2 openProfibus

2017-06-01 Thread Nicklas Karlsson
> If Ethernet is "complex" then PowerLink is "very complex" as it is a few
> layers over top of Ethernet.
> 
> Is there a list of requirements some place?   What are the end points,
> processes that run on a CPU of some kind.
> 
> I've been doing this kind of work for ages but you can't select anything
> without a detailed set of requirements

It is rather simple to send or receive via UDP/IP or TCP/IP for example via 
Ethernet. UDP/IP is one way packets. TCP/IP send acknowledge which add 
bandwidth requirement in the opposite direction. To make sure packets within a 
particular time period may however be harder.

Then sending point to point over an ordinary serial channel like UART or SPI 
data usually arrive practically instantly and there are no collisions. UART or 
SPI is also very cheap. Software for simple point to point may also be very 
simple. A bus have huge advantages then it come to number of nodes but there 
may be collisions.

Even though collisions are a small problem to make it work perfect during 
periodic communication may be surprisingly hard while for a simple serial 
channel it is no problem at all.


Regards Nicklas Karlsson

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] emc2 openProfibus

2017-06-01 Thread Chris Albertson
If Ethernet is "complex" then PowerLink is "very complex" as it is a few
layers over top of Ethernet.

Is there a list of requirements some place?   What are the end points,
processes that run on a CPU of some kind.

I've been doing this kind of work for ages but you can't select anything
without a detailed set of requirements



On Wed, May 31, 2017 at 10:45 PM, Nicklas Karlsson <
nicklas.karlsso...@gmail.com> wrote:

>
> Yes Ethernet is good, in particularly for communication in between machine
> there where are no servo real time demand. For real time communication
> within machine others might be a better choice because they ware simpler
> and cheaper.
>

Chris Albertson
Redondo Beach, California
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users