Hi Jason,
Thanks for your reply.
we want to use this machine for the testing of our sensors in our lab.
All I need now is simply move the machine to the corresponding x,y, and then goes down(Z direction) to touch our devices(no "pick and place" needed, just touch them).
Because we want to measure whether the external pressure will impact the performance of our sensors.
If this way works, then we will do production for this, but operatoring workers in production line, they don't know about the Openpnp GUI.
That is why we want to make it automatically. We have our program to do testing, but we still want to call/operate this machine to the corresponding positions from our program(without GUI).
Therefore, I think "
move_machine.py" is the perfect practice for my trials. Unfortunately, I haven't succeeded yet, that is why I come here to ask for the help.
I also wrote some java code to initialize the Configuration because I got error as follows:
submitUiMachineTask(move_nozzle)
at org.openpnp.model.Configuration.get(Configuration.java:117)
at org.openpnp.util.UiUtils.submitUiMachineTask(UiUtils.java:100)
at org.openpnp.util.UiUtils.submitUiMachineTask(UiUtils.java:85)
at org.openpnp.util.UiUtils.submitUiMachineTask(UiUtils.java:54)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
java.lang.Error: java.lang.Error: Configuration instance not yet initialized.
Now I can initialize the Configuration(the error is gone), but then I got this:
java.lang.ClassNotFoundException: Configuration
at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.openpnp.model.ConfigurationInitialize.loadMachineFromXml(ConfigurationInitialize.java:94)
at org.openpnp.model.ConfigurationInitialize.tryIni(ConfigurationInitialize.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:190)
at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:208)
at org.python.core.PyObject.__call__(PyObject.java:461)
at org.python.core.PyObject.__call__(PyObject.java:465)
at org.python.core.PyMethod.__call__(PyMethod.java:126)
at org.python.pycode._pyx0.move_nozzle$3(C:/Users/CHH9RT/JavaTry/move_machine.py:58)
at org.python.pycode._pyx0.call_function(C:/Users/CHH9RT/JavaTry/move_machine.py)
at org.python.core.PyTableCode.call(PyTableCode.java:173)
at org.python.core.PyBaseCode.call(PyBaseCode.java:119)
at org.python.core.PyFunction.__call__(PyFunction.java:406)
at org.python.pycode._pyx0.main$1(C:/Users/CHH9RT/JavaTry/move_machine.py:24)
at org.python.pycode._pyx0.call_function(C:/Users/CHH9RT/JavaTry/move_machine.py)
at org.python.core.PyTableCode.call(PyTableCode.java:173)
at org.python.core.PyBaseCode.call(PyBaseCode.java:119)
at org.python.core.PyFunction.__call__(PyFunction.java:406)
at org.python.pycode._pyx0.f$0(C:/Users/CHH9RT/JavaTry/move_machine.py:60)
at org.python.pycode._pyx0.call_function(C:/Users/CHH9RT/JavaTry/move_machine.py)
at org.python.core.PyTableCode.call(PyTableCode.java:173)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.Py.runCode(Py.java:1703)
at org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:297)
at org.python.util.jython.runSimpleFile(jython.java:417)
at org.python.util.jython.runStream(jython.java:449)
at org.python.util.jython.runFile(jython.java:474)
at org.python.util.jython.main(jython.java:678)
Traceback (most recent call last):
File "C:/Users/CHH9RT/JavaTry/move_machine.py", line 60, in <module>
main()
File "C:/Users/CHH9RT/JavaTry/move_machine.py", line 24, in main
move_nozzle()
File "C:/Users/CHH9RT/JavaTry/move_machine.py", line 34, in move_nozzle
nozzle = machine.defaultHead.defaultNozzle
AttributeError: 'NoneType' object has no attribute 'defaultHead'
I am very sorry to paste all the error message here, because I cannot upload the photos nor pictures to here from my company laptop.
Any ideas for this? Or any other ideas are also very welcome and appreciated.
Or maybe we can also use Openpnp GUI in production environment, but fill in or operate everything automatically?
Thanks a lot!!
Leonard