Posted 17 May 2016 in Citect i use the following function to associate various Tags with the next popup window, in the previous versions the tags passed to the trend fine since upgrading to 7.4 the trend pens dont display but all the values display fine. FUNCTION // function AssPIDPopup // Expand a full set of PID tags and open // the PID block supergenie AssPIDPopUp(STRING sSGenie,STRING sBasePIDTag) AssVarTags(-2,0,sBasePIDTag + "_PV"); AssVarTags(-2,1,sBasePIDTag + "_SP"); AssVarTags(-2,2,sBasePIDTag + "_OP"); AssVarTags(-2,3,sBasePIDTag + "_MAN"); // Now the tags for the PID tuning SG AssVarTags(-2,4,sBasePIDTag + "_KP"); AssVarTags(-2,5,sBasePIDTag + "_KI"); AssVarTags(-2,6,sBasePIDTag + "_KD"); AssPopUp(sSGenie); END I added a button to run the following code FUNCTION Loadtrend() TrnSetPen(19, 1, AssInfoEx(1,0)); TrnSetPen(19, 2, AssInfoEx(2,0)); TrnSetPen(19, 3, AssInfoEx(3,0)); Prompt("Test"); END when clicked the pens set to the trend fine, i tried to run the code from a function but it did not work. i am new to citect and am sure i am missing something stupid. Share this post Link to post Share on other sites