News:

  • May 16, 2024, 11:42:16 PM

Login with username, password and session length

Author Topic: Reverse acting (negative) PID loops in DirectSOFT w/ 260  (Read 6048 times)

nieder

  • Newbie
  • *
  • Posts: 4
Reverse acting (negative) PID loops in DirectSOFT w/ 260
« on: May 23, 2007, 04:38:50 PM »
Running 3 PID loops with "T" type thermocouple inputs.  2 are positive loops, which are working as expected.  The third needs to regulate below "zero".  When my sensed temperature crosses the zero threshold into the negative region, my sensed temperature trends up -- when actual temperatures are really going down.  I can mask and see the sign bit as working as expected.  What do I do with it?  How do I get my loop to regulate in the negative region?  (works well now -- if I don't ask it to cross zero, i.e.:  regulate at 10 deg. C.)  Is there a general approach to the problem?  Maybe a quick program example I can reference?  I'll do the homework, just give me some direction.  Thanks, ln

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3666
    • Host Engineering
Re: Reverse acting (negative) PID loops in DirectSOFT w/ 260
« Reply #1 on: May 23, 2007, 04:52:39 PM »
You're not going to like the answer.  You're gonna have to "adjust" all the values up to an absolute scale.  For example, if your PV range is -40 to +300, you're gonna have to add 40 to everything (PV, SP) for it to range 0 to 340.   :-[

nieder

  • Newbie
  • *
  • Posts: 4
Re: Reverse acting (negative) PID loops in DirectSOFT w/ 260
« Reply #2 on: May 23, 2007, 05:00:23 PM »
That's okay.  I do like the answer.  It makes perfect sense to me.  I have already performed an experiment whereas I add 100 (1000 w/ implied decimal point) to my incoming TC readings.  I am using LD's, ADD's, and OUT's.  Should I be in double-land?  Perhaps my real problem is that I don't know how to work with the doubles in order to properly add, say -10 to 100 to get an answer of 90.  Is there some direction there?  Thanks, ln

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3666
    • Host Engineering
Re: Reverse acting (negative) PID loops in DirectSOFT w/ 260
« Reply #3 on: May 23, 2007, 05:13:28 PM »
The PID can only handle single word values.  If you are reading directly in from the analog, did you try setting up the channel transfer yourself in the PID configuration table?  Is it 15 bit bipolar? (I'm not an analog module guru).  It may just work.  You may have it misconfigured as 12 bit unipolar or something?

nieder

  • Newbie
  • *
  • Posts: 4
Re: Reverse acting (negative) PID loops in DirectSOFT w/ 260
« Reply #4 on: May 24, 2007, 03:07:27 PM »
I am setup as Magnitude Plus Sign, degrees C, for my "T" thermocouple.  The reverse acting PID loop is set up as 15 bit unipolar on input SV, and output PV.  Still when my sensed temperature crosses from positive to negative (crossed through zero) my temperature reading begin to go up.  When in actual they are still falling.  At that time PV begins to move away from SV.  The system will not regulate properly.  I believe the problem still resides with how I am moving the BCD data from the F2-04THM memory locations to the PV memory locations.  I am loosing the sign bit somehow.  Any more thoughts?  Thanks--ln

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3666
    • Host Engineering
Re: Reverse acting (negative) PID loops in DirectSOFT w/ 260
« Reply #5 on: May 27, 2007, 03:57:37 PM »
I am quite confused.  You want your PID to handle negative values, yet you configure it for 15 bit unipolar???

You SHOULD match your PID to your analog input range, if you can.  You mention "magnitude plus sign".  Make sure this is NOT BCD.  Can the module be configured as truly "magnitude plus sign" in binary (e.g. 8001 hex is -1, FFFF hex is -32767, 0FFF is +32767)???

Then configure the LOOP to be 15 bit BIpolar (not unipolar????).  Your output can be different (aka "independent") data format.