On 06/10/2014 07:52 PM, Trần Ngọc Quân wrote:
> Hello all,
> My previous question [1] is not clear.
> 
> My idea is create hal drive (hal_serial) for pc com port:
> PC <=COM=> Microcontrol board (MC51 for example)
> 
> Protocol:
> - PC read 8bits from Microcontrol boad, for read status of limit switch,
> emergency stop button etc.
> - PC write 8bits to Microcontrol boad, for on/off some things ( spindle,
> pump etc.)
> - Read/Write task will continue in forever loop.
> 
> Step control by lpt or other.
> 
> [1] http://sourceforge.net/p/emc/mailman/message/32442282/

What you describe is possible, but the limitations on throughput and
latency over the serial link are severe (compared to communication
channels like EPP and PCI).

I've written a cheesy program[0] that does exactly what you describe.
It communicates via RS-232 to an embedded motion controller for a small
robot arm[1], and presents an interface in the LinuxCNC HAL.

It works ok as a proof of concept, within its limitations.  Don't expect
smooth motion, the update frequency over the serial line is just too
low, and the latency is too high.


0:
http://git.linuxcnc.org/gitweb?p=linuxcnc.git;a=blob;f=src/hal/user_comps/scorbot-er-3.py;h=0c07d0618e4c9a4b2509f4e68cc14303a2097586;hb=03a1c19f22d71c2ea4d1b81137b7750350b69600

1: http://highlab.com/~seb/linuxcnc/scorbot-er-3/1024131507a.jpg


-- 
Sebastian Kuzminsky

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to