Author Topic: Status(5) function  (Read 6494 times)

Philippe Parmentier

  • Newbie
  • Posts: 29
  • new in plc
    • View Profile
Status(5) function
« on: March 22, 2014, 09:39:08 AM »
I'm trying to display the current firmware version of the FMD88-10 PLC with this function
Status(5) but everytime it's returning 0.

I've tried on a 78B and 81 firmware version of PLC and both are returning 0

Am I doing something wrong?

Regards

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3171
    • View Profile
    • Internet Programmable PLCs
Re:Status(5) function
« Reply #1 on: March 23, 2014, 10:05:30 PM »
Try this example. Only works with PLC with firmware >= r78.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

Philippe Parmentier

  • Newbie
  • Posts: 29
  • new in plc
    • View Profile
Re:Status(5) function
« Reply #2 on: March 24, 2014, 02:24:00 AM »
Thanks for your example, but I'm getting the same result as my code.

the function return 0

Attached the printscreen Of the firmware

Philippe Parmentier

  • Newbie
  • Posts: 29
  • new in plc
    • View Profile
Re:Status(5) function
« Reply #3 on: March 24, 2014, 02:24:28 AM »
And the result of the display

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3171
    • View Profile
    • Internet Programmable PLCs
Re:Status(5) function
« Reply #4 on: March 24, 2014, 09:37:51 AM »
When I transferred the test program to the PLC and trigger the GetFWVer input it did respond the firmware version. But when I power off the PLC and then power on again I got what you observed - i.e. the STATUS(5) returns a zero.

So I think there is a bug with the STATUS(5) - the data was set only when there is a query of the firmware version from the hostlink command. This will not be very useful as an automatic indication of the firmware version to the program which was the original intention. This is now reported to the FW development team for future fixes. So this function should not be used

If you still want to use this feature one way is for your program to copy the STATUS(5) result to a FRAM address space during 1st.Scan when it determines that STATUS(5) returns a non zero value (when the program is first transferred to the PLC and a reset is trigger). The FRAM space is then used as indication of the firmware version.

E.g. in an INIT function triggered by a 1st.Scan pulse:

IF STATUS(5) >= 78
     SAVE_EEP STATUS(5), 1000  
ENDIF

The firmware version is then stored into the FRAM address 1000 which can be used as an indication of the firmware version.


Email: support@triplc.com
Tel: 1-877-TRI-PLCS