LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

refreshment rate Array on screen

Dear someone,
 
When I am filling up a araay of clusters with data, the data is been written in the Array, but not showed on the screen....can I speed up that process?
when I stop execution using the Red button, all the data is shown!?!?!?!
 
I made a screenshot of the part of my vi which is performing the filling up of the array..
 
thanx in advance,
 
Bernard
0 Kudos
Message 1 of 8
(3,246 Views)

Your indicator is outside the for loop so it won't get updated until the for loop finishes. You're also writing to a property node and that's about the slowest way to update something. Why aren't you writing to the indicator directly? You've got local variables and while the use of them is probably not necessary, that would be faster than a property node. How long does the for loop take to run?. You might just want to leave the code alone as long as it finally finishes. If you really need to see the indicator update with each iteration, move the indicator inside the loop. You can preallocate an array and with a shift register and Replace Array Element get the indicator to update as each new value is obtained.

Just wanted to also say that indexing that local variable array with each iteration and having it wired to the Bundle By Name is really not necessary either. Just create a constant (Right click>Create Constant) and wire that to the Bundle By Name. Bundle By Name does not require an input with data - just and input with the correct data structure.

Message Edited by Dennis Knutson on 10-05-2006 07:37 AM

0 Kudos
Message 2 of 8
(3,226 Views)


@Dennis Knutson wrote:
Just wanted to also say that indexing that local variable array with each iteration and having it wired to the Bundle By Name is really not necessary either. Just create a constant (Right click>Create Constant) and wire that to the Bundle By Name. Bundle By Name does not require an input with data - just and input with the correct data structure.

Actually, the above statement is only true for the plain "bundle" as used here, not for the "bundle by name". If you would use "bundle by name" you can choose to only write a subset of the cluster elements and the culster input defines the values for all elements that you don't write.

A few more comments to your code.

  1. If you exlusively use "index array" wired to [i], you can typically eliminate all instances and use autoindexing at the loop boundary instead. In this case you don't even need to wire to N.
  2. It makes for unpredicatable code to read locals inside the loop. Their values can change at any time and you might get an unpredictable mix of current and stale values. These local reads belong outside the loop. Imagine you chage the voltage setting 1ns before a test ends. That test will show a voltage in its result cluster that is incorrect for that test.
  3. I am puzzled by yout boolean operations. It seems like an odd operation. You get a TRUE if both comparisons are FALSE or if both are TRUE. Is this really what you want? Maybe an "in range" would seem more logical, but who knows?
  4. How long does each test take?

If you want, please attach your entire program so we can better see how to improve things and make suggestions.

0 Kudos
Message 3 of 8
(3,209 Views)


@altenbach wrote:
Actually, the above statement is only true for the plain "bundle" as used here, not for the "bundle by name". If you would use "bundle by name" you can choose to only write a subset of the cluster elements and the culster input defines the values for all elements that you don't write.

Small clarification: Even for the plain "bundle" node, the cluster input might be important IF not all element inputs are wired. All unwired elements retain the data of the cluster input.

In the case discussed here, all inputs are wired, so you don't need all that code gymnastics. 😉

If you were to optimize the code using shift registers instead of locals, wiring the original cluster might also save a data copy in some cases. This would need to be tested of course.

0 Kudos
Message 4 of 8
(3,198 Views)
hi people,
 
Thanks for the useful tips, but I still have some comments:
 
- I use this a a Sbuvi to call a test. Actually, I am makning up a program which can test over 15 different chips which each contain 400-500 tests. so, it is not to say how long eacht tests take. Each test has predefined paramters and settings, so they won't be changing dduring the testing of the chip.
 
- Altenbach: Booelan operation logic is to determine wheter a value is in the range between the minimum limit and maximum limit. so, If one of them is wrong I got a False, if both are good, I get a TRUE, and if both of them are FALSE...that is impossbile. there is alway one true and one false...(or both are true)
 
- It is also not gonna work to make a constant and fill and connect it to the bundle by name. given is that each test has a different name, you can't give up a constant.
 
- well, there this part of code is is being used for more then one test, I use a global variable to write it in. tyhen beside this whole schem I have a loop running which reads ou t the global, and write it into the User Interface.
 
I post my complete program here, it is quite a program, but I am open for tips and I hope I can improve it.
 
- there is a kind of sequence in it....first start it, then log-in (operator password = User, administrator password = Admin) After that it will be asking to create a test directory...(only the first time, if I am right....)
After that choose a chiptype...
.And after tha tyou can select your voltages, temperature conditions, and then you can run your test..
After that a TSV file will be created. i also included a example of a test, which you can copy and paste into some testfolders...The program will search into this testfolders and include this programs...
 
questions? please let me know!
 
Bernard Wesseling
 
 
0 Kudos
Message 5 of 8
(3,180 Views)
I also have an other question...at the begin of my program, which is been attached above here, I set all the controls back to their default. Is there a way of initialise each control and/or indicator put them in a cluster, and initialize them automatically, without making a method for each control/indicator?
0 Kudos
Message 6 of 8
(3,172 Views)
You can use a reference to 'This VI' and call the method Reinitialize All to Default. This will cause all Controls and Indicators on the Front Panal to change to their default values.
 
Thanks
Karsten
Message 7 of 8
(3,148 Views)
I put my program in in a zip...
0 Kudos
Message 8 of 8
(3,143 Views)