Create a new configuration as per your requirement
Add a Digital channel to the configuration.
Configure the trigger.
Click on Triggers >> New Trigger, Select Trigger Action as Start Logging, and click Next.
Enter the trigger action settings;
Log time (If required), Pre-trigger time and Debounce, then click Next
Choose Trigger Type as Digital Channel
By default, Digital Channels will be 1, and you need to wire the switch between Digital PIN and the GND and choose the condition as falls or changes.
Click Next, and save the trigger.
Send the configuration to the logger.
The logger will start buffering the data for the duration of the pre-log time given; when the trigger becomes true, it starts writing the data for the given log duration or continuously as per your settings.