Need a bit of help with a PLC program

The diagram shows every possibility. For example when the ball starts in the middle it may somehow end up in the goal without going through the field sensor - this would still be a goal but you can't show speed.


Specifically:


You can only arrive in state 3 if the ball has gone from F1 to G1 and stays there for a time. From here you can calculate the speed as you store the times when F1 and G2 are activated. You also increment the goal count.



You can only arrive in state 5 if the ball is in the centre of the pitch but then arrives in the goal. You increment the goal count but you cannot show a speed.




etc. etc.
 
The diagram shows every possibility. For example when the ball starts in the middle it may somehow end up in the goal without going through the field sensor - this would still be a goal but you can't show speed.


Specifically:


You can only arrive in state 3 if the ball has gone from F1 to G1 and stays there for a time. From here you can calculate the speed as you store the times when F1 and G2 are activated. You also increment the goal count.



You can only arrive in state 5 if the ball is in the centre of the pitch but then arrives in the goal. You increment the goal count but you cannot show a speed.




etc. etc.

That is very cleaver thinking but need a speed measurement EVERY goal + The ball can't end up in the goal without crossing any fieldsensors, that's impossible :s
 
https://ibb.co/czy6Qy

I currently have this.

1. Field sensor receives signal = move local time ( nanseconds is to small but seconds is to big so I took nanoseconds)

2.Goal sensor receives signal = move local time again

3. Main Subtract nanoseconds and calculate speed

Any thoughts, I don't really know whether it's correct or not
 
Use T_DIFF to calculate the time between events:


NB LTIME not available in S7-1200 so you will have to use a time variable.

tdiff.jpg
 
Last edited:
nice thread,i had the same problem
o.png
 

Similar Topics

I'm trying to display a 32 bit word from my PLC (ProWorx32), which I have used a double precision add block to achieve. The problem is, even...
Replies
4
Views
2,434
I need help converting from a floating register to two integer words. I'm using a SLC 5/05 and need to be able to write 32 bit data to a servo...
Replies
2
Views
4,676
Can anyone explain to me how does the address scheme for a bit data file works? For example, B3:400 and B3/47 I am using the PLC 3rd edition by...
Replies
1
Views
3,504
I have this SLC 5/03 file attached. I don't own RS Logix software myself, but I'd like to be able to check out a few things in the program. I'm...
Replies
6
Views
2,637
Question- Say I have 8 digital INPUTS to my PLC, any of which may be asserted HIGH for a few seconds, all these inputs "OR'd", currently, to...
Replies
16
Views
3,512
Back
Top Bottom