I have a sub VI thats continuously reads data from a PCIe-6363. In the main vi i have successfully displayed the data in a waveform graph that is continuously updated with a control reference and property node. however I need to access the data being displayed in the graph, do some analysis and manipulation then display the data in a second graph. Everything I have tried to get the data that the main graph is being fed results in the new data display (graph) not updating until exection is stopped. then as soon as execution is restarted the new graph shows the last data graph and does nothing until main is stoped an started again.
what am i doing wrong?
In your main VI, the time signal local variable is being read, manipulated, and put into the intensity graph only once as soon as your VI runs. You don't have any while loop around that code so that it can do any more work with the TimeSignal Data as the Time Signal data is updated in your subVI.
Why do you have the second While Loop in your subVI? It only runs once because you have a False wired to the Continue terminal.
yes, that is my question. how do i get a continuously updated local variable of the data in the subvi instead of just the continuously updated graph data?
the second look does not need to be there. it works as intended... so far... that is not in question; unless it is causing the problem mentioned above. are you saying that is the problem? I tried deleting the second loop but nothing changes.
Put a while loop around that part in your main VI.
I really don't understand what you are trying to do here. You could send an reference for the intensity graph to the subVI and do the calculations for that there as well.
what i intended to do was create a subroutine that will continuously and as fast as possible acquare data from DAQ input. this data is to be samples and depending on some parameters and analoge output control, tasks will be performed on the input data.
but i can not do any of this because i can not manipulate data locally in the main vi. i can control the input, i can display the input data aquired, but i can not do anything with the data.
Creating a subVI is fine, as long as it is helping your solve your problem rather than adding to it.
Since you are trying to run something as fast as possible, the subVI isn't necessarily helping you. What you need to do is start with the proper architecture such as Producer/Consumer. The producer is the loop that acquires the data. It passes it to the consumer processing loop by way of a queue. The consumer loop processes the data at its own rate and won't intefere with the acquistion of the data in the producer loop. Of course you want the consumer loop to run at a similar rate as the producer, otherwise if it can't keep up, it will eventually fill up the queue.
You can put the the two loops in different subVI's if you want, but you don't have to. If you do, you pass the queue reference into the subVI(s) so that you have direct access to the queue.
interesting. i understand what you mean by producer/consumer. well, I am learning labview in the process. i thought that for efficiency and asthetics i suppose, things would be divided subvi's for tasks that would be performed continuously or separatly in numerous instances. hence i first made a vi that performs a continuous data aquisition. also for output, and functions like filtering, etc. then all of these task would be brought together in a main vi. the challenge I am having is getting data from one vi into main then feeding it into the next task(vi).
but I suppose this producer/consumer architecture is exactly what i am trying to do. I have a subvi that produces data by reading from an input, then i want to perform some function on this data (consume), and produce some ouput. I dont know anything about queueing, is that not what reading data from a buffer is doing?
I dont know anything about queueing, is that not what reading data from a buffer is doing?
Queuing is nothing more than adding items to the queue (FIFO), in your case in the producer loop. You then dequeue the element in the consumer loop.