-
Posts
541 -
Joined
-
Last visited
-
Days Won
23
Content Type
Profiles
Forums
Downloads
Gallery
Everything posted by crossrulz
-
extracting information about specific array element
crossrulz replied to liakofan's topic in LabVIEW General
I just started thinking about Ton's method. While I don't see the point of the "XOR" and then the "Not Equal to Zero" (just use the "Not Equal"), I think he has the right idea about converting the boolean to a 0,1 and then adding. This does seem like a much simpler implementation. -
extracting information about specific array element
crossrulz replied to liakofan's topic in LabVIEW General
oops, I originally looked at the wrong file... Where you are falling short is the fact that the arrays need to be predefined. I put data in the locations for a 5x5 array. If you are going to a 16x14, go to element 15,13 (because it is zero based) and put a 0. Do this for the Array control, "previous array" constant, and the "number of changes" constant and you should be good. I would also add a wait to your loop just so you don't hammer your processor. @ShaunR The number of changes is constantly being updated and saved in a shift register. Therefore a value change will not be missed. -
extracting information about specific array element
crossrulz replied to liakofan's topic in LabVIEW General
I was using the event structure as a simulation so I could see exactly what all of my data was doing when I decided that the "1 second new data" occurred. I was aiming more for the example than the actual code you should use. In reality, you should be getting new data once a second, compare it to the previous data, increment the changed array where necessary. So yeah, get rid of the event structure and replace the data control with your input data (however you are getting it) and exit the while loop however you plan on ending your test. -
Calculate average and Max from csv file
crossrulz replied to Electronics Engg's topic in LabVIEW General
If you post what you have so far we could help a little better. If reading your CSV is the issue, post an example of the CSV as well. -
extracting information about specific array element
crossrulz replied to liakofan's topic in LabVIEW General
What you need to do is count how many times each index has changed. To do this, use a second array for just the number of changes. You can use nested for loops to iterate to see which elements have changed and if they did increment that element in the number of changes array. Then at the end, see which elements are greater than 10. Array Changes.vi -
I'm with Ton. It looks like your default font size is larger than the standard 13 point.
-
extracting information about specific array element
crossrulz replied to liakofan's topic in LabVIEW General
I'm a little confused about what you are trying to do. Are you looking for 10 of the elements to change (as you stated) or are you looking for an element to change by more than 10 (as you described in your program)? Here's my shot at both. Hopefully this will at least point you in the right direction. Note: I used a 5x5 array to make it a little easier to play with on the front panel. Array Changes.vi -
Yes, it takes forever to uninstall and install everything from NI. I would also recommend a registry cleanup. I have ran into problems where I would uninstall all NI software, reinstall, and my problem was still there. I found that I had to delete some registry entries in order to really start clean. Now that I'm thinking about it, it might be easier to reformat the hard drive and start from scratch.
-
You are almost there. All you really need to do is add logic to find the end of the patches and subtract indexes (see lower half of snippet). Note: If the data ends in a thin patch, you will not get a length out for that patch without some extra logic after this loop.
-
You might want to look into the Producer/Consumer design pattern and the use of Queues. There are certainly many ways to communicate between parallel VIs (global variables, Queues, Notifiers, Action Engines). Based on what little I understand about your situation, I would say the Queue if probably your best bet. As far as reducing block diagram size (for a main VI), subVIs are your friend, especially if you are performing the same action in different places.
-
Reading 2-column data file and interpolate
crossrulz replied to Stepper's topic in Application Design & Architecture
Or just use the Threshold 1D Array primitive (should be right next to the Interpolate 1D Array) on your array of frequencies. Edit: I might have the signals backwards, but the concept is still the same. -
Reading 2-column data file and interpolate
crossrulz replied to Stepper's topic in Application Design & Architecture
If you put in an indicator to see the array before your interpolating, you will see that it has two elements (36, 15370). What you need to do is split the signals and take the second signal (frequency) and then interpolate. -
-
They could at least learn to spell LabVIEW correctly (capitalization is wrong multiple times, two words once)
-
where is this error list you speak of?
-
It looks like Default Value is a scripting property (at least as of 8.6). So in the development environment, the answer would be yes. No so in an application. A work around may be to save your current value, invoke the Reinitialize to Default (use an invoke node), grab the new value (the default), and then set the value back to your original saved value. Hopefully somebody smarter than I has a better idea than that.
-
Switch states in a State Machine with Buttons
crossrulz replied to Fritz_85's topic in LabVIEW General
Your problem is in where you are trying to figure out when button was pressed. The state tunnel out of the for loop will only output the result from the last button check (Button 3). If you want to keep what you have, change the tunnel to a shift register and feed the previous value through in the false cases. However, polling controls are BAD. You will be much better off with an Event Structure. NI's example is from right when the event structure was coming out and I have a feeling it was simply upgraded from a previous version long ago. Polling uses up lots of CPU unless you have waits in your loops. An event structure will sleep until one of its registered events have occurred. -
I'll take stability over fancy new toys any day!
-
The most simple way would probably make another consumer loop for showing your non-modal dialog boxes. Have another queue (or notifier) running around to tell the loop to run a certain window. You would be limited to one dialog box opening in the new consumer, but it is a quick and easy way to handle your issue.
-
Shaun hit the big one. You need to properly shut down your system: turn power supplies, function generators, DIO, etc. off, reset other equipment, close out references and handles. The abort button will not do that. I have troubleshot a program where someone hit the abort button and ran again and wondered why the DIO port was not available (because it wasn't released from the previous run!). My experience, however, is mostly with non-LabVIEW people as my user and 99.9% of the time they do not see my giant Stop button (even though it is in the top right corner) and go straight for the Windows "X". If you don't handle this properly, the VI is still actually running even though you don't have a front panel. This will lead to a similar problem as just aborting. So I don't use Stop buttons anymore and just use an event structure and the "<This VI> Panel Close?" filter event. I discard the event, close up everything properly, and then shut down (if needed).
-
You can use a property node to set the Minimum and Maximum values of the control inside the array. All items in the array will have the same properties (not sure if you care about that).
-
Handling multiple versions of Reusable Library
crossrulz replied to LV User's topic in Source Code Control
I've was playing around with VIPM 2010 yesterday and found that I can now build all the packages I want with the free community version. There used to be limitations, but it looks like JKI decided to open it. Here are my major reasons to use VIPM: 1. It manages your user library for each version of LabVIEW you have installed, 2. You can define your palettes a lot more easily than using LabVIEW's palette editor, 3. You can install only which packets you need, 4. It handles packet dependencies (ex. my GPIB packet need my Wait packet in order to work). These are things a normal SCC just cannot do, or at least not cleanly. -
LabVIEWs response time during editing becomes so long
crossrulz replied to MikaelH's topic in LabVIEW General
So was I. Luckily Christina set me straight in her blog post. -
Handling multiple versions of Reusable Library
crossrulz replied to LV User's topic in Source Code Control
I have been looking into this for the last few months and VIPM is the only thing that I have found that will do this. And it does it well. -
NI will release a service pack in the spring. That's how their new software cycle is going to be starting with 2009.