random behavior when using pyVCP buttons
When you click one of these pyVCP buttons, Axis will switch to the MDI tab to execute the MDI code, then back to the Manual Control tab. But occasionally (seemingly random), it will stay focused on the MDI tab instead of going back to the Manual Control tab.
The issue with this is that the jog keys do not work when the MDI tab is selected. So the operator can't fine tune the location without selecting the Manual Control tab or pressing F3.
Do any of you see a work around to make sure it always goes back to the manual control tab?
Could I remove the MDI tab? Would the MDI commands still work?
The only work around I see right now is to make a pyVCP panel with up/down/left/right jog buttons built into it. This would work, but Id rather the operators be able to use the jog keys. There's a lot of button pressing in this process right now until our fully automated (expensive) vision welding system gets here..
In case you are curious, this is a laser spot welder with a camera and cross hairs for the operator. It is spot welding tiny wires that aren't always in the exact same location (hence the need for fine tuning locations).
Having to change that tab back to manual control occasionally (1 out of 5 button clicks maybe) is a big annoyance.
You might get better results using GladeVCP and embedded Python using the Python interface:
ie, make a button with an on_clicked callback of (say) do_command_1 and then:
import linuxcnc c = linuxcnc.command() s = linuxcnc.stat() def ok_for_mdi(): s.poll() return not s.estop and s.enabled and s.homed and (s.interp_state == linuxcnc.INTERP_IDLE) def do_command_1(self, obj, data=None) if ok_for_mdi(): old_mode = s.task_mode() c.mode(linuxcnc.MODE_MDI) c.wait_complete() # wait until mode switch executed c.mdi("G0 X10 Y20 Z30") c.mode(old_mode)
Some development work will be needed to make this work.
My MDI commands just send the machine to a position (example G90 G0 X10 Y20 Z30)--either absolute coordinates or a relative move. My jog workaround was to make a pyVCP panel that has "jog" buttons built in. I just programmed up, down, left, right buttons to relatively move 0.02mm per click. This seems to be working well.
Its now a table based button layout with 27 buttons to allow them to move to 84 different weld locations and fine tune each if needed before welding. A GladeVCP GUI would be much better, but this is a very temporary machine and I don't have the time to learn the programming. I've started the tutorial and would like to learn it some time though.
Now, if I could only get my touchscreen working so they don't have to use a mouse. Its a Superlogics display. Based on a lsusb command, it looks to be an eGalax touchscreen. Its plug and play on Ubuntu, but I can't get it to work on LinuxCNC. The company wasn't much help at all.
I even started fresh with Ubuntu and tried to install LinuxCNC, but failed there too with the rtai kernel.
SenorAguas wrote: Now, if I could only get my touchscreen working so they don't have to use a mouse. Its a Superlogics display. Based on a lsusb command, it looks to be an eGalax touchscreen. Its plug and play on Ubuntu, but I can't get it to work on LinuxCNC. .
I have a couple of them working with LinuxCNC.
You might have to download a driver: www.eeti.com.tw/drivers_Linux.html