Pulsating stars in NGC 6231