Author Topic: Sorry, broke the simulator with PIDCompute  (Read 12534 times)

garysdickinson

  • Hero Member
  • Posts: 502
  • Old PLC Coder
    • View Profile
Sorry, broke the simulator with PIDCompute
« on: May 08, 2015, 07:52:33 PM »
Sorry, but I broke the simulator in i_TRILOGI 7.03 Build 08.

I was working with the PidCompute function and got real different results between hardware and simulation.

This is the entire program:


PIDDef 1, 1.0, 0.333, 0.0, 0.0      ' chn, limit, P, I, D ...

A# = PIDCompute(1, 1.0)         ' A# will be 0.333 with simulator. 0.0 with hardware
[/font][/color]

Target hardware Fx-CPU F90.7

I think that the problem is with the PLC firmware and not the simulator. The issue may be setting the limits argument to PIDDef to a value of 1.  I was expecting the values returned from PIDCompute in the range of -1.000 to +1.000 but only got values of 0.0!

If I program everything using scaled arguments limit = 1000, P = 333.0 the the output from PID compute is 333. I suspect that something in the "new" PIDCompute function was not completely recoded for floating point calculations.

Is there a never version of firmware for the Fx processors?


Gary D.
« Last Edit: May 09, 2015, 09:15:50 AM by garysdickinson »

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Sorry, broke the simulator with PIDCompute
« Reply #1 on: May 12, 2015, 09:24:33 AM »
Thank you for your report. We have identified a bug in the PIDDefine statement which resulted in the floating point P, I, D values being rounded to integer. This bug has been fixed and released on the Fx PLC firmware upgrade page.

Note: Firmware upgrade page is available upon request by licensed Fx PLC users only - please write to support@triplc.com and provide the invoice number or a PDF copy of the past purchase record.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

garysdickinson

  • Hero Member
  • Posts: 502
  • Old PLC Coder
    • View Profile
Re:Sorry, broke the simulator with PIDCompute
« Reply #2 on: May 13, 2015, 08:58:38 AM »
Thanks,

I'm glad that you guys could figure out my confused description of the problem.

This is why I try and find the simplest program example that demonstrates the problem.

Thanks,

Gary D.