Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Plotting M vars from ACC72Ex
#1
Hi all,
during a debugging session I tried to plot data coming from Acc72Ex only to find that I could only plot fuzzy data.

Looking better, if I plot the whole word without any filter , I can see a huge value ramping up despite the value shown on the watch window is constant

The variable is defined as Acc72EX[0].Udata16[3200]

Any ideas?


Attached Files Image(s)
   
Reply
#2
I'm assuming Ptr. whole word is Acc72EX[0].Udata16[3200]. While it is ramping up, if you look at the left y axis, you can see that it is also basically constant in value. It's always 762.38*10^6. When I look at the watch window I see 1717, a completely different value.

Are you sure that pointer is pointing at that structure element? Also, at the top of your watch window, does it say online?
Reply
#3
Yes everything's online

It's not possible to define a plot variable using Acc72Ex data structures (at least that I am aware of).
So I used the pointer variable.

I tried with another one, but result is the same:

ptr _Fieldbus_In62 ->Acc72EX[0].Udata16[3261] ;

In this variable I can read a value between 0 and 360 (degrees) in the watch window.

Here is the plot with the corresponding global variable for comparison:
red one is the ptr (ramping up with 10^6 values) and the violet is how it should look like.

Hopefully someone from DT will chime in...


Attached Files Image(s)
   
Reply
#4
Acc72EX[i].Udata16[j] is an unsigned 16-bit integer with a range of 0 to 2^16-1=65535.
I'm seeing values of up to 762.38*10^6 when you plot the pointers. It would take 30 bits to store an unsigned integer that large.

You may try specifying the bits when you make your pointer.
PTR M__ -> Acc72EX[0].Udata16[3200].0.15
or
PTR M__ -> Acc72EX[0].Udata16[3200].8.23 (some turbo accessories will start at bit 8 instead of 0 in power)
Reply
#5
Hi,
none of the suggestions is working. Any other ideas?
Reply
#6
I believe your pointer is either rolling over, or showing both 16 words in that 32 bit register, when you only want one. Please provide your pointer definition as well as a screenshot of the "Process Data" window from the plot setup. If you select the variable in the column "Step 3 - data Processing" and click either scale factor or offset at the bottom, you will see this window.
Reply
#7
(04-13-2018, 09:44 AM)Eric Hotchkiss Wrote: I believe your pointer is either rolling over, or showing both 16 words in that 32 bit register, when you only want one. Please provide your pointer definition as well as a screenshot of the "Process Data" window from the plot setup. If you select the variable in the column "Step 3 - data Processing" and click either scale factor or offset at the bottom, you will see this window.

Hi Eric, the pointer has this address:

M10271->Acc72EX[0].Udata16[3261]

And this is the screenshot


Attached Files Image(s)
   
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)