05-03-2024 04:08 AM - edited 05-03-2024 04:31 AM
Hello!
I need to code a program in labview to control the up and down movement of the platform of a 3D printer (with a stepper motor). At the end of the stroke there are stops which send 5V when they are activated. I managed to create a programme which, when it receives 5V, changes the direction of rotation of the motor. However, when the voltage drops below 5V, the motor returns to its original direction of rotation. Concretely, I would like the program to keep the n-1 direction and not the default one. I've tried to make a shift register but without success.
Thanks in advance for any help
05-03-2024 04:37 AM
Hi Korralegend,
@Korralegend wrote:
I managed to create a programme which, when it receives 5V, changes the direction of rotation of the motor. However, when the voltage drops below 5V, the motor returns to its original direction of rotation.
You should change direction based on rising edges in your end switches - and not based on the current state of the switch…
@Korralegend wrote:
Concretely, I would like the program to keep the n-1 direction and not the default one. I've tried to make a shift register but without success.
It seems you made an error in your program.
As you didn't attach the VI you need to debug on your own!
05-03-2024 04:38 AM - edited 05-03-2024 04:39 AM
@Korralegend wrote:
I've tried to make a shift register but without success.
You probably did something wrong.
Post what you have...
That crossed, once is enough.
05-03-2024 04:42 AM
Hello, thanks for your answer. So i need to change my analogic input by a digital input? Sorry it's my first message on this forum. I attached to this message my VI but it's an FPGA layer so don't know if it will help.
05-03-2024 04:53 AM - edited 05-03-2024 04:55 AM
05-03-2024 06:38 AM
okay thanks, I will try!