05-23-2016 05:54 PM
Hey all,
I'm working on a project to automate voltage control for hvac testing equipment. The code is pretty large, but the portion that I have been working on is attached in the first Jpg. Attached in the second jpg is the ideal theory as drawn by the three year old me. I had previously tried using a PID loop method but with the digital setup style, was not able to get an on/off digital signal.
So the goal is to read data from the Yokogawa power meter, and use a range function as a true/false, if false the voltage would be manipulated till the reading was within tolerance. However it keeps kicking me out of the code for some reason, as in the program stops running.
If anyone has some insight on if I am coding correctly for this problem or if they have any idea’s of why my program has stopped running. I also would like to note that if I were to delete the shown code the program runs fine and all other functions work properly. As well i figure I should add this system is currently set up utilizing NI's cRIO for the control side and using yokogawa hardware for the data aqcuisition side. Why we have two different setups is beyond my knowledge currently, if I figure a reason for the two hardware type I will update. Additional hardware is misc HVAC equipment, presure transducers, thermocuples and other misc hvac equipment, which so far is running great within the code and haven't had any issues.
Thanks,
Sam
05-23-2016 06:32 PM
You need to keep reading the data from the Yokogawa inside of the loop. Otherwise you just keep working with old data.
05-23-2016 06:56 PM
Thanks for that! I moved the yoko into the while loop (it's another global variable). I am still encountering my code shutting off after about 7 seconds. I have change the timer from 8000 to 3000 to 12000 and same result of 7 seconds with is making me think that it's not related.
05-23-2016 07:07 PM
@SAMB. wrote:I am still encountering my code shutting off after about 7 seconds.
This is running in a cRIO, right? Are you using a watchdog?
05-23-2016 07:57 PM
The cRIO seems to be working fine, I can manually control voltage and other instruments. There is not watchdog control currently set up.