Robots in Architecture Forum

KUKA|prc - parametric robot control for Grasshopper => Support => Topic started by: Settawat on May 21, 2021, 12:03:19 PM

Title: stepper motor have vibration when receive value E1 from stream real time
Post by: Settawat on May 21, 2021, 12:03:19 PM
I have stream value E1 in real-time by using ethernet krl and nvidia jetson nano. but when I stream E1 value and sent it to the stepper motor it spins and has vibration all the time. I have to try to the analyst by run only code for the stepper motor it looks fine. I think the problem may be from value stream E1 real-time and sent to the stepper motor. But I don't know how to fix vibration?
Title: Re: stepper motor have vibration when receive value E1 from stream real time
Post by: Johannes @ Robots in Architecture on May 21, 2021, 12:05:47 PM
Hello,

There is unfortunately no way for me to troubleshoot that. Consider starting a timer and sending the timer value to your microcontroller to troubleshoot problems with latency, order of commands and timing.

Best,
Johannes
Title: Re: stepper motor have vibration when receive value E1 from stream real time
Post by: Settawat on May 22, 2021, 10:15:19 AM
Dear Johannes
Thank you for your reply. I will try to troubleshoot but I require to know how to decrease response time send/receive data of ethernet krl?

Best regards,
Settawat
Title: Re: stepper motor have vibration when receive value E1 from stream real time
Post by: Johannes @ Robots in Architecture on May 22, 2021, 10:08:46 PM
Hello Settawat.

EKI is unfortunately not a hard-realtime system. For some more options, look e.g. at that post: https://www.robot-forum.com/robotforum/thread/28344-help-sending-real-time-coordinate-by-ekx-or-rsi/

Best,
Johannes
Title: Re: stepper motor have vibration when receive value E1 from stream real time
Post by: Settawat on May 28, 2021, 09:26:21 AM
Dear Johannes
  I have found 1 reason that makes my stepper motor get vibration cause from I to use multiprocess in python to make stream E1 and run the stepper motor simultaneously. Because I think stepper motor not run done of drive command but get new command to start at beginning of stepper motor drive command all the time. So, I have tried to use join() in multiprocess this makes the program must run the process of the stepper motor done then  this makes my program can stream E1 again but this makes the program stop because stream E1 value in real-time if have stop command it will stop stream E1 value and make the program stop. Have any suggestions for make steam E1 and run the stepper motor simultaneously?

Best regards,
Settawat
Title: Re: stepper motor have vibration when receive value E1 from stream real time
Post by: Johannes @ Robots in Architecture on May 28, 2021, 03:52:44 PM
I'm not sure I can follow, but if it's related to multithreading you could just leave the stepper operation to a different system, like an ESP32 with https://github.com/pkerspe/ESP-FlexyStepper
Best,
Johannes
Title: Re: stepper motor have vibration when receive value E1 from stream real time
Post by: Settawat on June 09, 2021, 02:08:32 PM
Dear Johannes
  Thank you for your suggestion. I have to try to use Arduino to drive the stepper motor it works.

Best regards,
Settawat

Title: Re: stepper motor have vibration when receive value E1 from stream real time
Post by: Johannes @ Robots in Architecture on June 09, 2021, 03:11:32 PM
Excellent, I'm glad that it worked out!
Best,
Johannes