Hi everyone, I state that I am taking my first steps on everything that is electronic and programmable. I'm trying to move a stepper motor (nema17-200step / rev-1.5A) with a raspberry pi4 and a drv8825 driver. I followed this https://forge.codesys.com/drv/sm3raspistepper/home/Home/, and managed to spin the motor, I would like to ask you experts if there is any way I can use a home switch to reset the motor position. Following what is written in the link posted above, I read that softmotion has exclusive access to the GP I / O of the raspberry and I do not know how to connect my limit switch. Can anybody help me? Or tell me if there are other methods to reset the motor? Thanks in advance.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
A proposal would be to connect a a GPIO input to do the limit switch if the distance is not to long. It is 3.3V depends on your machine if this could work.
Last edit: eschwellinger 2022-02-26
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for the time you are dedicating to me.
I connected the limit switch input to a GP i/o input of the Raspberry, what I can't do is define the pin in the SMC_homing fb, what I have to write to ensure that my PIN 4 is active and reads the limit switch?
It might be trivial, but these are my first steps on codesys.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I kind of have the same issue. Running three stepper motors with help of Softmotion and Raspberry Pi 4.
I want to use some additional outstanding GPIO's for limit switches and/or other DI/DO's. Seems like when I'm running softmotion, my whole
GPIO bus is getting disabled (not sure if softmotion is causing this issue). The GPIO is marked with a red
triangle in the Device Tree and have status "Bus is not running" and "GPIOs: Not Running"
My question is: Is Softmotion blocking me to use the other outstanding GPIO's?
Is it possible to add limitswitches (DI/DO's) while running softmotion?
Note: I have connected one limitswitch to GPIO4 for testing and mapped the IO correctly (working when creating a blank program without softmotion).
Hello ,
in fact that's what I want to do, but reading the guide of this link https://forge.codesys.com/drv/sm3raspistepper/home/Home/, it says that the GP i / o cannot be used together with softomotion, I don't know if there is an alternative way to connect other inputs / outputs besides the engines.
Hello everybody,π
I am carrying out my project and continue in this discussion.
I haven't been able to get a soft motion limit switch to work yet, but for now I can do without it.
now I need help on controlling a DC motor through codesys, do you think if I connect a BTS7960 to a raspberry I can control it with softmotion?
I put some photos to better understand (the motor is a 895 360w, so with a very high load).
I trust in your precious help.π
Hello.
Tell me how to properly configure the drive for a circular stepper motor? In the first picture, I showed the normal setting, the motor is spinning. But if you change the motor type to circular, then it does not work. Tell me what is the reason? Is this a problem in the library?
Thank you.!
Hello! Since I saw here has been questions regarding GPIO it should be proper to post a question here about connecting IO-s to raspi stepper library.
I use different type of raspberry (Revolution pi). Revolution pi I/O-s are not configured under GPIO tab as for standard raspberry. Raspistepper library supports only Dword value for pins. How could I solve my problem. I have IO list and it is mapped by using some name: "outputW.0" for example. I need to connect it with raspistepper library but had found no solution jet for it
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi everyone, I state that I am taking my first steps on everything that is electronic and programmable. I'm trying to move a stepper motor (nema17-200step / rev-1.5A) with a raspberry pi4 and a drv8825 driver. I followed this https://forge.codesys.com/drv/sm3raspistepper/home/Home/, and managed to spin the motor, I would like to ask you experts if there is any way I can use a home switch to reset the motor position. Following what is written in the link posted above, I read that softmotion has exclusive access to the GP I / O of the raspberry and I do not know how to connect my limit switch. Can anybody help me? Or tell me if there are other methods to reset the motor? Thanks in advance.
use smc_Moming fb from the SM3_DriveBasic.library. Connect the limit switches to this fb.
Last edit: eschwellinger 2022-02-06
Thanks for the answer, also placed an image of the connections, I can't understand how to use SMC_homing, how can I define the switch input PIN?
A proposal would be to connect a a GPIO input to do the limit switch if the distance is not to long. It is 3.3V depends on your machine if this could work.
Last edit: eschwellinger 2022-02-26
Thanks for the time you are dedicating to me.
I connected the limit switch input to a GP i/o input of the Raspberry, what I can't do is define the pin in the SMC_homing fb, what I have to write to ensure that my PIN 4 is active and reads the limit switch?
It might be trivial, but these are my first steps on codesys.
you need to set the GPIO's and map them.
Then use these Inputs at the SMC_homing fb
Last edit: eschwellinger 2022-03-01
Hello eschwellinger!
I kind of have the same issue. Running three stepper motors with help of Softmotion and Raspberry Pi 4.
I want to use some additional outstanding GPIO's for limit switches and/or other DI/DO's. Seems like when I'm running softmotion, my whole
GPIO bus is getting disabled (not sure if softmotion is causing this issue). The GPIO is marked with a red
triangle in the Device Tree and have status "Bus is not running" and "GPIOs: Not Running"
My question is: Is Softmotion blocking me to use the other outstanding GPIO's?
Is it possible to add limitswitches (DI/DO's) while running softmotion?
Note: I have connected one limitswitch to GPIO4 for testing and mapped the IO correctly (working when creating a blank program without softmotion).
Se pictures attached.
Hope you are able to help and clarify.. :-)
Regards
Hello ,
in fact that's what I want to do, but reading the guide of this link https://forge.codesys.com/drv/sm3raspistepper/home/Home/, it says that the GP i / o cannot be used together with softomotion, I don't know if there is an alternative way to connect other inputs / outputs besides the engines.
Hi,
yes sorry my fault - this is true - only possible if this driver is not used-
it might work if you use a PIFACE2 - I think this IO's are connected by SPI
see the schema here:
https://2.bp.blogspot.com/-O8fqpxHsuFQ/UhXwZzNJT7I/AAAAAAAAIVw/jhAsMoB2Ssg/s1600/Pi-face-digital-schematic.png
but anyway I did not have checked it in real.
Hello everybody,π
I am carrying out my project and continue in this discussion.
I haven't been able to get a soft motion limit switch to work yet, but for now I can do without it.
now I need help on controlling a DC motor through codesys, do you think if I connect a BTS7960 to a raspberry I can control it with softmotion?
I put some photos to better understand (the motor is a 895 360w, so with a very high load).
I trust in your precious help.π
Hello.
Tell me how to properly configure the drive for a circular stepper motor? In the first picture, I showed the normal setting, the motor is spinning. But if you change the motor type to circular, then it does not work. Tell me what is the reason? Is this a problem in the library?
Thank you.!
Hello! Since I saw here has been questions regarding GPIO it should be proper to post a question here about connecting IO-s to raspi stepper library.
I use different type of raspberry (Revolution pi). Revolution pi I/O-s are not configured under GPIO tab as for standard raspberry. Raspistepper library supports only Dword value for pins. How could I solve my problem. I have IO list and it is mapped by using some name: "outputW.0" for example. I need to connect it with raspistepper library but had found no solution jet for it