The actuating device is a motor that drives a sprocket via chain to pivot this chute. I want no action to be taken on power down/power up. I want to either wait for the X23 input, which is used in auto mode, or you use pivot right and left push buttons (X4 and X2 respectively) in manual mode. So what I was trying to do was control the pivot chute depending on the position of the auto/manual switch. Such as below:
PLC 06
// Rung 1
// Address 0
STRPD X23
AND X5
OR Y0
ANDN X3
PD Y0
// Rung 2
// Address 5
STRPD X23
AND X3
OR Y1
ANDN X5
PD Y1
//Rung 3
//Address 10
STR C0
ANDN X17
AND X2
ANDN X3
ANDN Y0
OUT Y1
//Rung 4
// Address 16
STR C0
ANDN X17
AND X4
ANDN X5
ANDN Y1
OUT Y0
Rung 1 and 2 is for auto made and rungs 3 and 4 are for manual mode. C0 is on for E-stop circuit OK and X17 is the auto/manual selector switch (on for auto)
Does this make sense?
In the above program you posted you have committed the classic rookie mistake of multiple outs for the same address. I'm guessing you have some other type of programming experience. Below is my interpretation of the program you are wanting
PLC 06
// Rung 1
// Address 0
#BEGIN COMMENT
"I need some help here on the correct way to make a one shot (PD) work. I have a chute "
"that pivots left and right. I want an input (let's say X23) to come on, and if the chute is in "
"the left position, I want it to pivot to the right position, and if it is in the right position, I want "
"it to pivot to the left position, when that same input comes on. I have Limit Switches (X3 "
"left and X5 right) as inputs to tell whether the chute is in the left or right position, which "
"can be used to stop the pivot motion. Can anyone help me out on how to program this to "
"work correctly?"
""
"Thanks,"
""
"David"
#END
STR X23
AND X3
PD C10
// Rung 2
// Address 3
STR X23
AND X5
PD C11
// Rung 3
// Address 6
#BEGIN COMMENT
"The reason for this rung is so that the motor does not instantly reverse when in auto"
""
"PS. This rung needs to be placed before the Y0 output rung. The reason for this is "
"because the swing to the right output (Y0) is turned off after the X5 LS right is made. In "
"order for this rung to work the output needs to be on and the limit switch made. This can "
"only happen when the rung is placed before the Y0 output rung "
#END
STR X17
AND C0
STR Y0
AND X5
STR C12
ANDN Y1
ORSTR
ANDSTR
TMR T0 K20
OUT C12
// Rung 4
// Address 18
#BEGIN COMMENT
"The reason for this rung is so that the motor does not instantly reverse when in auto"
""
"PS. This rung needs to be placed before the Y01output rung. The reason for this is "
"because the swing to the right output (Y1) is turned off after the X3 LS left is made. In "
"order for this rung to work the output needs to be on and the limit switch made. This can "
"only happen when the rung is placed before the Y1 output rung "
#END
STR X17
AND C0
STR Y1
AND X3
STR C13
ANDN Y0
ORSTR
ANDSTR
TMR T1 K20
OUT C13
// Rung 5
// Address 30
#BEGIN COMMENT
"The reason for this rung is to unseal the outputs if the mode changes from auto to manual"
""
"PS. This is also one way to use a ""PD"" coil. In this case the address only has a status of "
"1 for one PLC scan. "
""
"Note that I use the contact of this address (C14) to interupt the sealin of the output rungs "
"(Y0 and Y1) "
#END
STRN X17
PD C14
// Rung 6
// Address 32
#BEGIN COMMENT
"In your original description you said"
""
" "" I have Limit Switches (X3 left and X5 right) as inputs to tell whether the chute is in the "
"left or right position, which can be used to stop the pivot motion."""
""
"This implies that it is a motorized swing and the limits are needed for overtravel."
""
""
"I have included the auto control you mentioned earlier"
""
"I have also unsealed the the output if the mode changes from auto to manual."
""
#END
STRN X17
STR C10
ORPD X4
ANDSTR
STRPD X17
AND X3
ORSTR
STR X17
ANDPD T1
ORSTR
STR Y0
ANDN C14
ORSTR
ANDN X5
AND C0
OUT Y0
// Rung 7
// Address 48
#BEGIN COMMENT
"In your original description you said"
""
" "" I have Limit Switches (X3 left and X5 right) as inputs to tell whether the chute is in the "
"left or right position, which can be used to stop the pivot motion."""
""
"This implies that it is a motorized swing and the limits are needed for overtravel."
""
"I have included the auto control you mentioned earlier. "
""
"I have also unsealed the the output if the mode changes from auto to manual."
""
""
#END
STRN X17
STR C11
ORPD X2
ANDSTR
STRPD X17
AND X5
ORSTR
STR X17
ANDPD T0
ORSTR
STR Y1
ANDN C14
ORSTR
ANDN X3
AND C0
OUT Y1
// Rung 8
// Address 64
END
// Rung 9
// Address 65
NOP
#BEGIN ELEMENT_DOC
"X2","",""," ""go left"" PB"
"X3","","","LS left"
"X4","","","""go right"" PB "
"X5","","","LS right"
"X17","","","auto selector switch"
"X23","","","change position PB "
"Y0","","","swing to right "
"Y1","","","swing to left"
"C0","","","E stop ok"
"C10","","","Change position from the left parked position OS"
"C11","","","Change position from the right parked position OS"
"C12","","","seal in when in auto and swing is at end of stroke to the right"
"C13","","","seal in when in auto and swing is at end of stroke to the left"
"C14","","","control has transitioned from auto to manual this will unseal the output if the mode changes from auto to manual OS"
"T0","","","delay for the direction change to the left"
"T1","","","delay for the direction change to the right"
#END