05-22-2018 03:51 AM
Hello again!
We are a group of mechanicale students from sweden involved in a real life project. We have created a user-on-track for the worlds biggest treadmill. Right now we use our limited knowledge to try and program it. The idé is to mesure time between different sensors and from that give a new speed to the treadmill. When we`ve gotten a new speed, we send one or 2 signals (we use LED´s to simulate that) to the plc through the old system. The old system increases the speed with 0,5 (km/h)*s (k50) or 1 (km/h)*s. So if we want to increase with 4,5 km/h we send a signal to k100 for 4 seconds and 1 second to k50.
Now to the problems we are having.
1. We only whant to increase the speed when one are moving forward (S5 to S6, or S6 to S7) and we can get that but we also gets a speed on the way back.
2. We want the LEDs to light up when signaled and then stop until you get a new time in the right direction. they do light up but then it continues in the same loop.
3. The signals to k50 and k100 cant come in at the same time and if you sould pass S5 and S6 it will be given a new speed. But let say you continues all the way to S7 and you get a new speed between S6 and S7. We want that speed to start send signal right after the first signals are send, not start while the first signals are still sending.
Hope you guys can help us!
05-22-2018 08:54 AM
You need to break this into project that different people can work on. I would suggest that you look into State Machines, Producer and consumer loops and ques. Right now you have the indicators for what you want to do but you do not have any code that supports what you are trying to accomplish. I think if you start looking into the examples that are shipped for these systems that I am suggesting you will start to construct the code you need to run your system.
05-23-2018
03:26 AM
- last edited on
12-09-2024
03:02 PM
by
Content Cleaner
Hi Erwa (and fellow students),
apart from the good advice aeastet already posted I have some more hints for you: