It sounds like you want to do a continuous analog output that does not rewrite old data. If this is the case, use the property DAQmxSetWriteRegenMode set to DAQmx_Val_DoNotAllowRegen before your timing function. Then write your data in a while loop. With this method the buffer is handled for you. Have a great day!