Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
unsigned user variable "byte offset" limits
#1
I've created a series of ptr statements in a global definitions.pmh file formatted as follows:
ptr hmi_do_WH1UprGripRelease->u.user:$108.31.1;

The Byte Offsets are sequential and compile up to the previous statement. But when I increment up to the next Byte Offset like:
ptr hmi_do_WH1LwrGripRelease->u.user:$112.0.1;

It generates a compile error. If I change the 112 to a 0, then it compiles to up to the next byte offset over 108. If I keep changing the over 108 numbers to lower numbers, the error contiues to move down the list. Is 108 the limit for the byte offset for unsigned user data?

Rick
Reply
#2
Well, I went though the file and renumbered all the byte offets to lower numbers and I still have the same error at the same line. but when I comment out the offending line ( and surrounding lines ) then error messages moves up and down the list. I've included the file for anyone who wouldn't mind taking a look at it. The line generating an error is marked and around line 120. Thanks. Hope someone has a clue to the problem.

Rick


Attached Files
.pmh   wh1_io_ptrs.pmh (Size: 14.88 KB / Downloads: 10)
Reply
#3
You are having byte boundry problems. In the defintion "->u.user:$108.31.1" the "$" means the following number is hexadecimal, just as 0x108 means hex in "C". So your next address should be $10C.

If you look at $112 this is 274 decimal which is not divisible by 4 and this is why the defintion is creating an error.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)