LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Implementation of a LabVIEW Code to Store Variable Events in a Matrix

Solved!
Go to solution

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.

0 Kudos
Message 1 of 7
(445 Views)

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 ..


  • "Variables" are something different in LabVIEW, you surely want to monitor frontpanel elements and user actions upon them.
  • A "matrix" is a special datatype in LabVIEW, in your image you show 2D arrays.
  • You don't store "events" in an array, but data...
  • Please define "unique events"...

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)...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 7
(404 Views)

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.

0 Kudos
Message 3 of 7
(381 Views)

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!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 7
(362 Views)

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.

0 Kudos
Message 5 of 7
(350 Views)
Solution
Accepted by topic author cristian_cuda@hotmail.it

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:

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 6 of 7
(318 Views)

thank you very much, that's what I was looking for! 

0 Kudos
Message 7 of 7
(300 Views)