Vweber Posted December 15, 2016 Share Posted December 15, 2016 I am new to scripting. Am using DF and with labjack T7 pro to conrtol a few pumps heaters and fans. I cannot seem to get anything to work when trying to have hysterisis. Have used both sequence and also events. The following was typed and applied in a temperature channel (Tbw) event tab. The result was that the Heater, BH2 kicked on as temp fell to below 68, and kicked off as soon as the temperature (Tbw rose above 68. My thought was that it should have passed 70 before it kicked off. If (Tbw[0] < 68) BH2 = 0 endif if (Tbw[0] > 70) BH2 = 1 endif I have tried it as a sequence as a while loop as well and it does the same thing. Any help would be great! Vic Link to comment Share on other sites More sharing options...
AzeoTech Posted December 15, 2016 Share Posted December 15, 2016 Can you post or email the full document? Link to comment Share on other sites More sharing options...
Vweber Posted December 16, 2016 Author Share Posted December 16, 2016 Attached file. See Tbw channel event tab This is copied essentially right out of handbook, but only serves to turn on the heater at less than 68, and off at greater than 68. See BH2_control sequence. Another copy of slightly different hysterisi technique. This one turns the heater on and off at a 1 second interval once it falls through a threshold of 68. Thanks, vic system control beta.ctl Link to comment Share on other sites More sharing options...
AzeoTech Posted December 16, 2016 Share Posted December 16, 2016 Most likely the problem is that you have a non-zero Timing on your output channels (BH2 in particular). The T7 is different than other devices in that for I/O that is actually input or output, DAQFactory doesn't know straight up whether to treat it as an input or output so defaults to a Timing of 1 (assuming input). But for outputs that can be weird because reading the output will cause the T7 to turn the output back to an input. So, set your Timing to 0 on all output channels and see if that helps. Link to comment Share on other sites More sharing options...
Vweber Posted December 16, 2016 Author Share Posted December 16, 2016 I will give that a go and see what happens. Will be a few days before I can try it. Will let you know. Thanks vic Link to comment Share on other sites More sharing options...
Vweber Posted January 24, 2017 Author Share Posted January 24, 2017 I set the output timing to zero and everything finally started to behave. Thanks for the tip. vic Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.