LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

string/wire issues

What do you mean when you say it is "horribly slow"? I have put 64 indicators on a block diagram and update the background color every iteration, which makes an iteration take ~250ms.

 

I agree with Paul that when you find yourself making so many controls on different tabs, it's good to take a step back and change your approach. I thought it would be fun to code up something that changes the background colors as it is though, so here is an example. First we get all the references that have a certain word in their label. All of mine have the word "Numeric" in their label. Keep in mind, the caption of the control (what the user sees) does not have to match the label. Now, you will probably get the references in numeric order, but just to make sure I sort them by name. Then, you can update the color in a For Loop.

 

snippet.png

Message 11 of 16
(625 Views)

@gregoryj

 

I mean just the way my VI is set up to read and handle the incoming data is bogging the computer down that I'm working on.

 

Thanks for the example! This is cool, I had no idea you could read things from the front panel and control properties of the indicators. I'll have to study your example a bit more to understand whats going on, some things I don't recognize.

whatdoesitmean.PNG

0 Kudos
Message 12 of 16
(619 Views)

The picture with dashed outline and drag to LabVIEW symbolize that it's a special kind of png called a LabVIEW snippet. You may need open it in a separate tab before dragging it to LabVIEW to make it work.

 

The part on the left means it gets every front panel object's reference from the given VI.

 

The part on the right is looking for the word "Numeric" in the label text of the control. If your controls are labeled with something different, like Sensor 0, Sensor 1, Sensor 2... you would look for the word Sensor. It returns the offset where the match is found, or -1 if no matches is found. So greater or equal to zero just confirms a match is found.

Message 13 of 16
(614 Views)

Snippets have been buggy lately, so here's the VI file. I just created it with 4 indicators, but you can make 100s and it will still work (more slowly).

Message 14 of 16
(612 Views)

So I've been breaking the VI down into more manageable sections.

Is there an advantage to using hardware timing for data acquisition over just placing a wait timer?

And is there a way to sync up modules?

hardwaretiming.PNG

0 Kudos
Message 15 of 16
(606 Views)

@LabNoob14 wrote:

So I've been breaking the VI down into more manageable sections.

Is there an advantage to using hardware timing for data acquisition over just placing a wait timer?

And is there a way to sync up modules?

hardwaretiming.PNG


I think this article should give some idea on it: http://www.ni.com/tutorial/5376/en/

#3 Should be pretty easy to incorporate. However, if you have any questions on it, it would be best to start a new thread, because it helps make the forums a better reference in the future.

Message 16 of 16
(596 Views)