2010/3/18 Andy Pugh <[email protected]>:
> On 15 March 2010 19:47, Dave <[email protected]> wrote:
>
>> As usual, there are a number of ways to do this within EMC2. If you just
>> want to use digital I/O, look at the custom Mcodes. Also look at the
>> Gcodes that allow you to wait for an input and set an output.
>
> I have recently found another way, which might suit this application
> very well indeed.
>
> the [HALUI] section in the INI file lets you define commands to run
> when a pin goes true. You can add up to 64.
>
> The format is
> MDI_COMMAND <some G-code string>
> Each line creates a HAL pin of the form halui.mdi-command-XX
> In the more recent versions of EMC2[1] you are not limited to just
> normal G-codes, the format
> MDI_COMMAND O<subroutine-name> CALL
> also works.
>
> This means that the toolchanger robot could be set to run a specific
> set of G-code instructions for a number of different digital inputs.
>
> At the machine-tool end you could use a pair of digital I/O commands
> (M66: http://wiki.linuxcnc.org/emcinfo.pl?Mword ) to send the trigger
> and to wait for the "completed" signal.

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?

Anyway, thank You a lot, Andy, for a suggestion, i believe that for me
it is easier way than setting up ClassicLadder scheme.

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 - so that it stops the work once given number of parts is
produced. or even much better - loads another file and starts
producing different parts. This would involve a lot of preparation of
the G-code files, but that is what i would like to achieve - have it
produce 100 parts of one kind, then 150 parts of another kind and so
on. I would have to prepare different programms for lathe or mill and
for robotic arm feeder as well, because locations of the raw material
for each part would be different (2 separate boxes for example).

Viesturs

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