this problem of motor require latching in contacts or interlocking we can say
now we have 3 inputs and a single output
now inputs are
x0=start pushbutton which start motor
x1=stop push button which stop the motor
x2=this is error checking of motor to plc
now if i talk about output that will be y0 that is motor
now ladder diagram of this will be
|----------| |--------|/|----------()---------|
x0 x1 y0
| | |
|-----||----| |
y0
|-----||-------------|
x2
addressing will be
now X0=I:0/0
X1=I:0/1
Y0=O:0/0
X2=I:0/2