LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Watch does not support 2 D arrays ?

Solved!
Go to solution

Hello,

I have a two-dimensional array x_data [  ] [  ]. In the Variables window I can view x_data [ 0 ], x_data [ 1 ]... If I click on the plus sign because I want to see the individual elements a popup shows up suggesting to provide the array view because the number of elements is too large. With the array view (and only with the array view) I can view all elements of my array.

Now, I want to have the debugger break execution if say x_data [ 1 ] [ 1 ] changes - but I see no way to achieve this because in the array view I can not add / edit a watch expression.

Is there a possibility to achieve this goal?

Thanks a lot!

(using CVI2017) 

0 Kudos
Message 1 of 7
(3,896 Views)

Hi Wolfgang,

 

I tried to replicate the problem you have described and I can only agree that the requirement to switch to array view complicate things a bit ... as creating a watch expression gets much harder now - however not impossible. As the array view does not allow you to add this expression you will need to create any watch expression and then edit it to track one single cell of the array. 

 

I believe I have managed to do what you wanted to achieve, below a screen-shot. Let me know if you have any additional questions. 

 

Thanks for adding a post to the CVI Idea Exchange. 

 

Mateusz

 

CVI1.png

 

 

 

 

 

---
CLA,CTD,CLED
Message 2 of 7
(3,801 Views)

Hi Mateusz,

Thank you very much for your interest!

Your screenshot looks like what I wanted to achieve, i.e. monitor the value of, e.g., test [ 1 ] [ 1000 ].

How did you edit the watch expression to track one single cell of the array? In my watch window I only can see the tree test [ 0 ], test [ 1 ], ... but have not found the way to select test [ 1 ] [ 1000 ].

 

Thanks....

0 Kudos
Message 3 of 7
(3,797 Views)

Truth to be said, I used some nasty workaround to achieve that:

 

1. Create a temporary 2d array with a small number of elements, let's say: int temp[2][2].

2. Create watch Expression for a single cell of the temp array. 

3. Right-click on the new watch expression and choose "Edit Watch Expression" option

4. Change the name of the array to the one you want to track. 

5. Do not forget to click enter before leaving the field.

6. Select Break on Change

 

For sure it's not great. I will try to escalate this behaviour to R&D. 

---
CLA,CTD,CLED
0 Kudos
Message 4 of 7
(3,793 Views)

Hm, thanks again.

I can follow your steps except some differences:

- I cannot create a watch expression for a single cell, only for test, see my screenshot:

watch.png

 

- as soon as I change the name of 'test' to my variable of interest, the detailed view as shown above is collapsed and all I see is x_data [ 0 ], x_data [ 1 ], ..., not the individual elements

0 Kudos
Message 5 of 7
(3,790 Views)
Solution
Accepted by topic author Wolfgang

To be sure we are trying to do it in the same way I created a small video, please find it attached. 

---
CLA,CTD,CLED
Message 6 of 7
(3,786 Views)

Ah, now I understand, one has to set the watch expression via the variable view of the individual element Smiley Happy

Thanks so much for your enthusiasm!

0 Kudos
Message 7 of 7
(3,779 Views)