11-29-2019 04:23 AM
Hi,
I'm relatively new to Laview and would be open to any advice with a small project which I've assigned myself to experiment with arrays, clusters, etc., At this moment in time, I have an array with data read from a specified file path - the data from this file is in the 2D array which displays the information regarding the sensor values - in the left hand side column the period is displayed with the corresponding sensor value being read in the right hand side column.
Now the issue I'm having is that I cant think for the life of me how to get the array to follow the sequence continuously without setting the desired column and row number - I want the program to automatically go through the sequence of period with the sensor value continuously until stopped, for example when the period is 10, it should display this on an indicator with the sensor value in the column next to it. The system should automatically go through the sequence and return back to the first number and continue...
If there is any suggestions on how I can get my array to follow the sequence then I would appreciate it a lot.
(The photo shows what I have up to now, I have to manually input the row and column number and cant find any information on how I'm supposed to set this automatically. Thank you.)
11-29-2019 04:19 AM - edited 11-29-2019 04:21 AM
Hi,
I'm relatively new to Laview and would be open to any advice with a small project which I've assigned myself to experiment with arrays, clusters, etc., At this moment in time, I have an array with data read from a specified file path - the data from this file is in the 2D array which displays the information regarding the sensor values - in the left hand side column the period is displayed with the corresponding sensor value being read in the right hand side column.
Now the issue I'm having is that I cant think for the life of me how to get the array to follow the sequence continuously without setting the desired column and row number - I want the program to automatically go through the sequence of period with the sensor value continuously until stopped, for example when the period is 10, it should display this on an indicator with the sensor value in the column next to it. The system should automatically go through the sequence and return back to the first number and continue...
If there is any suggestions on how I can get my array to follow the sequence then I would appreciate it a lot.
(The photo shows what I have up to now, I have to manually input the row and column number and cant find any information on how I'm supposed to set this automatically. Thank you.)
11-29-2019 07:25 AM
Hi Climerator,
@Climerator wrote:
Now the issue I'm having is that I cant think for the life of me how to get the array to follow the sequence continuously without setting the desired column and row number - I want the program to automatically go through the sequence of period with the sensor value continuously until stopped, for example when the period is 10, it should display this on an indicator with the sensor value in the column next to it. The system should automatically go through the sequence and return back to the first number and continue...
If there is any suggestions on how I can get my array to follow the sequence then I would appreciate it a lot.
Use a FOR loop to (auto-)iterate over the rows of your 2D array.
(This is pretty basic LabVIEW stuff, so I suggest to take the "Training resources" offered in the header of the LabVIEW board!)
Why do you need a "Sensor profile" local variable? (You have a big race condition!) Use a wire instead!
11-29-2019 10:18 AM
LabVIEW is set up to do indexing of arrays into loops.
Disable that and use the i of the loop to index into your array instead.