Hello Pasqui,
This should be possible with a DAQmxConnectTerms() function in DAQmx, or a GPCTR_Change_Parameter() function in Traditional NI-DAQ. ND_Gate is the parameter that must changed with the latter function.
Let me know if you have any further questions.
Sean C.
Applications Engineer
National Instruments