LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I need to help

Hi, I'm trying to write a programme about labview but I have a problem. There is a "example" vi in attachment. When I run the programme which is green in the example vi , it does not any response outside, but it runs in itself. I want to take continuingly data from device and I want to use outside. How can I solve this problem?

0 Kudos
Message 1 of 13
(2,771 Views)

Use Shift Reg to store data.

 

For parallel ACQ and data manupliation use Queues to Transfer data .

 

This example from community can be helpful

0 Kudos
Message 2 of 13
(2,763 Views)

Thank you for your attention but I'm afraid that it is so complicated for me because my labview level is intermediate. Is there any easier method :).

0 Kudos
Message 3 of 13
(2,759 Views)

What are you expecting ? You want the complete data at the end or the live data to be used elsewhere in the code ?

0 Kudos
Message 4 of 13
(2,754 Views)

If you need live dat easiest way is to create local varaible and use it.( But local variable is memory costly. Better learn to use better ways of programming)

 

If complete data  at the end is required use shift register as shown below

 

 

shft reg.png

 

 

0 Kudos
Message 5 of 13
(2,750 Views)

When I run the vi, I want to collect all data. But in the example, data does not came to the part of DC.  In my opinion, there is a loop inside loop for that reason it doesn't work. If I save for this case, may be it can work.   

0 Kudos
Message 6 of 13
(2,743 Views)

In that case you need to pass reference of the Front panel control to that subvi and update the value using property node

0 Kudos
Message 7 of 13
(2,734 Views)

Your question, intent, and VI are not clear. The VI you uploaded contains a single loop that calls a subVI that you did not include. I don't know what you mean by "green" in the example. You also did not indicate how you are collecting this data. It appears to be via a serial connection. The Build Array method shown in nijams's example is not necessarily a good method since it continously builds an array, which causes memory thrashing.

0 Kudos
Message 8 of 13
(2,715 Views)

@nijams wrote:

In that case you need to pass reference of the Front panel control to that subvi and update the value using property node


While this will work I would recommend an architecture that decouples the data acquisition/processing from the UI. It is a much more modular approach and easier to maintain. Once you start passing control references around your code becomes tightly coupled and it is much more difficult to reuse code in multiple applications. For passing data from the processing to the UI queues, notifiers or user events are the recommended methods.

 

As for the comment that queues are too advanced it is generally better to take the time and learn how to use the tools available rather than trying to make things fit using the most basic techniques.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 9 of 13
(2,697 Views)

In attachment there are all progremmes. First of all I chose Hinds_Signaloc_Ver1_1 vi and then chose Hinds_LockIn_Example_Streaming sub vi. I used this sub vi in the example file. Actually as a matter of fact, I need to solution rather than recomendation "quickly". Meantime I'll use another vi programme the example file this is trying, if it runs properly, I can use it. I think the problem is clear now :). Again thank you guys for your help. 

0 Kudos
Message 10 of 13
(2,686 Views)