On 18 March 2010 08:19, Viesturs Lācis <[email protected]> wrote:

> I checked the link You provided and it says that: "you need another
> M65 to write the command, M66 is only for reading"
> I understand that M65 (with additional code) sends the trigger and
> then M66 (with additional code) waits for the "completed" signal. Is
> this statement correct?

That was what I was thinking, yes.
Incidentally, if you don't have enough digital IO channels you can add more:
http://linuxcnc.org/docs/2.4/html/config_emc2hal.html#r1_1_1

> I have yet another question - how do i make EMC to repeat the file? I
> mean, it seems to me that now i have the information, how i can set up
> lathe/mill and robotic arm feeder to work together, but i still do not
> know how do i make them automatically restart the all the process once
> the part is produced.
> In ideal situation, i would like to have some counter, which counts,
> how many items have been processed, and compares to a number i have
> set

You could do it with a loop in the G-code.
Imagine that the part you want is made by a file called "part.ngc"
create a pyvcp panel with a spinbox called "PartCount"
http://linuxcnc.org/docs/2.2/html/hal_pyvcp.html
in the postgui.hal file link the pyvcp boxes to motion.analog-in-00
connect motion.digital-in-00 and motion.digital-out-00 to physical IO
pins for the part changer
The G-code would then be...

#1 = 0
M66 E0 L0
O100 WHILE [#1 < #5399]
O<part> CALL
;Send change-part signal
M64 P0
M66 P0 L3
M65 P0
;re-read the part count
M66 E0 L0
O100 ENDWHILE
M2

-- 
atp

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to