LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

color plot

Solved!
Go to solution

HI,

 

I want to make all my plots black, when i do this in my running VI, get errors, because the number of plots isn't allways the same... So i've made an initialize array and then try to colorize my plots but it won't work...?

deosn't work.png

 

Anyone?

0 Kudos
Message 1 of 11
(4,622 Views)
Solution
Accepted by topic author ThijsBoeree
Hello Thijs, Please don't forget to transpose the 2D array, otherwise you'll be reading the wrong array.
Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
Message 2 of 11
(4,606 Views)

Did it solve your issue?

If not, then please post a Main VI in which you use this subVI.

Then I can see how you're trying to use it.

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 3 of 11
(4,587 Views)

Yes that was the problem,

 

But when one solves one another rises! The color resets itself when i load a new set of channels? But that'something i can work on. The biggest problem is that i have to change the colors after i provide my waveform chart with the data (number of channels)... And when i change the input of my waveform chart, the "plot color" function kicks in to early... Well... i'll figure it out!

 

Thanks

Regards,

Thijs 

0 Kudos
Message 4 of 11
(4,578 Views)

Hello Thijs,

 

Can you share the VI('s) that show this issue?

Then I can take a look at it and correct it where needed.

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 5 of 11
(4,571 Views)

Well, it's very big, and you really have to delf into it to get the problem, and i use a non NI daq device, so i've got my own dll and hardware... so, it's really hard to send... Thanks anyway, but i can manage it!

 

I can explain the problem in an example: i'll draw it for you:

 

example_plot_color.png

 

I hope you understand,

 

But again, don't spend too much time on it, eventually i'll fix it, but if you have any ideas?

Regards,

Thijs

0 Kudos
Message 6 of 11
(4,565 Views)

Hello Thijs,

 

Is this how your top-level VI is organized?

If yes, then I don't really see why you're using the WFChart Refnum Control.

If not, then in what kind of VI do you call it?

 

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 7 of 11
(4,562 Views)

Can we speak dutch? You're from belgium... If you don't understand, i'll do it english

 

Het volgende is er aan de hand: Ik heb eigenlijk 3 loops, die onafhankelijk draaien, in de eerste loop: User loop, handel ik alle user interacties af, drukken op knoppen, veranderen van ring indicators dat soort dingen.

In de tweede loop: de acquisitionloop worden de ruwe data weggeschreven naar schijf, deze loop heeft ten alle tijden voorrang op de overige 2. Dan in mijn 3e loop: Display loop wordt de data weergegeven en worden er filters op de data losgelaten.

 

De user loop staat eigenlijk altijd stil, en reaggeert allen op user interactie. De Display loop draait (mits er op "play" is gedrukt) met een interval van 20 ms. Nu het probleem:

 

Ik verander het aantal kanalen (data zichtbaar in de waveformchart) met een ring indicator, die ring indicator zit in de userloop (een referentie daarvan), op het moment dat de ring indicator verandert wil ik eigenlijk mijn plot kleuren ook wijzigen. Maar, de waveform chart wordt elke 20 ms ge-update vanaf de display loop, dus het komt voor dat mijn waveform chart nog maar 4 kanalen data heeft als ik in mijn user loop al 8 kanalen zwart wil maken (kleur veranderen). Nu heb ik al gemerkt dat het instellen van een delay in mijn user loop niets uitmaakt, wat ik toch vreemd vind.

 

Ik hoop dat je iets beter begrijpt. Mijn main VI bestaat dus, uit:

1. stuk initialisatie en het registreren van al mijn FrontPanel Objects

2. 3 timed while loops: "User", Acquisition" en "Display"

3. stuk afsluiting.

 

De referentie heeft mijn "code snippet" zelf aangemaakt, ik had namelijk een property node gepakt maar dit doet in principe hetzelfde. Ik gebruik een global variable met al mijn refnums erin van mijn frontpanel object (dus ook de WFcartRefnum), zodat ik ze in elk afzonderlijk VI tot mijn beschikking heb.

 

Vriendelijke groeten,

Thijs Boeree 

0 Kudos
Message 8 of 11
(4,554 Views)

I solved it, with a enqueue and dequeue operation and it works! Now my plot updates once it's colors in the display loop (it gets it from a queued element from the user loop). It works perfect!

 

Regards,

Thijs

0 Kudos
Message 9 of 11
(4,547 Views)

Hello Thijs,

 

I do indeed speak Dutch.

All of the Belgian NI employees do speak Dutch, English and French (some also other languages).

 

Good to hear you were able to solve it.

I just now had the time to check my forum posts.

 

If anything else pops up, then just let me know.

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
Message 10 of 11
(4,535 Views)