Hi IBA,
you didn't mention what software (LabVIEW, CVI,...) and driver your using. So I guess it's LabVIEW. Here are two examples I found:
1. Acq CJC Temperature.vi (shipping example from the LabVIEW Example Finder >> DAQmx)
2. NI 435x Thermocouple.vi (http://zone.ni.com/devzone/cda/epd/p/id/3309 >> trad. DAQ)
Please take a look at the example code (hope this helps)!
Daniel
NIG