NXT Datalogging Exception
I am trying to create a datalog with my accelerometer values in RobotC.
When I ran the program, an error screen appeared reading:
Byte Code Interpreter Exception:
Exception Type: 'Real Adress Range Exception(59)'
The reason I find this confusing is that in the line of coded in question (marked by the arrow), I cast the long variable robotstate.lasttime into an integer.
Here is my code (the important bits):Important notes:
robotstate.accelvals.x is an integer (yet no errors).
robotstate.lasttime is essentially nPgmTime(also a long)
I did change a line of code in RobotCIntrinsics: I commented out the initial delaration for AddToDatalog(); and uncommented another declaration to take integers as values: