Search the Community
Showing results for tags 'array'.
-
View File Hooovahh Array VIMs Here is the Hooovahh Array VIMs. This initial release contains 14 VIMs for manipulating array data, which are intended to replace OpenG functionality, but with the added benefit of data type propagation, and increased performance using newer array manipulation techniques. In later versions other Array manipulation functions were added moving all the OpenG stuff to their own palette. Most of the OpenG functions are unchanged, but a few use the newer conditional and concatenating tunnels. And a few functions have added performance based on other inputs. For instance the Delete Array Elements can operate in a more efficient way if the input indexes are already sorted. The Filter 1D array can also be more efficient if the input is known to not contain any duplicates. Because these packages contain VIMs, they require LabVIEW 2017 or newer. Having these functions be VIMs mean all functions work with various array data types. Included functions are: Conditional Auto-Indexing Tunnel Delete Elements from (1D or 2D) Array Filter 1D Array Index (1D or 2D) Array, Scalar, Row, Column Remove Duplicates from 1D Array Reorder (1D or 2D) Array Reverse 1D Array Slice 1D Array Sort (1D or 2D) Array Convert 1D to 2D Convert 2D to 1D Find Subarray Force Array Min/Max Size Foreign Key Sort Submitter hooovahh Submitted 10/11/2017 Category *Uncertified* LabVIEW Version 2018 License Type BSD (Most common)
-
I find myself frequently looking for a good pattern for collecting a pool of array elements until they reach a certain size and then removing the oldest elements first. I have used very stupid methods like a bunch of feedback nodes being fed into an build array node. But today I thought up one that I really enjoyed and I thought that I'd share it. Its a simple pattern and no crossing wires . Perhaps someone has thought of something better, if so don't hesitate to share.
-
Version 2.0.0
265 downloads
Here is the Hooovahh Array VIMs. This initial release contains VIMs for manipulating array data, which are intended to replace OpenG functionality, but with the added benefit of data type propagation, and increased performance using newer array manipulation techniques. In later versions other Array manipulation functions were added moving all the OpenG stuff to their own palette. Version 2.0 changed the suffix naming standard. Updating may mean replacing calls to the new versions since the name on disk has changed. This was for consistency and I'm sorry for breaking compatibility. The added type defs in 2.0 may break compatibility too but these help avoid code breaking bugs since VIMs allowed any data type previously. Most of the OpenG functions are unchanged, but a few use the newer conditional and concatenating tunnels. And a few functions have added performance based on other inputs. For instance the Delete Array Elements can operate in a more efficient way if the input indexes are already sorted. The Filter 1D array can also be more efficient if the input is known to not contain any duplicates. Because these packages contain VIMs, they require LabVIEW 2017 or newer. Having these functions be VIMs mean all functions work with various array data types. Included functions are: Conditional Auto-Indexing Tunnel Delete Elements from (1D or 2D) Array Filter 1D Array Index (1D or 2D) Array, Scalar, Row, Column Remove Duplicates from 1D Array Reorder (1D or 2D) Array Reverse 1D Array Slice 1D Array Sort (1D or 2D) Array Convert 1D to 2D Convert 2D to 1D Find Subarray Force Array Min/Max Size Foreign Key Sort -
Hello! It was found that the function Request Deallocation does not free memory after using an array of strings (or any other multi-dimensional array). Description of the experiment: There is a VI from which subVI is called by command. In the subVI only one-dimensional array (numbers or strings) generated. If the array element type is number (I32), then allocated memory is released (using the function Request Deallocation). If the array element type is string (or any other multi-dimensional array), the memory will not be released. Anyone faced this problem? If yes, what should we do? Excuse for bad english. main.vi memoryusage.vi
-
Hello, I'm developing an application to play "Battleship" with another opponent through serial communication. I currently have the following difficulty: I have not been able to fill the Array with my opponent's ships, I can modify a position, but by changing the position, the result of the previous position returns to its original value. VI operation: For my turn, using the radio buttons, I select the coordinate and press the SEND button. My opponent answers me with a 1 if I hit or with a 0 if I failed, this data is what I couldn't keep in the array. Best regards, 3Q.vi
-
- shift registers
- serial port
-
(and 3 more)
Tagged with:
-
The program obtains the number of messages in the hardware buffer through ZCAN_GetReceiveNum function, and then calls ZCAN Receive to complete the received data. When the amount of data reaches 1000 frames / s, the program will crash. UINT ZCAN_Receive(CHANNEL_HANDLE channel_handle, ZCAN_Receive_Data* pReceive, UINT len, INT wait_time = -1); I think there is something wrong with creating the parameter array ZCAN Receive Data* pReceive. Has anyone ever encountered a similar problem? Receive.zip
-
Hello Need help in understanding all possibilities with array and for loop along with case structure. Tag some good reading material. i.e transpose of array etc.
-
Is there any way to automatically wire an index array block to a bundle by name block? Auto-wire (pressing space) just adds one wire. Note that my cluster contains data of different types so converting the cluster to an array doesn't work. If there is a quick-drop shortcut for this I would be very impressed.
-
I need to add the values in an 1D array which as about 1 lakh elements. But the values in the array keep changing. Can anyone tell me how to do ? I thought of forming a 2D array from the 1D array. But since the 1D array keeps changing I am not able to append it to form 2D array. I am a beginner in LabVIEW. Kindly help me with the same.
-
Hi All, I have 3 analogue and 2 digital waveforms that I want to repeat multiple times with a delay between them. I could do this programmatically using a while loop during their playback but ideally I'd like to create a waveform as a delay and concatenate them all so that the resultant waveform is the what will be sent. My current solution is to have a pair of for loops inside a larger for loop. The sub for loops concatenate the waveforms with the shift registered waveforms and then with a waveform of my choosing (the delay waveform). Attached is a snippet of code. However, to produce a waveform that has 200 repeats takes around 20 seconds to build. This is not ideal and considering it is just array manipulation I feel like there is a fast way of doing this using the in place operator, but I don't personally know how. Any advice welcome, Thanks, Craig
-
Hi All, I am trying to make a control that has a textbox on the left and a text/combobox on the right in a scrollable box. I have tried to do this so far by making a cluster of the two and then having an array of that cluster. But, when I try to do this whatever I add as an edit item in any combobox is then automatically added to every other combo box in the list. I would like it so I can have different dropdown lists for each combobox in the list. Any help welcome! Craig
-
Hello everyone, I'm new to your community, so firstly I'd like to say hello to everyone I guess the topic was repeated several times and I have read many examples, but most of them were concentrated on auto fill of array with random values. I however need to set values into array manually, memorize them, and if possible to go back and make changes in case of a mistake. These values are given from Tasti WB630 keyboard and determine line feed for each of electrical linear drive. In my vision UP / DOWN keys set index number which corresponds to a subsequent piston, LEFT / RIGHT keys set value of feed for currently indexed piston. After setting a correct value for desired piston I hit OK and the value is stored into array. But here my vision ends, because LabVIEW somehow doesn't want to memorize all of the input data except the last one given index and value.The code for now works like this: Array: set + OK [0] 280 [1] 0 [2] 0 [3] 0 [4] 0 set + OK [0] 0 [1] 50 [2] 0 [3] 0 [4] 0 set + OK [0] 0 [1] 0 [2] 135 [3] 0 [4] 0 etc. I'd like to make it work like this: Array: set + OK [0] 280 [1] 0 [2] 0 [3] 0 [4] 0 set + OK [0] 280 [1] 50 [2] 0 [3] 0 [4] 0 set + OK [0] 280 [1] 50 [2] 135 [3] 0 [4] 0 etc. So, can anyone help me out? EDIT: I've added my source files with code needed for the emulation of Tasti keyboard and my work so far. Main VI: tasti_emul.vi, SubVI's: Tasti_LR.viTasti_OK2.viTasti_UD.vi
-
1: How to get last index, not last element, but last index number of an 2d array? Also 2: say 2d array has contents elephant crow dog goat giraffe eagle cat fly ant pig horse bee How to get that the bee is the 12th or 11th index in the array? (11 if you count elephant as zero index, 12 if you count elephant as first index), meaning I want the index number 11 or 12, not "bee"
- 6 replies
-
- array
- dimensional
-
(and 3 more)
Tagged with:
-
Hey all, I am trying to create a fairly large program. What I want to do is for someone to upload a text file, customized so I can create statements for it, and then labVIEW will read the the text file and perform actions. Specifically, the text will contain pin numbers, on/off status, wait delay, and another on/off status. The pin numbers correspond to a Boolean indicator array. The on/off status tell the Boolean indicator array to turn on/off. The wait delay tells the program to wait how long before changing the indicator array value again, and the second on/off status turns the Boolean array on/off after the wait delay. I cannot get the part where I want the Boolean array to change status after the wait delay. I am thinking the method of doing this would be a local variable, or a property value node. But, when I tried it, it would not even let the original status to turn on/off the indicator Boolean array, let alone changing the status after the wait delay. I have attached my code and text file (tab delimited) for another method of explanation. Altenbach wrote a big portion of the code for educational purposes If you delete the local variable, you will notice that the boolean array changes based on the first text column, versus it being constantly Gray if you have the local variable. ExcelTest.txt Text Boolean.vi
-
I am new in LabView and needed to create a sort of look up array. I have a pre-defined 4 column 11 row array. First column has the data for wavelength and the other 3 columns have other properties corresponding to the wavelength. I have to create a vi where I can feed in a wavelength value from 0 to 1000 and get the correct 3 properties from the table. The pre-defined array has discrete values of say 100, 200 and so forth but i want to allow users to type in any value in between and get a legitimate result. For instance if users feed 110 as wavelength, the output should be the properties for 100 wavelength. I tried to create using case structure but i end up creating 11 cases as you may find in the attached vi. If I need to add more elements later, this would be useless. Can you please show me any other way of doing it? Thanks! project_0.vi
-
I have an array that is already sorted. I want to find or write a VI that returns a subset of this array based on a minimum and a maximum values that I define. For example, if the array contains [0,1,2,3,4,5] and I set min = 2.9 and max = 4.1, the function should return [3,4]. So far the only way I can think of is to take each element starting at index 0 and compare it to the minimum. When I find a value that is greater than the minimum, I start comparing each following element to the maximum. When a value is greater than the maximum, I can stop the execution and return what I have collected. Although this would work, it seems light-years away from being optimized... I can't find any LabVIEW or OpenG functions that does this. I can't use the Search function since the minimum and maximum values might not match any element in the array... Ideas appreciated
-
I am trying to create a code section that will take a 1D array and create a moving average array. Sorry if this is a bad description. I want to take x elements of the input array, average them, and put that average in the first element of a new array. Then take the next x elements, average them, and put them as the second element of the new array. I want this done until the array is empty. I have two possible ways to do it, but neither are running as fast as I wanted them to. I want to see if anyone knows of a faster way to conduct this averaging. Thanks Joe
-
Attached is the browser program I am working on. I am trying to cycle through the database elements that are displayed in the cluster by means of a boolean button. Any help would be hugely appreciated Browser.vi
-
Hello, I have installed JKI VI Package Manager on my laptop running Windows 7, and everything is working fine. The problem is, we have a desktop computer in the lab which we are not allowed to connect to the internet because it contains sensitive patient information. However, I need to run the labVIEW program that I have successfully made work on my laptop (with the help of the VI Package Manager), on the desktop computer. I am not able to process this data on my laptop due to memory and speed problems. I installed everything that I needed on my laptop with the helpful instructions on this page: http://matio-labview.sourceforge.net/ Without the internet, I have managed to install on the offline desktop: 1. the VI Package Manager, 2. Matio, 3. a 2011 Run-time engine that the VI Package Manager told me I needed (I also needed it for my laptop), 4. The following required Library: http://sourceforge.net/projects/opengtoolkit/ To accomplish the above on the desktop, I followed the exact same steps that were used on my laptop, but since I am not on the internet with the desktop, the VI Package Manager cannot connect to tell me what other openG libraries I need to solve the 'dependencies' problems I am encountering. A list of all the Libraries listed on my laptop under the VI Package Manager is below. Is there a way that I can get all of these onto the desktop? Some way I can transfer and replace a folder(s), so that I can have these dependency problems sorted out? Thank you so much for your help!! Kind regards, Andrew
-
I need to write an array of 1 double precision number and 2 integers to a text file. I used the flatten to text but I get the file like this. @$ěHĚjŻ˛@8 @‰Č @$öOU#ĐT@< @‰Č @![šć‰±ę@@ @‰Č @#—ˇę?ťš@D @‰Č @$D}m6r@H @‰Č @"žţ-Î@L @‰Č @"E†„CĘ@P @‰Č @#ěÔ5ś.p@T @‰Č @#øĚyě@X @‰Č can you tell me a better way to do this? I also need spaces between each element
-
In my application, I have array of numbers. In the array, each value has the caption visible. Is it possible to programmatically change the caption names? I would like to see Value0, Value1, Value2, etc. John
-
Hi everybody, I have a problem with a ring-control in my labview program. The ring has many items (65536) and non-sequential values. I need to find the actual index of the ring array and set a new calculated index afterwards. As I couldn't find a way to get the actual index directly, I started a for loop and compared every "Strings[]"-array element with the "Ringtext.Text"-property. So far, so good. But when I want to set a new index to the ring, I need to use the "Set Value"-property. Here comes the problem: Every time I use the "String and Value[]"-property to get the index corresponding value, labview needs about 10 seconds to build it. Why is that? Labview doesn't have problems building the "Strings[]"-Array. Is there a way to handle the ring index seperatly I couldn't find? Can the "Strings and Values[]" operation be accelerated? Thank you for your time and your ideas. Best, ichsw
- 6 replies
-
- ring
- strings and value
-
(and 3 more)
Tagged with:
-
This package will be available for download through VIPM in a few days and covers a bug fix. [FIX] 3390029 - 'Delete elements from 2D array.vi' outputs incorrect result This is the output from buggy code: This is the output from the fixed code: Kind regards Jonathon Green OpenG Manager
-
Hi, i have question about array of clusters. I want to do some list of commands where i use table of arrays. In array are 2 tables one string and one image controller. I found code that find me active (clicked cell in this array but is there any way how to highlight this cell? I tried to changed background color of this cluster but this change color for whole table. Can you help me. My program is attached. editor.vi ClickedArrElement.vi
-
Hello, Am I crazy ? I can't get this to work right. Why isn't my 0 column sorted? Please help answer what I hope is a dumb question. Thanks Dan