03-06-2024 05:12 AM - edited 03-06-2024 05:19 AM
Hello everyone,
I am currently involved in a project that requires the implementation of LabVIEW code to monitor a variable and store each new event in a matrix. The objective is to create a system that can efficiently and accurately detect and record unique variable events.
I am seeking advice on how to properly set up the block diagram in LabVIEW to handle this operation. In particular, I would like to understand how to configure the monitoring loop and update the matrix based on the detected events.
I have attached screenshots of my vi for reference. Your insights, suggestions, and feedback regarding the VI design and implementation would be greatly appreciated.
Thank you in advance for your help and collaboration.
Solved! Go to Solution.
03-06-2024 06:09 AM
Bouna sera Cristian,
cristian_cuda@hotmail.it wrote:
I am currently involved in a project that requires the implementation of LabVIEW code to monitor a variable and store each new event in a matrix. The objective is to create a system that can efficiently and accurately detect and record unique variable events.
I am seeking advice on how to ..
I guess you are new to LabVIEW from the wording you use in your message.
Your image also shows misunderstandings/misconceptions in the code: an event should be executed fast and not delayed by wait functions and long-running loops! The loop is quite senseless right now as the input data for the loop will not change (as long as the loop iterates)...
03-06-2024 07:22 AM
Hello, I apologize for the misunderstandings, but I have recently started using LabVIEW. I mentioned variables because I have another panel where I have a local variable. This local variable is a 2D array. The goal is to store the data of this local variable every time it updates. The panel I posted above is a test to debug the logic. Could you help me? Thank you in advance.
03-06-2024 07:46 AM - edited 03-06-2024 07:48 AM
Hi Cristian,
cristian_cuda@hotmail.it wrote:
I mentioned variables because I have another panel where I have a local variable. This local variable is a 2D array. The goal is to store the data of this local variable every time it updates.
Again this is a misunderstanding!
There is no "local variable on another panel", there is another VI with its frontpanel and some elements (like your 2D array) on this frontpanel. And there might be a local variable of one of the frontpanel elements inside the block diagram of that other VI.
Again: please try to learn and use the correct wording!
So please forget about that local variable, the defining frontpanel element is of interest!
Do you want to react on user actions done directly on this frontpanel element?
Generic advice: THINK DATAFLOW! In LabVIEW the wire is the variable!
03-06-2024 08:08 AM
I apologize again. Yes, I would like to modify the elements of "Array" from the front panel and have the changes stored in "Array 2". So, for example, if I have an array like
0 0 0
0 0 0
0 0 0
and I modify a value in the first row, first column, I would like to have an "Array 2" of the type
0 0 0
0 0 0
0 0 0
1 0 0
0 0 0
0 0 0
Essentially, I would like a concatenation of the two arrays.
03-06-2024 08:47 AM - edited 03-06-2024 08:47 AM
Hi Cristian,
cristian_cuda@hotmail.it wrote:
I would like to modify the elements of "Array" from the front panel and have the changes stored in "Array 2". Essentially, I would like a concatenation of the two arrays.
Start like this:
03-06-2024 08:55 AM
thank you very much, that's what I was looking for!