Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Need debugging on my code for temperature control

I have written a code for a Rapid Thermal Process (RTP) chamber for automating the temperature control. In this code I am controlling the input voltage to a rectifier (power supply) using NI 9263. The rectifier sends out current to an array of lamps in the chamber to heat it up. The heating process has to be real quick (the set temperature needs to achieved within ~30 seconds, and once it reaches the set-point it will stay there for a user specific time. The temperature in the chamber is dynamically fed through k-type thermocouple to the computer through NI 9211. I have tried running my code but it keeps popping up this error message "Error 200609 occurred at DAQmx write (Analog 1D Wfm Nchan Nsamp).vi:2". The recommendation for troubleshoot was increasing the buffer size. I am not sure how to do that. I have attached the .vi file and the screen shot of the error message. 
Download All
0 Kudos
Message 1 of 8
(3,537 Views)

Hi,

Looking at your code, you AO DAQ assistant is set to continuous generation and you are giving it one data point. That error is telling you that you need to give it at least 2 data points if you wish to do continuous generation (ie: continuously change the value being outputted.) If you wish to update the output value every iteration, you could use “One Sample (On Demand)” and give it your one value. This value will remain until you update it with a new value. Let me know if you are still having trouble with that.

Matt
Applications Engineer
National Instruments
0 Kudos
Message 2 of 8
(3,503 Views)
I have changed my code (attached with this post) so that both the DAQs have continuous sampling. But I still got the same error message.
0 Kudos
Message 3 of 8
(3,484 Views)

I think you must have misread my last post. That error is caused my only giving one data point to a continuous analog generation task. To fix that error you need to change the DAQ assistant that is generating your output to be “One Sample (On Demand)”. Additionally, you should change your analog input DAQ Assistant back to “One Sample (On Demand)” or to finite that way each time your loop iterates you will get fresh data that reflects the changes of your PID control.

Matt
Applications Engineer
National Instruments
0 Kudos
Message 4 of 8
(3,475 Views)
If I change my DAQ Assistant 2 to 1 sample on demand, then it gives me an error that DAQ Assistant 2 is not executable.
0 Kudos
Message 5 of 8
(3,456 Views)

Not Executable? Can you delete that DAQ assistant and create a new one? Can you post your latest code with this error? I did it here without error so I’m curious as to what may have changed.

Matt
Applications Engineer
National Instruments
0 Kudos
Message 6 of 8
(3,429 Views)
I have deleted both the DAQ assistants and added them again. Here's the latest version of the code, with error message it's giving me.
Download All
0 Kudos
Message 7 of 8
(3,417 Views)

Hi Fountainhead,

Can you try creating a task in Measurement and Automation Explorer and see if you get the same sort of error?  Can you right click on the DAQ Assistant and select “Generate Code”? Also try this VI on your machine and see if it runs.

 

Matt
Applications Engineer
National Instruments
0 Kudos
Message 8 of 8
(3,387 Views)