02-06-2013 07:27 AM
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...?
Anyone?
Solved! Go to Solution.
02-06-2013 10:00 AM
02-07-2013 02:18 AM
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.
02-07-2013 03:32 AM - edited 02-07-2013 03:33 AM
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
02-07-2013 03:46 AM
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.
02-07-2013 04:12 AM
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:
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
02-07-2013 04:16 AM - edited 02-07-2013 04:16 AM
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?
02-07-2013 06:22 AM
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
02-07-2013 08:50 AM
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
02-08-2013 03:30 AM
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.