07-20-2021 03:12 PM
I'm using a Nema 23 bipolar 4-wire stepper motor, StepperOnline DM542T driver, and an arduino uno R3 in a testing setup. I've downloaded LINX to communicate with arduino, but the programming logic is getting a bit lost on me. It seems that it should be communicating, and I believe it is since the RX/TX lights are blinking when I click run, but the motor isn't moving. I've downloaded the firmware to the arduino board from the LINX tab in tools just like all the tutorials I've found describe, but do I also need to code anything in arduino? Or is the firmware the code?
I attached my VI below, hopefully someone has had this issue and can see what may be wrong. I do think the issue is with my program and not my hardware because the motor works fine when taking arduino IDE commands directly.
Thanks in advance!
Solved! Go to Solution.
07-21-2021 07:45 AM
Hello tck1378, i answered the other post, but you might have missed that.
"note that his code runs in a while loop, at the frequency of the desired step speed. Instead of using four digital write in sequence at 4 different channels, your application is much simpler: you only need to write true and false how many times your desired step quantity is needed."
your VI is working, but i believe that you are using the wrong function. you might use duty cycle to change speed on h bridge dc motor controls. so i measured the output. note that it does not change the frequency of PUL signals, in other words, the speed of your motor will not change:
i recommend using the VI "Digital Write Square Wave" to "write true and false how many times your desired step quantity is needed"
check out my measurements observing that the duty cycle does not change, but the frequency does: (i'm am using autorange for better visualization)
Another option is to use custom command as sugested by Stargo-44 in your other post.
07-21-2021 09:57 AM
Using a square wave instead of PWM worked, thank you! Now just to control speed/steps. Thanks so much again!
06-12-2022 09:24 PM - edited 06-12-2022 09:26 PM
Could you please post the final code in 2018 version?
06-13-2022 05:59 AM
There you go