Measuring the time between two sensors

Status
Not open for further replies.

mpolit

Newbie level 1
Joined
Jan 28, 2010
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,292
Hi dear users
I'm a beginner in plc programming and try to learn some issues. I use TwinCat and PC. Do not have a plc.
I have a problem with some plc programming task. The task is to write a program which will be monitoring the time between two sensors. I have two sensors above the conveyor: upstream and downstream located in 30 cm distance. Part moves with constant speed, it reaches upstream sensor and after 15 second downstream sensor. Plc have to measure the time between those sensors and if time value is between 10-20 seconds the output signal should be 1. If time value will be different because of changing the speed value (not between 10 - 20 sec) it should gave 0.
I set up the timer TON to 30 sec. I triggered the timer with sensor signals (Upstream sets the timer, dwonstream resets) and tried to capture the Elapsed Time value but I have problems with it.
Can You send me any suggestions how to program the plc to achieve guidelines.
I would appreciate any help.

Thanks
Mpolit
 

What is the exact nature of the problem?
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…