Hello,
the following problem with setting the cursor in an intensity graph
occurs:
I have to switch between different arrays shown in the graph. While
switching the arrays, the cursor should stay at the same point, as
close as possible. The problem is, that the arrays may not fill the
whole grpah, but can be subsets of the whole graph. To try to be more
clear:
The whole graph can show an 128x128 array. Sometimes I want to show
only a subset, e.g. a 32x32 array that starts at 16,48.
This I can achieve by using the properties XScale.Offset and
YScale.Offset. So far, this is working.
Additionally, sometimes I have arrays where columns are missing,
e.g. I have only every other or ever third column to show. This I can
achieve using the property XScale.Multiplier. So far, this is working,
too.
Now to the point. The cursor must be locked, so that the user cannot
move the cursor outside the plot if I show only a subset of the whole
array. Therefore I use the properties Cursor.Index and Cursor.Plot to
set the cursor positions, as mentioned on the NI page and in articles
in this group.
And here the problem arises. If I first show an array that has only
every third column (i.e. XScale.Multiplier=3) and then switch to an
array that has every column (i.e. XScale.Multiplier=3) then the cursor
is set only in a correct way if the Index is 42 or below, which means
less than a third of the whole array. If the Index is 45 or above the
cursor jumps to 0,0 upon switching to the array that has every column.
If I first have an array that has only every other column
(i.e. XScale.Multiplier=2) then the erratic beaviour occurs if Index
is 64 or above, so it seems to be directly connected to the value
of XScale.Multiplier...
The extremely strange point is that, if I read Plot and Index directly
after setting them, I get the correct values.
I may note that I do not set everything at the same time. After
gettign the first errors, I decided to break it up into several parts.
I have four property nodes, serialized by an error wire.
First I set ActCrsr, XScale.Offset, YScale.Offset and
XScale.Multiplier
Then I set XScale.Range and YScale.Range. This is necessary after
changing XScal.Mulitplier, otherwise the range is also multiplied.
Then I set Cursor.Plot and Cursor.Index
Then I read Cursor.Plot and Cursor.Index, which gives me ALWAYS the
correct result, even if the Cursor is not set correctly.
Does anybody know how to deal with that?
Best regards
Armin Lambacher