Jozir
Member
Hey everyone, I'm currently in my last year of high school and I have to automate a scorebord for a foosball table using 4 optical sensors (sender + receiver), 4 reflectors, a PLC and a HMI. I use 8 digital inputs for the sensors (4 interrupt 4 normal)
PLC used: s7-1200 AE30 v2
HMI used: KTP700 7inches
I already wrote the ladder program to measure the speed of the ball, show the winner, players and goals on the HMI.
What am I having trouble with?
1.Direction detection of the ball. I set a timer when one of the field sensors receive a signal and I reset the timer when the corresponding goalsensor aquires a signal or the opposing fieldsensor aquires a signal. Now as far as the direction goes: I have to reset the timer with the same input (fieldsensor) that sets the timer
2. Starting and stopping a timer using an interrupt so I have 1speed measurement with and one without the usage of an interrupt. I keep having a problem with the elapsed time not being moved. I get a signal on my hardware interrupt, it jumps to the interrupt, the time starts but nothing happens with the ET time ( I move the time and execute the calculations from s to ms and from m/s to km/u).
Thanks in advance!
PLC used: s7-1200 AE30 v2
HMI used: KTP700 7inches
I already wrote the ladder program to measure the speed of the ball, show the winner, players and goals on the HMI.
What am I having trouble with?
1.Direction detection of the ball. I set a timer when one of the field sensors receive a signal and I reset the timer when the corresponding goalsensor aquires a signal or the opposing fieldsensor aquires a signal. Now as far as the direction goes: I have to reset the timer with the same input (fieldsensor) that sets the timer
2. Starting and stopping a timer using an interrupt so I have 1speed measurement with and one without the usage of an interrupt. I keep having a problem with the elapsed time not being moved. I get a signal on my hardware interrupt, it jumps to the interrupt, the time starts but nothing happens with the ET time ( I move the time and execute the calculations from s to ms and from m/s to km/u).
Thanks in advance!
Last edited: