It always helps to read the "Help" for DAQmx functions, especially those that you don't choose to wire (many have "default values" that may or may not be what you want (but if you leave it blank, it will be what you get).
See if fixing these omissions helps.
Bob Schor