Author Topic: HSCDEF fn_num issue with i-TRiLOGI 7.03  (Read 14434 times)

garysdickinson

  • Hero Member
  • Posts: 502
  • Old PLC Coder
    • View Profile
HSCDEF fn_num issue with i-TRiLOGI 7.03
« on: January 07, 2015, 04:48:00 PM »
The HSCDEF statement does not tolerate the "name" of the custom function but requires the numeric constant for the 2nd argument.  This seems like an oversight.

The following code snippet will not compile.  "Accumulate" is the name of custom function #4. No error message is generated indicating that this syntax is unacceptable.


HSCDEF 1, Accumulate ,9999
[/color]

This code will compile:


HSCDEF 1, 4 ,9999
[/color]

It would be nice if the compiler could indicate the failure.  

It would be better if the HSCDEF statement could accept the the "name" of the custom function.

Best regards,

Gary D.
« Last Edit: January 07, 2015, 04:52:39 PM by garysdickinson »

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:HSCDEF fn_num issue with i-TRiLOGI 7.03
« Reply #1 on: January 08, 2015, 10:34:14 PM »
Thank you for your feedback. We will consider this suggestion for future updates.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

garysdickinson

  • Hero Member
  • Posts: 502
  • Old PLC Coder
    • View Profile
Re:HSCDEF fn_num issue with i-TRiLOGI 7.03
« Reply #2 on: January 09, 2015, 05:13:21 PM »
Thanks guys.

I looked at a similar function statement, "INTRDEF".  Intrdef will accept either the function # or the function name.

Both formats are acceptable to the compiler:

INTRDEF 1, Accumulate, 1

or

INTRDEF 1, 4, 1             ' 4 is the function number

If I use an invalid function name, the compiler does fail and returns a error message that is useful.  This is a very good thing!!!

I think that the same parsing rules that you are using for INTRDEF could be applied to the parsing of HSDCEF statement.

Best regards,

Gary D.

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:HSCDEF fn_num issue with i-TRiLOGI 7.03
« Reply #3 on: January 10, 2015, 10:20:42 PM »
Thank you for your feedback and suggestions. We have updated the compilers (for both TL6 and TL7) allow function label name to be used for the interrupt service routine in HSCDEF.

A new release will be provided with the standard installer. But for your benefit you can download it from the following link:

    [trilogi upgrade weblink]/TL703b6.zip

Same username and password is required.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

garysdickinson

  • Hero Member
  • Posts: 502
  • Old PLC Coder
    • View Profile
Re:HSCDEF fn_num issue with i-TRiLOGI 7.03
« Reply #4 on: January 11, 2015, 01:58:15 PM »
Thanks guys!

I downloaded the "build 6" version and gave it my simple test.  HSCDEF now seems to accept the function name or the function number as a valid argument.

If I use nonsense values for the argument, now the compiler complains and provides a meaningful error message.

Thanks again,

Gary D.

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:HSCDEF fn_num issue with i-TRiLOGI 7.03
« Reply #5 on: January 12, 2015, 09:54:58 AM »
Thank you for your suggestions and test report!

The new versions (7.03 build 06 and 6.49 build 04) setup files are now officially released and available for download via the standard i-TRiLOGI upgrade link.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS