You will be able to read the thermocouple using a ScanImage user function.
Please review the section 'User Function' in the ScanImage API documentation page for an example how to set up a user function.
It is very important that your user function does not take up too much time. I think the approach of checking s.BytesAvailable is a good start.
Alternatively, you could also use the NI DAQ boards during an acquisition to read out thermocouple data.