LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to dynamic enable or disable cluster in array

Hi All,

 

I’d like to create a custom UUT information window using an array of clusters instead of the default TestStand parallel UUT information window.

Here’s what I’d like to implement:

  1. Read RunState.TestSockets.Count(4 or 6) and dynamically create the corresponding number of clusters.
  2. Focus on the first UUT serial number field, wait for the scan input, then automatically move to the next serial number field.

So far, I’ve only completed part of the code, and I’m not sure how to implement the remaining functionality. Any comments or suggestions would be appreciated.

Download All
0 Kudos
Message 1 of 12
(1,151 Views)

A disabled property applies to all elements of an array.

 

Maybe you could place the full array in a shift register, the write a shorter array (first with only one element) back to the control.

 

You could also change the container size to only show a smaller number of items (make sure to hide the scrollbar and index display).

 

You can always check what item has been clicked and ignore if it is out of order.

 

Can you explain terms like "focus" and "scan the input field"? Are you just waiting for OK or cancel to go to the next item?

0 Kudos
Message 2 of 12
(1,133 Views)

Thanks for your input. As you may know, a string control has a “Focus” property. By enabling it and handling the Return key sent by the scanner (default setting: Enter after barcode scan), the program can validate the barcode length and automatically move to the next string control until all entries are completed.

In addition, invisible clusters can be used to dynamically update the array order.

0 Kudos
Message 3 of 12
(1,093 Views)

sageliu@18053 wrote:

 

In addition, invisible clusters can be used to dynamically update the array order.


I have no idea what that means....

0 Kudos
Message 4 of 12
(1,070 Views)

Sorry for the confusion caused by my unclear explanation. Let me clarify it:

  1. Initialize and display the corresponding number of array elements based on the TestStand thread count.
  2. Focus on the first thread string control and wait for the barcode scan. After the barcode is scanned, execute the corresponding thread and automatically move the focus to the next thread string control until all entries are completed, then hide the window.
  3. For the second round, if one thread completes, show the UUT window again and update the corresponding array element. The focus should return to the related string control and wait for the next barcode scan to execute again. If there is no action and another thread completes, then continue accumulating/updating the array elements accordingly.
0 Kudos
Message 5 of 12
(1,060 Views)

See if this gives you any ideas. 🙂

 

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 6 of 12
(987 Views)

Thank you for your input; it is very useful to me.

The first round looks good, but how can I always keep the cursor focused on the first string control when the window is loaded?

Ideally, the focus should always be initialized to the first string control. Even if the user clicks on the second or third string control, the focus should automatically return to the first one.

For the second round, the threads may complete at different times.

Scenario 1:

Thread 2 completes, updates the socket number, and the cursor remains focused on the corresponding string control, waiting for the next barcode scan to start the thread again.

Scenario 2:

Thread 2 completes, updates the socket number, and the cursor remains focused on the string control. Meanwhile, other threads also complete. In this case, I would like to accumulate the updates while always keeping the focus on the first available string control.

To be honest, my goal is to use this custom window instead of the default TestStand parallel UUT information window.

 

 

 

0 Kudos
Message 7 of 12
(832 Views)

Make sure you update the array before key-focus. Hmm, no. Wait a minute, i'll get back in a couple of minutes.

Yamaeda_0-1780649352183.png

 

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 8 of 12
(811 Views)

So, if there's only 1 row visible, the (undefined) string-ref must refer to the 1st row.

Yamaeda_0-1780652147155.png

 

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 9 of 12
(798 Views)

I appreciate your prompt reply. Maybe you misunderstood what I want. Let me put some pictures.

 

1) How to always keep the cursor on the first string control when loading the vi at initialization?

sageliu18053_1-1780664142334.png

2) As you know, the second round(it means re-show the VI) is based on the variable of Parameters.UUT.TestSocketIndex value trigger event, update it as below scenarios.

sageliu18053_2-1780665451308.png

 

 

 

0 Kudos
Message 10 of 12
(771 Views)