LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 1077 in Sub VI chart node property code

Hi all,
I've finally worked out how to be able to change the data that is plotted in a strip chart, the code I have below works fine if it is added into my global loop, however it takes a lot of room and I'm trying to place it in a sub VI. However, when I do this I get the 1077 error on one of the property nodes, if I click ignore it moves onto the next node etc. I read in other posts that the problem had resulted from the order in which the code was executed, but I can't see where I could have gone wrong. If someone could point it out to me that would be great.

As for what this sub vi does, the max and min arrays store the max and min values of the y axes to be configured on the front panel, there is 6 strip charts and 20 data strands which can be plotted. When the user selects the data they want plotted in the strip chart, the property node of that strip chart is used to hide all the plots except the one selected and adjust the axes to the required scale. If someone could point out where I have gone wrong here that would be greatly appreciated!!
Stirling
0 Kudos
Message 1 of 8
(3,776 Views)


@stirlsilver wrote:
Hi all,
.

As for what this sub vi does, the max and min arrays store the max and min values of the y axes to be configured on the front panel, there are 6 strip charts and 20 data strands which can be plotted. When the user selects the data they want plotted in the strip chart, the property node of that strip chart is used to hide all the plots except the one selected and adjust the axes to the required scale. If someone could point out where I have gone wrong here that would be greatly appreciated!!
Stirling


Does each chart always have 20 plots? Or is there a chance that a chart would have less than that?
Also, you say 20 plots, but you initialize an array with 21 elements, and that is getting autoindexed by the loop.  So the loop runs 21 times and not 20.  I am wondering if you are getting an error when you try to set the properties for the 21st plot which doesn't exist.
Message 2 of 8
(3,749 Views)
Legend!! That fixed it. I just had to set that initial value down to 20 instead of 21. I had originally set it up like that because I was having some trouble addressing the zeroth index value of the array. This is what it it looks like fixed Smiley Happy

0 Kudos
Message 3 of 8
(3,744 Views)
Great!  I'm glad to hear it.
 
If you wanted to simplify the code a bit more you could create an array of your 6 chart references and build an array of the 6 boolean arrays.  Put another autoindexing for loop around your current for loop.  The outer for loop would act on each chart, then you could elimnate 5 of the 6 node blocks in the inner for Loop. 
 
(Or you could initialize a 20 x 6 boolean array, and have each ring control replace the selected element with a True (one ring control per column).
Message 4 of 8
(3,739 Views)
When I was building up the code I had thought about that, since I did see that there was a lot of repetition in the code but I figured it would be too hard. I just gave it a go just then with your advice and I was able to tidy it up a looong way. Required a bit of thinking tho!! Thanks again for the help!
0 Kudos
Message 5 of 8
(3,732 Views)

I looked at simplifying your code as a challenge.  Attached is a VI (LV 8.2.1) and a screenshot of the block diagram.  Since I was creating from scratch, I didn't have your actual rings or waveform charts.  I just created 2 rings and 2 waveform chart references.  These can be scaled to as many as you need.

If this is going in a subVI, you may want to make the rings and references as arrays, so you won't need numerous connector terminals for each ring and reference control.  If you do that, you can eliminate the build array functions for those before the loops.  It would also make the subVI more scaleable.

I also broke the property nodes into 2 loops.  As it was, you were setting the property nodes 20 times for each of 6 charts.  Only the active plot and visible? needed to be looped through 20 times.  The actYscale, Max, and Min were the same for each of the 20 iterations, so they only needed to be done once.

One other possibility would be to do a defer panel updates before, then allow them after the code, so there aren't as many screen refreshes while the loops iterate.

Message Edited by Ravens Fan on 08-18-2007 09:17 PM

Download All
Message 6 of 8
(3,719 Views)
Wow, that is certainly better then what I had come up with. I like the idea of converting the references and controls into an array because like you said, there is a lot of inputs into the sub VI. As for the incrementing operator, I don't really know why I need it. The thing is, each control outputs a number between 0 and 19 and whenever I selected the zero, it wouldn't look up the max and min Y values from the array? I put in the increment operator and it fixed it... Maybe I should look at it again. Anyway, I've attached what I had come up with. But as you just demonstrated it can be cleaner!

I only just worked out how to get images to show in the post!!!

Message Edited by stirlsilver on 08-19-2007 02:16 AM

0 Kudos
Message 7 of 8
(3,709 Views)
Just worked out how to get rid of the increment operator, had different sized arrays between the input to the subVi and the subVI

0 Kudos
Message 8 of 8
(3,704 Views)