LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help needed in creating Front End GUI

Hello all,

 

             Iam trying to develope a Front end Gui. Reading data from a spread sheet,  which has the following data 6 cloumn's 1) Parameter 2) Group 3) Max value 4) Min value 5) Default value 6) Value. Group is pretty much again classified in to 4-types. 

 

a) Temperature group  --- Slide

b) Switch   --- Push button

c) Sensor group (voltage or pressure)  ---- Knobs

d) Digital Inputs  --- Numeric Input

 

   From the spread sheet,for each parameter based on what type of group I should to create either a slider, or a switch or a knob or a Digital Input. And Based on 3rd and 4th column information, scale should be adjusted. 5th column should be used to set a default value and 6th column to assign a value

to that parameter.

 
 Some one  pls give me any suggestion how to approach, begin with this process. Iam worried how to classify the parameters in to group's.
 
-Lucky. 
    
0 Kudos
Message 1 of 29
(3,426 Views)

Are you trying to programmatically create different controls and programmatically create your program?  You aren't going to be able to do that.

 

If you have your controls already placed in  your VI, you can programmatically read the spreadsheet and be able to change the properties of the controls such as the data entry range.

 

There is the possibility of using scripting, but that is such an advanced topic, there is no way I could recommend it to a new LabVIEW user.

0 Kudos
Message 2 of 29
(3,421 Views)

Hey,

 

       Thank u for the reply.Not excatly like programatically, but the no of parameters will be limited to the range of 15 to 20.  So is there any way to predefine the controls in the Vi. and set the properties. 

 

 

-Lucky 

0 Kudos
Message 3 of 29
(3,418 Views)
each control has properties you get to them by going to the block diagram and righ clicking the control and then going down to create and than property node and then a list of properties will show up click on the property you want.
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 4 of 29
(3,404 Views)

You could set up 15 to 20 controls of each type on your front panel.  You will need to work with references to each control to get and set properties since there will be no way to wire them up to any specific functions on your block diagram since which controls mean what will vary during run time.  So you would move the block diagram terminals for the 15-20 controls of each type off to the side of your diagram.

 

When you go through your setup spreadsheet, you can set the visibility and front panel coordinates of each control you want to use.  For any you don't want to use, you will make them invisible.  Use property nodes to set the properties of each control.

 

When you want to read from or write to a control, you will need use the reference of the particular control with a property node to get or set its value.

 

This is not an easy archtitecture.  You will need to maintain arrays of references for each type of control.  You will also need to maintain a cross reference array so that you if want to access Control C (for example), you know which reference to index out which might happen to be element 1 in the array of slide references.  Perhaps control G would be element 4 of your array of knob references.

 

But with good organization of your control references and perhaps some good subVI's for setting and obtaining the references so you can index them out of the appropriate array, it can be done.  I would recommend looking at Ben's Action Engine Nugget for ideas of how to store the references in a functional global variable.

Message Edited by Ravens Fan on 07-25-2009 11:40 AM
Message 5 of 29
(3,387 Views)

Hello Sir,

 

I seperated the data from my spread sheet in to 4 groups.I defined the  controls in the front panel.And tried to create a property node for each control. But I dont know how to allocate each control to each parameter with their respective properties defined in the spread sheet. And also to make the excess  no of controls as invisible. Can you take a look
at my VI once and help me out at this point.

 

 

-Lucky

0 Kudos
Message 6 of 29
(3,346 Views)

Here is a programmatically cleaner version of what you posted.  Unfortunately, I don't have time right now to work on this.  It would take an hour or so to get a working example.

 

I did had a part where I built an array of slide references.  So once you figure out you want to set the properties or value of something like slide 2, you can index it out of the array and wire it to a property node to set its values.

Message Edited by Ravens Fan on 07-27-2009 01:34 PM
0 Kudos
Message 7 of 29
(3,335 Views)
Sir,

    With the example code you provided, I was able to adjust the max, min values of the scale, values to the controls during run time,but was not able to set the visibility(get rid of the excess controls not be used.) and default values to the controls. Here is my Vi (for know I was working only with slides and knobs) can you pls take a look at it once. And also is there any way to bring up the name of the control to which it is assigned.
 
-Lucky 
0 Kudos
Message 8 of 29
(3,307 Views)

You can't change the name of the control at runtime.  But you can change its caption.

 

Hide the label on all of your controls and make the captions visible.  Now when you assign all the other properties, assign the name to the caption.text property.

Message Edited by Ravens Fan on 07-27-2009 11:32 PM
0 Kudos
Message 9 of 29
(3,296 Views)

Sir,

 

     Thank you for your reply.. Adjusting the names during run time has worked can you pls find some time and look at the vi and help me  to set the visibility and default values..

 

-Lucky 

0 Kudos
Message 10 of 29
(3,288 Views)