Re: [Emc-users] Serial daisy chain protocol

2017-09-11 Thread Gene Heskett
On Monday 11 September 2017 19:23:37 Chris Albertson wrote:

> Why not SPI speeds over a long cable?   Gigabit Ether net is a good
> example.   It is built into almost all computers and can be 1GHz over
> 100 meters of cheap unshielded wire.
>
> They use only a few basic tricks, none of which add much to the cost
>
> 10/8 encoding to guarantee a minimum number of bit transitions even if
> the data is a long string of zeroes.
> Clock mixed with data so the receiver clock can be cheap non-precision
> Differential to resister common mode noise
> galvanic isolation to prevent ground loops
>
> There is also 10GHz Ethernet but it is not built into common consumer
> equipment but even 10G data rates are easy to pushover 100 feet using
> just RJ45 jacks
>
> The trick is to NOT think about how hard it is to push 10Gbps over a
> wire. But to think how easy it is to build a microwave data link when
> you can use wire in place of a clear air path.  No need for antennas
> and you can use way ultra-low power.
>
> even for the case of SPI, think in terms is radio transmission lines
> and the job becomes easier.
>
> On Mon, Sep 11, 2017 at 9:54 AM, Nicklas Karlsson <
>
> nicklas.karlsso...@gmail.com> wrote:
> > > On Monday 11 September 2017 07:16:00 theman whosoldtheworld wrote:
> > > > why not powerlink ie?
> > >
> > > Wikipedia description shows some promise. SPI speeds over a longer
> > > cable, maybe.
> >
> > No SPI over long cable. For long cable RS422 will work, there is a
> > tradeoff between cable length and speed.
> >
Or for mind boggling distances, how about a g-line? Virtually zero losses 
over a mile or 3 using common steel wire, single strand? No real reason 
it cannot be bidi by using 2 non-harmonically related carrier 
frequencies.

2 secrets to both low loss and low cost since the wire's ohmic losses 
aren't a major concern, its nothing but a waveguide with no external 
walls. The other is that when it goes past a supporting pole, it must be 
tight so the the included angle where its attached to the supporting 
insulator is less than 5 degrees, as a certain amount of the waveform 
energy will be radiated and lost as it continues in a straight line, 
leaving the confines of the field established by the central wire.

This central wire exits from the center of a flat conductive panel that 
is 1 or more wavelengths in radius.  And re-enters the rx end in a 
similar structure.

Or with small dishes and "gunn" diodes, which are innately bidirectional, 
the wire can be dispensed with. We have a remote broadcast linkage 
lashup running at 23 gigahertz, using 12" dishes on both ends, that has, 
when our satellite truck is on location up to several miles, I think 22 
is the record, which has saved the station its cost in satellite time 
not rented many times over.  If we can clear line of site see the 
studio's 255 foot STL towers top beacon we fire it up and cancel the 
satellite time.  Our unit isn't bidirectional, but thats a matter of 
changing out its video circuitry on both ends. Power output is 60 
milliwatts.

If the sheckles can be found, distance vs bandwidth is a solveable 
problem. In this case the g-lines initial construction costs for 
planting all the support poles, and the cost of the gunn diode 
assemblies, both up front costs, are at best, still discouraging.

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)
Genes Web page 

--
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] Serial daisy chain protocol

2017-09-11 Thread Chris Albertson
Why not SPI speeds over a long cable?   Gigabit Ether net is a good
example.   It is built into almost all computers and can be 1GHz over 100
meters of cheap unshielded wire.

They use only a few basic tricks, none of which add much to the cost

10/8 encoding to guarantee a minimum number of bit transitions even if the
data is a long string of zeroes.
Clock mixed with data so the receiver clock can be cheap non-precision
Differential to resister common mode noise
galvanic isolation to prevent ground loops

There is also 10GHz Ethernet but it is not built into common consumer
equipment but even 10G data rates are easy to pushover 100 feet using just
RJ45 jacks

The trick is to NOT think about how hard it is to push 10Gbps over a wire.
  But to think how easy it is to build a microwave data link when you can
use wire in place of a clear air path.  No need for antennas and you can
use way ultra-low power.

even for the case of SPI, think in terms is radio transmission lines and
the job becomes easier.

On Mon, Sep 11, 2017 at 9:54 AM, Nicklas Karlsson <
nicklas.karlsso...@gmail.com> wrote:

> > On Monday 11 September 2017 07:16:00 theman whosoldtheworld wrote:
> >
> > > why not powerlink ie?
> >
> > Wikipedia description shows some promise. SPI speeds over a longer cable,
> > maybe.
>
> No SPI over long cable. For long cable RS422 will work, there is a
> tradeoff between cable length and speed.
>
> 
> --
> 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] Serial daisy chain protocol

2017-09-11 Thread Gene Heskett
On Monday 11 September 2017 12:54:46 Nicklas Karlsson wrote:

> > On Monday 11 September 2017 07:16:00 theman whosoldtheworld wrote:
> > > why not powerlink ie?
> >
> > Wikipedia description shows some promise. SPI speeds over a longer
> > cable, maybe.
>
> No SPI over long cable. For long cable RS422 will work, there is a
> tradeoff between cable length and speed.
>
Poor wording on my part. I had, once the terminations are sorted, visions 
of a 3 to 4 foot cable, defined as a long SPI cable.

Right now, terms are not well characterized on either end and it takes 
some loading trickery to make a 6 inch cable work.  Bertho and I spent 
some time optimizing it to get 30.5 megabit one way, and 25 megabit
the other direction.  And its now working well to a Mesa 7i90 with a 1" 
cable.

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)
Genes Web page 

--
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] Serial daisy chain protocol

2017-09-11 Thread Nicklas Karlsson
> On Monday 11 September 2017 07:16:00 theman whosoldtheworld wrote:
> 
> > why not powerlink ie?
> 
> Wikipedia description shows some promise. SPI speeds over a longer cable, 
> maybe.

No SPI over long cable. For long cable RS422 will work, there is a tradeoff 
between cable length and speed.

--
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] Serial daisy chain protocol --> Powerlink

2017-09-11 Thread Nicklas Karlsson
On Mon, 11 Sep 2017 13:16:00 +0200
theman whosoldtheworld  wrote:

> why not powerlink ie? no need special chip, no need special hardware ...
> but it run on every device ... so you can must to limit it to a single core
> realtime working ... so other core is free for Lcnc ... not tested yet with
> Lcnc istances so I'm not able to report latency performance with Lcnc
> istance + powerlink ie istances ... its only limit is that there are few
> device manufacturers who use it, ...

It might actually be a good choice and as POWERLINK Ethernet protocol comply 
with authorized standardization level for communication technologies in China 
plenty of devices could be expected.

https://www.ceasiamag.com/2012/05/powerlink-awarded-national-standard-in-china/

--
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] Mesa RS-422 examples

2017-09-11 Thread Erik Christiansen
On 11.09.17 13:03, Marius Liebenberg wrote:
>  Thanks Eric. I assumed that it would be a packet protocol. I just did a
> packet radio link on a SAMD21. Those are many as you said.
> I was more looking for HAL side of things or a python script that make
> use of the RS-422 of the mesa. More the system integration side of
> things I think.

Ah, this sort of thing, then:
http://wiki.linuxcnc.org/cgi-bin/wiki.pl?ModbusToHal

Erik

--
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] Mesa RS-422 examples

2017-09-11 Thread Marius Liebenberg

 Thanks Eric. I assumed that it would be a packet protocol. I just did a
packet radio link on a SAMD21. Those are many as you said.
I was more looking for HAL side of things or a python script that make
use of the RS-422 of the mesa. More the system integration side of
things I think.

-- Original Message --
From: "Erik Christiansen" 
To: emc-users@lists.sourceforge.net
Sent: 2017-09-11 14:40:15
Subject: Re: [Emc-users] Mesa RS-422 examples


TL;DR: Potted solutions are at the end.

On 11.09.17 11:44, Marius Liebenberg wrote:

 Hi
 I need to write a custom RS-422 protocol to control a plasma cutter.
I have
 a mesa 7i44 (amongst other's ) on the system.
 I have never used or seen any examples of how to communicate to
custom
 hardware vie the RS-422 on the mesa cards. Is there anyone out there
that
 has some examples that I can look at to get started please?
 Or some advise will do as well thanks.


There will be some simple serial packet protocol or other out there in
the googleverse, but the fundamentals are:

+  It's a serial packet protocol, and whether it's RS485,RS422, or
RS232
   on the physical layer doesn't amount to a hill of beans, except that
   RS422 tells us that it's point-to-point, so destination addresses
   aren't really needed.

+  Writing packet assembly code is simple - it's stacking bytes in a
   buffer. The packet parser at the receiving end is a little bit more
   work, which you might like to re-use on a subsequent project - so
   maybe add source and destination address bytes to the packet, even
if
   you just dump them on receipt, at this stage.

+  So a simple packet would look something like this sequence of bytes:
   A recognisable header byte, i.e. a constant, e.g. 0x47 = 'G'
   Destination address. 0 - 255
   Source address. 0 - 255
   Length If this is included, you have the option of variable
  length packets. The count need only cover the
variable
  payload.
   Payload bytes.
   ...
   How many do you need to tell a plasma cutter how to dance?
   CRC or simple checksum byte.

The packet parser is a state machine which ignores anything received
until a header is seen, then advances statewise as packet bytes are
parsed. It's a really good idea to checksum each received packet, and
request a resend if it is corrupted. That's Transport Layer logic.

Packet queues at Tx and Rx ends are needed, unless backward ACK/NACK is
used to stop Tx if Rx isn't ready. If the plasma cutter can do only one
thing at the time, that might do for starters.

DIY can be weeks of work before it's reasonably capable and reliable,
so
let's now run "AVR embedded packet protocol" up the flagpole. Ah, the
second hit is: https://en.wikipedia.org/wiki/Cubesat_Space_Protocol
and it's good to go on 8 bit AVR and 32 bit ARM chips (whoops, is that
my bias showing? That's what I'd put on the Rx end.)

It's written in 'C', so nicely portable, and runs in a number of POSIX
environments, including FreeRTOS and Linux. So it's compatible with a
LinuxCNC host and an embedded slave. It might be worth a look.

Modbus will be suggested. I've not used it. It would be significant
overkill, but if there is free source to be had, then you'll not need
more than that to talk to a plasma cutter. Trying "modbus beaglebone
linux" gives enough hits to suggest that it would be feasible to drop a
beaglebone in on the Rx end, drop the code in, and maybe have it up in
an afternoon.

Erik

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


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
--
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] Mesa RS-422 examples

2017-09-11 Thread Erik Christiansen
TL;DR: Potted solutions are at the end.

On 11.09.17 11:44, Marius Liebenberg wrote:
> Hi
> I need to write a custom RS-422 protocol to control a plasma cutter. I have
> a mesa 7i44 (amongst other's ) on the system.
> I have never used or seen any examples of how to communicate to custom
> hardware vie the RS-422 on the mesa cards. Is there anyone out there that
> has some examples that I can look at to get started please?
> Or some advise will do as well thanks.

There will be some simple serial packet protocol or other out there in
the googleverse, but the fundamentals are:

+  It's a serial packet protocol, and whether it's RS485,RS422, or RS232
   on the physical layer doesn't amount to a hill of beans, except that
   RS422 tells us that it's point-to-point, so destination addresses
   aren't really needed.

+  Writing packet assembly code is simple - it's stacking bytes in a
   buffer. The packet parser at the receiving end is a little bit more
   work, which you might like to re-use on a subsequent project - so
   maybe add source and destination address bytes to the packet, even if
   you just dump them on receipt, at this stage.

+  So a simple packet would look something like this sequence of bytes:
   A recognisable header byte, i.e. a constant, e.g. 0x47 = 'G' ;-)
   Destination address. 0 - 255
   Source address. 0 - 255
   Length If this is included, you have the option of variable
  length packets. The count need only cover the variable
  payload.
   Payload bytes.
   ...
   How many do you need to tell a plasma cutter how to dance?
   CRC or simple checksum byte.

The packet parser is a state machine which ignores anything received
until a header is seen, then advances statewise as packet bytes are
parsed. It's a really good idea to checksum each received packet, and
request a resend if it is corrupted. That's Transport Layer logic.

Packet queues at Tx and Rx ends are needed, unless backward ACK/NACK is
used to stop Tx if Rx isn't ready. If the plasma cutter can do only one
thing at the time, that might do for starters.

DIY can be weeks of work before it's reasonably capable and reliable, so
let's now run "AVR embedded packet protocol" up the flagpole. Ah, the
second hit is: https://en.wikipedia.org/wiki/Cubesat_Space_Protocol
and it's good to go on 8 bit AVR and 32 bit ARM chips (whoops, is that
my bias showing? That's what I'd put on the Rx end.)

It's written in 'C', so nicely portable, and runs in a number of POSIX
environments, including FreeRTOS and Linux. So it's compatible with a
LinuxCNC host and an embedded slave. It might be worth a look.

Modbus will be suggested. I've not used it. It would be significant
overkill, but if there is free source to be had, then you'll not need
more than that to talk to a plasma cutter. Trying "modbus beaglebone
linux" gives enough hits to suggest that it would be feasible to drop a
beaglebone in on the Rx end, drop the code in, and maybe have it up in
an afternoon.

Erik

--
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] Serial daisy chain protocol

2017-09-11 Thread Gene Heskett
On Monday 11 September 2017 07:16:00 theman whosoldtheworld wrote:

> why not powerlink ie?

Wikipedia description shows some promise. SPI speeds over a longer cable, 
maybe.

> no need special chip, no need special hardware 
> ... but it run on every device ... so you can must to limit it to a
> single core realtime working ... so other core is free for Lcnc ...
> not tested yet with Lcnc istances so I'm not able to report latency
> performance with Lcnc istance + powerlink ie istances ... its only
> limit is that there are few device manufacturers who use it, we see it
> will happen next year as it has now become an ABB protocol.

Unfortunately, wikipedia never heard of the ABB protocol.  Other links 
and cites please?

Thanks.

> rebards
> bkt
>
> 2017-09-10 11:10 GMT+02:00 Nicklas Karlsson 
:
> > > In practice if you have ever had to set up a daisy chain topology
> > > network you will not like it.  One problem is that one connector
> > > or device
> >
> > failure
> >
> > >  takes down the entire network.   The new switch based Ethernet is
> > > much more reliable especially now with self test and green LED
> > > built into
> >
> > every
> >
> > > end or every cable.
> >
> > Plan was to connect like shift register which should be very similar
> > to Ethercat. What's worse is micro controller have FIFO so it is not
> > possible to feed thru with good performance since virtual shift
> > register length will be long in each device. Green LED should be
> > possible also with daisy chain but there is a drawback all devices
> > must work.
> >
> > Single chip will of course always work. For buses Ethercat for high
> > bandwidth and CANopen for low bandwidth seems to be the choice. I
> > think there is nothing wrong with Sercos but it seems to be more
> > expensive for less performance.
> >
> >
> > 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
>
> --
> 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


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)
Genes Web page 

--
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] Mesa RS-422 examples

2017-09-11 Thread Marius Liebenberg

Hi
I need to write a custom RS-422 protocol to control a plasma cutter. I 
have a mesa 7i44 (amongst other's ) on the system.
I have never used or seen any examples of how to communicate to custom 
hardware vie the RS-422 on the mesa cards. Is there anyone out there 
that has some examples that I can look at to get started please?

Or some advise will do as well thanks.


-
Regards / Groete

Marius D. Liebenberg
+27 82 698 3251
+27 12 743 6064


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
--
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] Serial daisy chain protocol

2017-09-11 Thread theman whosoldtheworld
why not powerlink ie? no need special chip, no need special hardware ...
but it run on every device ... so you can must to limit it to a single core
realtime working ... so other core is free for Lcnc ... not tested yet with
Lcnc istances so I'm not able to report latency performance with Lcnc
istance + powerlink ie istances ... its only limit is that there are few
device manufacturers who use it, we see it will happen next year as it has
now become an ABB protocol.

rebards
bkt

2017-09-10 11:10 GMT+02:00 Nicklas Karlsson :

> > In practice if you have ever had to set up a daisy chain topology network
> > you will not like it.  One problem is that one connector or device
> failure
> >  takes down the entire network.   The new switch based Ethernet is much
> > more reliable especially now with self test and green LED built into
> every
> > end or every cable.
>
> Plan was to connect like shift register which should be very similar to
> Ethercat. What's worse is micro controller have FIFO so it is not possible
> to feed thru with good performance since virtual shift register length will
> be long in each device. Green LED should be possible also with daisy chain
> but there is a drawback all devices must work.
>
> Single chip will of course always work. For buses Ethercat for high
> bandwidth and CANopen for low bandwidth seems to be the choice. I think
> there is nothing wrong with Sercos but it seems to be more expensive for
> less performance.
>
>
> 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
>
--
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