thewalkerist
Member
Hello,
I am currently trying to control a motor in my plc. I've made a simple on/off button logic. And it works pretty well, when i press the button it changes the speed of the motor to 100 and when i press it again it changes it to 0. This is nice. I also created a text list for my button so whenever the Motor speed is at 0 my button says "Start" and whenever it is between 1 and 100 it says "Stop"
And i wanted to put a I/O field in there so if i dont want to just start and stop i can just change my motor speed to a specific value. Now this works as well but the two of them doesnt work well together.
Remeber those "Start", "Stop" texts? yeah it seems they are just for show. So if i open up the programme i see START because currently my motor speed is 0. So i just change the value from my I/O field to lets say 50. And my button now is saying STOP. That is nice aswell. If i press STOP what happens? it sets the speed to 100. Not ideal at all. But if i press STOP again it works. Because of my code. I've tried putting some comparators but it didnt work out. Instead made things worse
I am currently trying to control a motor in my plc. I've made a simple on/off button logic. And it works pretty well, when i press the button it changes the speed of the motor to 100 and when i press it again it changes it to 0. This is nice. I also created a text list for my button so whenever the Motor speed is at 0 my button says "Start" and whenever it is between 1 and 100 it says "Stop"
And i wanted to put a I/O field in there so if i dont want to just start and stop i can just change my motor speed to a specific value. Now this works as well but the two of them doesnt work well together.
Remeber those "Start", "Stop" texts? yeah it seems they are just for show. So if i open up the programme i see START because currently my motor speed is 0. So i just change the value from my I/O field to lets say 50. And my button now is saying STOP. That is nice aswell. If i press STOP what happens? it sets the speed to 100. Not ideal at all. But if i press STOP again it works. Because of my code. I've tried putting some comparators but it didnt work out. Instead made things worse