jeetendra_g10 wrote:
>i will definitely get there,(using emc2 for all my systems),but my funding is
in phases. I have to get things running and financially productive,even if its a
vbscript on mach,for the monthly plugins that i will have to make for weird
machines on weird coordinate systems.
>i looked desperately for a way of using python to make quick scripts,found none
for emc2,but mach has low complexity road to reach the stage where you can
quickly write your scripts,for ad-hoc machines,without needing guru-hood .
>
>
Hmmm. How hard did you look for python code? :)
Here's what you need to do to be able to control EMC2 from python:
import emc
import hal
Done. :)
An example of a script that loads and runs a g-code file, then stops the
machine, is here:
<http://emergent.unpy.net/index.cgi/01167419757>
From the comments in the program:
"jdi: Just do it
This program can be used as an emc "DISPLAY". It resets estop, turns the
machine on, loads and runs the ngc file (which must be given as a positional
argument), printing the sequence number and location once per second. When
it's done it punches the ESTOP button and exits emc."
There's a program you can use in scripts called "axis-remote" that lets
you load, reload, and clear G-code programs, or run MDI commands or
cause AXIS to quit.
>so,if right now i cannot afford the learning curve of emc2 from a developers
perspective,emc2 is a natural match for the things the factories need
here,without excluding mach.
>(bench presses roller feeder,sheet roller feeders for die cutting machines,mig
welding,plasma cutting,cnc routing,cnc granite machining,air less painting,glass
engraving...for the factory where i now work,as an example)
>
>
Yep, learning curves and the need for immediate return are the things
that keep a lot of people back.
>as can be seen,only 40% of the machines actually use contouring in the sense of
x,y,z.The others can be motorised by stepper or servos,via plc control,or emc2
on a single board pc)
>
>
On the machines where G-code and contouring aren't really necessary, you
can use a "bare HAL" setup. This is just the realtime kernel with the
hardware drivers and whatever you need to drive your motors. I made a
custom HAL-only system that talked to a Modbus PLC (in userspace,
non-realtime) to receive settings and commands, and had a 10 KHz control
loop running some pulse generation software (not for steppers, power
supply waveforms). This was a headless system which I would only access
via remote login over ethernet. I designed some hardware (16-bit analog
I/O cards to connect to a Mesa FPGA card), and wrote some custom VHDL
code for the FPGA. I wrote several custom HAL modules, plus some of the
existing ones, to make a system that did exactly what was necessary for
that application, which of course had nothing to do with EMC2 or
machining. This is the level you may get to if it's necessary. You
won't be able to do that with Mach/Windows.
See you
- Steve