rirze / mirobot-py

A Python interface library for WLkata's Mirobot
https://rirze.github.io/mirobot-py/
MIT License
24 stars 9 forks source link

Mirobot don't continue #18

Closed dennisarmbruster95 closed 3 years ago

dennisarmbruster95 commented 4 years ago

Dear developer, i just run the example "home_and_move_multiple_times.py" and the mirobot programm don't finish the home_simultaneous method.

Debugging Output: [COM6] [DEBUG] Attempting to open serial port COM6 [COM6] [DEBUG] Succeeded in opening serial port COM6 [COM6] [DEBUG] [RECV] [COM6] [DEBUG] [RECV] Grbl 0.9j ['$' for help] [COM6] [DEBUG] [RECV] [COM6] [DEBUG] [RECV] Qinnew Robot 20200610 based on Grbl 0.9j ['$' for help] [COM6] [DEBUG] [RECV] [COM6] [DEBUG] [RECV] D1: 78 [COM6] [DEBUG] [RECV] A1: 32 [COM6] [DEBUG] [RECV] A2: 108 [COM6] [DEBUG] [RECV] A3: 20 [COM6] [DEBUG] [RECV] D4: 170 [COM6] [DEBUG] [RECV] L: -25 [COM6] [DEBUG] [RECV] X offset: 0 [COM6] [DEBUG] [RECV] Y offset: 0 [COM6] [DEBUG] [RECV] Z offset: 0 [COM6] [DEBUG] [RECV] X tool frame offset: 0 [COM6] [DEBUG] [RECV] Y tool frame offset: 0 [COM6] [DEBUG] [RECV] Z tool frame offset: 0 [COM6] [DEBUG] [RECV] Line discard number: 0 [COM6] [DEBUG] [RECV] Axis_7 mode: Rail mode [COM6] [DEBUG] [RECV] Initialized Cartesian coordinates and rotation: [COM6] [DEBUG] [RECV] X: 202 [COM6] [DEBUG] [RECV] Y: 0 [COM6] [DEBUG] [RECV] Z: 181 [COM6] [DEBUG] [RECV] RX: 0 [COM6] [DEBUG] [RECV] RY: 0 [COM6] [DEBUG] [RECV] RZ: 0 [COM6] [DEBUG] [RECV] Using reset pos! [COM6] [DEBUG] [SENT] $H [COM6] [DEBUG] [RECV] [COM6] [DEBUG] [RECV] Free memory: 2132 [COM6] [DEBUG] [RECV] ok

Then i tried to disable the wait parameter at only this routine and call sleep for 15 seconds. Now the program continue, but cancels after few commands.

Debug output now: [COM6] [DEBUG] Attempting to open serial port COM6 [COM6] [DEBUG] Succeeded in opening serial port COM6 [COM6] [DEBUG] [RECV] [COM6] [DEBUG] [RECV] Grbl 0.9j ['$' for help] [COM6] [DEBUG] [RECV] [COM6] [DEBUG] [RECV] Qinnew Robot 20200610 based on Grbl 0.9j ['$' for help] [COM6] [DEBUG] [RECV] [COM6] [DEBUG] [RECV] D1: 78 [COM6] [DEBUG] [RECV] A1: 32 [COM6] [DEBUG] [RECV] A2: 108 [COM6] [DEBUG] [RECV] A3: 20 [COM6] [DEBUG] [RECV] D4: 170 [COM6] [DEBUG] [RECV] L: -25 [COM6] [DEBUG] [RECV] X offset: 0 [COM6] [DEBUG] [RECV] Y offset: 0 [COM6] [DEBUG] [RECV] Z offset: 0 [COM6] [DEBUG] [RECV] X tool frame offset: 0 [COM6] [DEBUG] [RECV] Y tool frame offset: 0 [COM6] [DEBUG] [RECV] Z tool frame offset: 0 [COM6] [DEBUG] [RECV] Line discard number: 0 [COM6] [DEBUG] [RECV] Axis_7 mode: Rail mode [COM6] [DEBUG] [RECV] Initialized Cartesian coordinates and rotation: [COM6] [DEBUG] [RECV] X: 202 [COM6] [DEBUG] [RECV] Y: 0 [COM6] [DEBUG] [RECV] Z: 181 [COM6] [DEBUG] [RECV] RX: 0 [COM6] [DEBUG] [RECV] RY: 0 [COM6] [DEBUG] [RECV] RZ: 0 [COM6] [DEBUG] [RECV] Using reset pos! [COM6] [DEBUG] [SENT] $H MirobotCartesians(x=None, y=None, z=None, a=None, b=None, c=None) ****Count 0**** [COM6] [DEBUG] [SENT] M20 G90 G0 X180.0 Y0.0 Z170 F2000 [COM6] [DEBUG] [RECV] [COM6] [DEBUG] [RECV] Free memory: 2132 [COM6] [DEBUG] [RECV] ok [COM6] [DEBUG] [RECV] M20: Cartesian mode start. [COM6] [DEBUG] [RECV] ok [COM6] [ERROR] Could not parse status message "ok" [COM6] [DEBUG] Attempting to close serial port COM6 [COM6] [DEBUG] Succeeded in closing serial port COM6

I hope you can help me an thank you very much for your time.

Greetings,

@da84

rirze commented 4 years ago

Can you share your code please? This will help me make sure that it's not a problem with how the program is written. If you didn't make any changes to the script I provided, then let me know.

dennisarmbruster95 commented 4 years ago

In my first described problem i used your example code: https://github.com/rirze/mirobot-py/blob/master/examples/home_and_move_multiple_times.py

my coder after modification is following: from mirobot import Mirobot from time import sleep

with Mirobot(wait=True, debug=True) as m: m.home_simultaneous(wait=False) sleep(15) print(m.cartesian) for count in range(5): mx = 180.00 my = 0.00 + count 5 mz = 170 + count 5 print(f"****Count {count}****") m.go_to_cartesian_ptp(mx, my, mz) print(m.cartesian)

I use the API over USB.

dennisarmbruster95 commented 4 years ago

Sorry for loosing indentation. Its my fault. In a nutshell i importet sleep from the time module and called it after m.home_simultaneous(wait=False). I didn't change anything else.

rirze commented 4 years ago

Thanks for the response. Something I noticed: your firmware version is very recent (20200610). I'm not aware of any firmware updates in the last 8 months. Could you let me know what exactly you updated or who might have updated it?

dennisarmbruster95 commented 4 years ago

thank you for your response and help. I bought it about two months ago and received it before one. I don't think I installed an update.

rirze commented 4 years ago

That is unfortunate. I don't have access to that firmware since it become closed-source. Until I can be convinced that it is not the firmware updates that are causing issues (or until I can obtain the firmware to examine myself), then I'm not sure I can fix your problems because I can't replicate it on my side.

This is because the wait feature of this library heavily depends on the firmware acting in specific ways. If the firmware changes, then it is not guaranteed to work the same as my current Mirobot firmware version (which is from January). I will contact Wlkata to see what help they'll provide.

dennisarmbruster95 commented 4 years ago

i am impressed with your willingness to help. Do you think its a good idea to downgrade the firmware? In Wlkata studio is a way to select a hex file for flashing, but i don't know which firmware version i should use and from where i can get it.

rirze commented 4 years ago

Of course, I am happy to help anyone who takes the time to report issues :)

About downgrading firmware, that is up to you. Is using this library that important? You may lose some features/ have other bugs by downgrading (I don't know what these might be because I don't have the newer version). If you downgrade to the same version I have, then I know for sure how to fix any problems that arise.

I can help you if you choose to go down the downgrade path. Just let me know.

dennisarmbruster95 commented 4 years ago

yes its important for me to use this api. so i would try a downgrade.

jurkov commented 3 years ago

Wlkata Studio V1.015 has an Update Firmware Button. I don't know if there is any new firmware. I think i should also be possible to dump the old firmware with avrdude.

rirze commented 3 years ago

WKLata has their own fork of this library. For immediate compatibility, I recommend using their fork. https://github.com/wlkata/mirobot-py

Sometime this year, I'll decide on the status of this project.

dennisarmbruster95 commented 3 years ago

I tried it with newer firmware and fork from wlkata and official repo, but still doesn't work. So i changed to ubuntu.... and it works at it should... The described problems are on my Windows 10 PC.

rirze commented 3 years ago

That's unfortunate. I would imagine many users would be using Windows 10 to control their Mirobots. I'm glad you could figure it out.