LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Invalid Property 1077: Plot.YScaleIdx

Solved!
Go to solution

Not sure why I get this error code. The left Y-axis (Plot.YScaleIdx = 0) is for curves 1 and 2, the right Y-axis (Plot.YScaleIdx=1) is for curve 3.

 

Invalid Property.jpg

0 Kudos
Message 1 of 11
(3,345 Views)

How can dx = 0 be a valid value? That would pile all the points on top of each other.

 

Lynn

0 Kudos
Message 2 of 11
(3,332 Views)

Sorry Lynn....I didn't get what you were saying. Where is dx=0? What am I overlooking?

0 Kudos
Message 3 of 11
(3,327 Views)

My apologies. I mis-read your post. You are looking at the scale Index. I was thinking of something else, which does not actually exist in the form I was thinking of.

 

I get that error if I enter a scale index number larger than the number of scales -1.  Are you sure that the scales exist? The VI you posted only has one scale. I do not know if it is possible to create scales via property nodes. Right click on the Y scale and select Duplicate Scale. Then you can adjust and manipulate the scales. When I create three scale on your graph, the error goes away.

 

Lynn

0 Kudos
Message 4 of 11
(3,321 Views)

Thanks Lynn,

 

I am getting close, but still don't get the curves to come out right. I right clicked on the XYGraph Y-axis and selected duplicate Y-axis, the swapped the sides.

See the new VI. Still, the Y-axis min and max values don't work out the way I want them. 

0 Kudos
Message 5 of 11
(3,301 Views)
Solution
Accepted by topic author murchak

The X-axis array goes to the top terminal on the Bundle node for the XY Graph. The Context Help window shows this when you move the cursor over the graph terminal on the BD.

 

You do not need the sequence structure. Use dataflow!

 

I moved the properties which never change outside the case structure. Functionally this makes no difference but it is a form of self-documentation. If it is outside it does not change. If it is inside it changes.

 

Lynn

Message 6 of 11
(3,293 Views)

Thank you!

0 Kudos
Message 7 of 11
(3,281 Views)

Hi Lynn,

 

I need a little more help. I applied your ideas to my specific situation, and I still get the same error.

 

The code below plots data from two tables, A and B. The State can be the following: plot A only, B only, both A and B, and neither A nor B.

You can select the state, then run the code. I still get the invalid property value error.

 

 

0 Kudos
Message 8 of 11
(3,248 Views)

When the graph arrays are empty, there are no plots. So setting the Active Plot property to to any non-zero value creates the error.

 

One way to fix that is simple but a bit sneaky. Change the tunnels where the A Graph and B Graph arrays connect to the for loops to be indexing tunnels. Why does this work? If a for loop has two or more indexing tunnels, the number of iterations of the loop is determined by the smallest length of the connected arrays. So when "A off " is selected, the A Graph wire contains an empty array and the A loop executes zero times.

 

If you have situations in your real code where the arrays are not empty or where the number of plots varies, this will still work. If the number of plots is greater than the number of elements in the Plot Colors arrays, then that number will limit the number of times the loop iterates.  It is a good idea to document such "sneaky" techniques so when you come back to the code next year, there will be something there to remind you whay you did that.

 

Lynn

0 Kudos
Message 9 of 11
(3,243 Views)

Thank you very much Lynn. I don't think I could've figured that out on my own. That part was bugging me for the past few days.

I have been reading the "LabVIEW for Everyone" book by Travis and King, and I had learned that a for loop uses the minimal index tunnel,

but I wouldn't have been able to use that concept to take care of this problem. 

 

I should also starting using error clusters in my code. This is something that is definitely overlooked by LabVIEW beginners like myself.

0 Kudos
Message 10 of 11
(3,223 Views)