Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 13:25 11 Nov 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Problem with "TEMPR" and Array,s ! BUG ?

Author Message
PicFan
Senior Member

Joined: 18/03/2014
Location: Austria
Posts: 133
Posted: 09:17am 05 Jun 2018
Copy link to clipboard 
Print this post

The problem concerns the MM-plus V5.04.04 - V5.04.09 BETA 19, as well as MZ V5.04.14! Please try the following:

The mistake is not the temperature value, which is correct, but the array (the_ARR (2,2)) is overwritten!


option explicit
option default integer

dim the_Arr(3,8)
dim float mt

the_Arr(2,2) = 55

do
the_Arr(2,2) = 55
'tempr start 42
print "STA "the_Arr(2,2)
pause 2000
'mt = tempr(42)
print "END "the_Arr(2,2)
loop

OUTPUT:

STA 55
END 55
STA 55
END 55
. . .

. . . uncomment the "tempr" commands

option explicit
option default integer

dim the_Arr(3,8)
dim float mt

the_Arr(2,2) = 55

do
the_Arr(2,2) = 55
tempr start 42
print "STA "the_Arr(2,2)
pause 2000
mt = tempr(42)
print "END "the_Arr(2,2)
loop

OUTPUT:

STA 1254003
END 0
STA 1256003
END 0
STA 1258003
END 0
STA 1260003
. . .


The value that is erroneously written into the array is the TIMER-Value + 2000! (PAUSE 2000)

I can only reproduce the error with this array dimension (3, x) and only on index (2, x)!

The error does not occur with the MM170 with V5.04.08!


Thank you and best regards from Austria !

WolfgangEdited by PicFan 2018-06-08
 
rentner111
Newbie

Joined: 18/03/2014
Location: Austria
Posts: 19
Posted: 03:31pm 06 Jun 2018
Copy link to clipboard 
Print this post

It is a BUG !!

The BUG also occurs on my PIC 32MX470F512 version 5.04.09, and is reproducible at any time.

The value of Arr (2,2) is overwritten with another value by the "tempr start" command.

The value probably comes from a timer.

The command "tempr" then writes the value "00" into Arr (2,2).

This error occurs only at Arr (2,2).

Please answer.

Even the very useful function "continue" does not work reliably anymore.

Many thanks from Austria-Tyrol.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10570
Posted: 11:48am 07 Jun 2018
Copy link to clipboard 
Print this post

I've found a temporary workround . Limit the use of pin numbers for the DS18B20 to less than 32

option explicit
option default integer

dim the_Arr(3,8)
dim float mt

the_Arr(2,2) = 55

do
the_Arr(2,2) = 55
tempr start 22
print "STA "the_Arr(2,2)
pause 2000
mt = tempr(22)
print "END "the_Arr(2,2)
loop


Works fine - I've emailed Geoff with the fixEdited by matherp 2018-06-08
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025