Problem with Piston Starting


#1

1) Give a description of the problem
Piston is failing to start.

2) What is the expected behavior?
When the condition and trigger are met change the variable true. Basically this is (2) driveway sensors tied to (2) different door contacts showing status when a vehicle passes by the sensor. Each sensor is set up to stay “open” for 1 minutes after a vehicle passes. So when a vehicle passes the 1st sensor coming in the driveway it opens that contact and then when the vehicle passes the second sensor it changes to opened…in the hopes of it then changing the variable to “true”. I seperate piston that then changes the variable back to false after 1 minutes.

3) What is happening/not happening?
The piston is only working 75% of the time. In alot of cases after seeing the piston not fire I can go into the ST device log and see 1st contact sensor was opened and then 3 seconds later the other contact sensor opened but the variable never changes. I just turned on full logging in case someone needs that. I’m still trying to get better at my troubleshooting skills.

4) Post a Green Snapshot of the pistonimage

5) Attach any logs (From ST IDE and by turning logging level to Full)
(PASTE YOUR LOGS HERE BETWEEN THE MARKS THEN HIGHLIGHT ALL OF THE LOGS SND CLICK ON THE </> ICON TO FORMAT THEM)

REMOVE BELOW AFTER READING


#2

This might be a timing issue.

It might also be the way the piston is setup.

Try the following, and see if it helps.

IF
-Contact Sensor 16’s contact changes to OPEN
THEN
-IF Contact Sensor 14’s contact is OPEN
–THEN
–x2 Set variable {@Somebody_Arrived} = true
-END IF
END IF

Have the trigger be when Contact Sensor 16 changes, then have it look at Contact Sensor 14.

Is “@Somebody_Arrived” a global variable?

I’m not sure about the “@” being in front of it. Just a question.


#3

If it’s a global variable yes it has to be @


#4

try changing places of line 18 and 20.
One is a trigger - Line 20
the other is a condition - Line 18

and the best way is TRIGGER first, condition later