LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview structure for several sweeps with different steps

Hello everyone. I am looking for the right Labview control for the following task:

I need to execute a sweep of certain parameter, lets say "voltage".  The control should contain a table of 3 fields: "Start Value", "Stop Value", "Step" corresponding to one full sweep. The user should be able to expand the list of these by adding new rows, initializing as many sweeps as he/she wants to.

Then, after "Start button" is pressed, the values of the inputs in each line will be filtered for incomplete inputs, extracted (probably in a 2D array), limits programatically checked, and corresponding actions are executed.

I tried to use Table control, but I do not know how to restrict cells to numeric inputs only and when user is allowed to edit the data entries, he/she can also delete/add columns which is not desired.

Any other alternatives are very welcome.

P.S. In general the user interface and program is handled by consumer-producer scheme, with queue controlled state machines.

0 Kudos
Message 1 of 4
(1,569 Views)

You could use a 1D array of clusters. Each cluster containing the relevant values for one ramp. (see also this idea)

 

(If all fields are numeric, a 2D array with three columns might even work)

0 Kudos
Message 2 of 4
(1,565 Views)

Sorry here is a better example of what I would do...

TAbleCapture.PNG

A numeric array with the vertical scroll bar showing so you can add more rows (sweeps) as necessary.

 

You don't need to add columns because every sweep should have Start, Stop, and Step filled in.

 

But if your assignment was to use an actual Table control then you will simply have to check each row of strings as it is entered and make sure you can convert the strings into numbers.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 3 of 4
(1,493 Views)

@nicknamenickname wrote:

I need to execute a sweep of certain parameter, lets say "voltage".  


As I said, a simple 2D arrays is sufficient if all fields are numeric, but the cluster solution is more flexible because one fields could be a ring that allows you to chose the swept parameter (voltage, temperature, etc.) and timing information for each ramp.

 


@nicknamenickname wrote:

I tried to use Table control, but I do not know how to restrict cells to numeric inputs only and when user is allowed to edit the data entries, he/she can also delete/add columns which is not desired..


Personally, I would use a listbox  and have  "new", "append", "insert after", delete" "clear" (etc.) buttons on the side. Programmed correctly, you can easily select one entry (or even multiple!) and press delete, or select one entry and insert a new ramp in the middle of the current list. Pressing that button will trigger a dialog popup where you can enter all ramp parameters followed by OK, which then would update the listbox. Keep all ramp data in a shift register. You could even set it to popup a current entry for editing by double-clicking it.

0 Kudos
Message 4 of 4
(1,522 Views)