LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

access plot colors programmatically

Highlighted

Emily,

I placed the case structures and the arrays into my vi.  I am still missing something.  I have attached the vi and the front panel.

Regards,

Ron

 

0 Kudos
Message 21 of 30
(180 Views)
Highlighted

Emily,

Do I still need all of the property nodes as well?

0 Kudos
Message 22 of 30
(178 Views)
Highlighted

Emily,

I think I answered my own question...YES.  I added the property nodes for 'plot visible?' and 'active plot'. and it works except for one small detail. The  colors are all off by one.  I want red for the first trace, then blue, green, magenta, aqua, and finally mustard.  The first plot boolean button brings up blue!  Then as I go down the buttons turning them on, the colors are all off by one and the last button that is supposed to be mustard brings up red!  Also, there is no rhyme or reason to the colors that show up in the array chart on the front panel.

Ron

0 Kudos
Message 23 of 30
(176 Views)
Highlighted

Emily,

Here is my code with the arrays and the property nodes.  As I stated, the colors are all off by one.  The top red button gives me blue and so on down the list.  The mustard colored channel gives me red.

 

0 Kudos
Message 24 of 30
(167 Views)
Highlighted

rwbrook@integratedps.com wrote:

Emily,

Here is my code with the arrays and the property nodes.


No, that's not code! It is a MS word document containing a screenshot. Please attach the actual VI.

 

There is no way to tell from the picture how your color array looks like, because we cannot tell the size of the arrays. I also see quite a few race conditions.

 

Also remember that property nodes execute to to bottom, so if you set the property before setting the active plot, things will lag behind by one iteration. the "active plot" property belongs on top. I am also not sure why you are doing each node twice. If you would use an array for your booleans, you could do it in a loop using a single instance of the property node. Simplify!


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 25 of 30
(160 Views)
Highlighted

You are correct, of course.  The reason for two property nodes for each color is; one is for the time waveform overlay and the other is for the spectra overlay.

I will reverse the calls in the property nodes.

0 Kudos
Message 26 of 30
(151 Views)
Highlighted

Here is my code.  The 'ChooseReadDataPlotColors.vi is a channel selector so only one channel can go into the peak search routine.

The 'finalvibes.dat' is six channels of fft data.

I will send another post with the time data and the overalls and rpm data.

Put all three data files in a folder.   when the program asks for the datafile, open that folder and change the files type to *.*.  Then just double click on the finalvibes.dat file .  The other two are automatically selected.

Ron

I couldn't post dat files, so I tried to change the files to a .txt and it still adds the .dat.

So, how do I attach an example data file, zip them?

 

0 Kudos
Message 27 of 30
(147 Views)
Highlighted

My vi did not go.  Here it is.  There is also a custom subvi that I made to choose  one channel for the peak search routine.

 

Download All
0 Kudos
Message 28 of 30
(145 Views)
Highlighted

rwbrook@integratedps.com wrote:

So, how do I attach an example data file, zip them? 


Yes, put everything in a zip file...


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 29 of 30
(143 Views)
Highlighted

Altenbach,

It never fails, I will be in the field all day tomorrow.  I will be in the office on Friday.  If you have any questions on running the vi, send me an email.

Ron

0 Kudos
Message 30 of 30
(142 Views)