View unanswered posts | View active topics It is currently Mon Sep 21, 2020 4:21 pm






Reply to topic  [ 3 posts ] 
Help: Exception Type: 'Real Address Range Exception(68)' 
Author Message
Rookie

Joined: Sun Jan 11, 2009 3:40 am
Posts: 4
Location: Taiwan
Post Help: Exception Type: 'Real Address Range Exception(68)'
I run the following simple code in robotC v1.46, and got the exception:
Exception Type: 'Real Address Range Exception(68)'
However, if the "*1.0" changed to integer, "*1", then no exception.
why? anything wrong?
------------------------------------------------------------
void syncMove(tMotor master, tMotor follower)
{
float err;
err = nMotorEncoder[master]*1.0 - nMotorEncoder[follower];
}
task main()
{
syncMove(motorB, motorC);
wait10Msec(500);
}


Sun Oct 25, 2009 8:28 am
Profile
Guru
User avatar

Joined: Sat Mar 01, 2008 12:52 pm
Posts: 1030
Post Re: Help: Exception Type: 'Real Address Range Exception(68)'
faulty floating point calculations and exceptions are a well known issue in Ro-bugC .

try the following - what happenz...?

Code:
float err, temp1, temp2;
temp1= float(nMotorEncoder[master]);
temp2=float(nMotorEncoder[follower]);
err = temp1*1.0 - temp2;

_________________
regards,
HaWe aka Ford
#define S sqrt(t+2*i*i)<2
#define F(a,b) for(a=0;a<b;++a)
float x,y,r,i,s,j,t,n;task main(){F(y,64){F(x,99){r=i=t=0;s=x/33-2;j=y/32-1;F(n,50&S){t=r*r-i*i;i=2*r*i+j;r=t+s;}if(S){PutPixel(x,y);}}}while(1)}


Sun Oct 25, 2009 1:02 pm
Profile
Rookie

Joined: Sun Jan 11, 2009 3:40 am
Posts: 4
Location: Taiwan
Post Re: Help: Exception Type: 'Real Address Range Exception(68)'
Simply saving encoder to temp, it works.
Thanks.


Mon Oct 26, 2009 1:09 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.