.numties
From WikiManual
The condition *.numties tells the DNA how many ties are currently attached to the robot. In this instance no attempt is made to feed unless at least one tie is detected.
cond *.numties 1 >= start -1 .tieloc store -1000 .tieval store 1 .tienum store stop