10-09-2018 07:30 AM - edited 10-09-2018 07:31 AM
Hello,
I need to control the position of stepper motor and change the position continuously without encoder. I have two signals: one is making one step on rising edge of the signal, second is the direction of step. I can't use the build in function PWM signal, because there is no output so I can't count the rising edges, and secondly the main loop is too slow so it wouldn't work ( I need the speed of around 30-40kHz). I know I need to chenge the FPGA main. Has anyone done such project? If anyone can shere ideas/code, because im having trouble with it for 3 weeks allready.
Non of topics helped me with the problem.
Best regards,
Emil
10-15-2018 08:07 AM - last edited on 01-04-2024 01:00 PM by migration-bot
Dear Emil,
actually there are PWM outputs available on myRIO normally: Pins 27,29 and 31.
https://www.ni.com/docs/en-US/bundle/myrio-1900-getting-started/resource/376047d.pdf
https://www.ni.com/docs/en-US/bundle/myrio-1950-getting-started/resource/376099b.pdf
Additionally you don't need to have a software control timing (while loop), while a counter based hardware PWM-generation is available in DAQmx:
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000x1P0CAI&l=en-US
I hope I could help you.
Best Regards,
Akos
Applications Engineering
National Instruments
10-25-2018 08:19 AM
I have developed a complicated Lab instrument where I control 2 stepper motors. I had preferred to purchase dedicated stepper motor controllers for this. I purchased them from Applied Motion Products (USA) and can highly recommend their support and quality. The controllers have a special language and communicate through serial RS232 interface with my computer (other communication options are available). Also, the company has developed a Labview (2012) VI which I use in my Labview 2016 for both motors with minor modifications. I believe dedicated controller is the better way to go as it gives a lot of advantages e.g. 56 000 micro-step operation, smoothing, overload protection and generate the necessary high currents for the motor for the price of couple hundred $. In one case I purchased a stepper motor with integrated controller which makes an even better solution.