Mode S is a function which allows Transponders to transmit data as well as the standard code (mode A) & altitude (mode C). It is used mainly by TCAS to allow two TCAS systems to co-ordinate avoidance manouvres between them.
Most Transponders have the ability to deselect either RAs or TAs & RAs. This is normally used when operating engine out as the 2 TCAS systems may co-ordinate an RA which demands a high rate of climb or descent which may be undesirable on one engine. With your mode S switched off the other aircraft will, on getting no response from your TCAS, initiate an independant RA.
So to operate your transponder in mode S leave it in the normal inflight (TCAS on) position.