TTL to PFI6
Please edit the code and use PFI6 rather than PFI0
The MATLAB can not specify the AO trigger source if traditional DAQ driver is used [bug report]. Instead, please connect the TTL source to PFI6 and remove (or comment) the following command from the Start_Stop_Callback of Capmeters (located at lines ~1588 for Capmeter1, ~2074 for Capmeter6).
set(handles.ao,'HwDigitalTriggerSource','PFI0'); %remove it
If the TTL signal is from a BNC cable, you may, for example, connect the BNC cable to the USER1 BNC port on the terminal block (e.g. BNC-2110), and then make a connection between PFI6 and the USER1 spring terminal using a stripped wire.