Author Topic: stepper motor have vibration when receive value E1 from stream real time  (Read 1144 times)

Settawat

  • Robots in Architecture Members
  • Forum User
  • *
  • Posts: 21
    • View Profile
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?

Johannes @ Robots in Architecture

  • Lead Developer
  • Administrator
  • Forum User
  • *****
  • Posts: 1214
    • View Profile
    • Robots in Architecture
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

Settawat

  • Robots in Architecture Members
  • Forum User
  • *
  • Posts: 21
    • View Profile
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

Johannes @ Robots in Architecture

  • Lead Developer
  • Administrator
  • Forum User
  • *****
  • Posts: 1214
    • View Profile
    • Robots in Architecture
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

Settawat

  • Robots in Architecture Members
  • Forum User
  • *
  • Posts: 21
    • View Profile
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

Johannes @ Robots in Architecture

  • Lead Developer
  • Administrator
  • Forum User
  • *****
  • Posts: 1214
    • View Profile
    • Robots in Architecture
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

Settawat

  • Robots in Architecture Members
  • Forum User
  • *
  • Posts: 21
    • View Profile
Dear Johannes
  Thank you for your suggestion. I have to try to use Arduino to drive the stepper motor it works.

Best regards,
Settawat


Johannes @ Robots in Architecture

  • Lead Developer
  • Administrator
  • Forum User
  • *****
  • Posts: 1214
    • View Profile
    • Robots in Architecture
Excellent, I'm glad that it worked out!
Best,
Johannes