01-13-2009 08:25 AM
Hello,
I am trying to control a heater temperature around a set point. My feedback sensor is a thermocouple connected to SCXI conditioning hardware. I read my thermocouple value using a global virtual channel. My analog output of a USB 6211 connects to an HBridge controller, and I have successfully used it as an analog output before.
Using PID Control-Single Channel.vi and virtual_channels_example.vi, I have constructed a program that is set up to take my input thermocouple global virtual channel and then have an analog output. However, I get error 200561 "Attempted writing analog data that is too large or small. Data: -24 Range min: -10 Range max:10." I know that the value of 24 is actually my thermocouple reading, and not an output voltage. I have attached a screenshot of my code; what do I need to change in my program?
Thanks,
Melanie
01-14-2009 11:47 AM
Melanie,
You'll need to make quite a few changes. In it's current form, this VI (using the Proportional Gain VI) subtracts the current reading from the set point, then multiplies the difference by your chosen gain. That setup only works if you are trying to adjust an output voltage based on an input voltage in the same range. Because we are essentially trying to control a voltage output in one range with a voltage input in another range.
You will need to determine a series of things:
Once you have all of these values, you can modify the Proportional Gain sub VI to correct for all these factors.