Internet PLC Forum

General => Technical support => Topic started by: garysdickinson on June 13, 2017, 06:55:34 PM

Title: Simulator issue with parameterized functions 7.12 Build 03
Post by: garysdickinson on June 13, 2017, 06:55:34 PM
I am having problem debugging a trivial program in 7.12.  I am breaking the simulator with the following code:
Code: [Select]
' FmtFloat - test CF that passes a copy of the the floating value, A#, and the argument, 1, to
'   the StripPlus function with the home that it will return a string in A$

%[1] = StripPlus(A#, 1)

When I try to test this code in the simulator I get the following run-time error message after StripPlus() executes and returns:


"Run-Time Error in Fn #1
 Error:illegal memory access!
 Program has been Halted"


This is the CF, StripPlus:
Code: [Select]
' StripPlus on entry %[1] is the float to convert, %[2] is the number of decimal digits
'
A$ = str$(%[1], -%[2])

' Now discarad the leading "+" that gets attached to positive values

if strcmp(mid$(A$,1,1), "+") = 0
   A$ = mid$(A$,2,len(A$)-1)
endif

Strip Plus actually does what I want, but I can't figure out what I have done to annoy the simulator.

I can write the code without the use of the "new" parameterized function calls, but I keep thinking there must be a use for this feature.

Do you have any ideas on how I broke the simulator?

Best regards,

Gary D*ckinson
Title: Re:Simulator issue with parameterized functions 7.12 Build 03
Post by: support on June 14, 2017, 01:57:05 PM
Thanks for the bugs report. The engineering will run some test on your reported issues and get a fix soon. We will let you know when the issue has been resolved.
Title: Re:Simulator issue with parameterized functions 7.12 Build 03
Post by: support on June 16, 2017, 10:31:05 AM
Hi Gary,

We have found out that a bug was inadvertently introduced into the TRiLOGI version 7.1x simulator (your program actually worked correctly in the older version 7.0). This however does not affect the program if it is run in the PLC. So the issue was only with the simulator.

This bug has been fixed and will be included in the next release of i-TRiLOGI software. Meanwhile we have communicated with you via email to provide you with an interim software version that allows you to simulate your program.

Thank you.