2 Set Variable Options in One Panel?

I need a little help here, I'm trying to figure out how to place two boxes for a user defined values in the same panel. One is designed to store minLMEnergy, the other should store a variable called PIDmin. Unfortunately I cannot get Igor to recognize PIDmin as a variable. Running the procedure will cause the panel to pop up, filling in the value of minLMEnergy with the last value entered, the box for PIDmin will pop up reading "no value", however when I click on the box this text will change to read "no variable". I'm becoming a little frustrated with this because if I switch the placement of "value=PIDmin" and "value=minLMEnergy", I can enter a value for PIDmin, but the same error problem will occur for the minLMEnergy box instead. Is it possible to use two different set variable options in the same panel, or have I not properly identified the variables here?

I've included a copy of the code for generating the panel below, right now I'm not worried about processing or using the variable, I'm just trying to figure out how to make igor recognize that both PIDmin and minLMEnergy should be variables that I can adjust through the use of the panel.

#pragma rtGlobals=3     // Use modern global access method and strict wave access.

Function InitLiqScinGlobals()

    Variable/G PIDmin, minLMEnergy

End

Window LiqScin_NeuGam() : Panel
Variable xOff, yOff
PauseUpdate; Silent 1       // building window...
    DoWindow/K LiqScin_NeuGam
    NewPanel/K=1 /W=(521,60,910,200) as "LiqScin_NeuGam"
   
    SetDrawLayer UserBack
    SetDrawEnv fname= "Trebuchet MS",fsize= 16,fstyle= 1
    DrawText 20,30,"Liquid Scintillator Neutron/Gamma Separation"
    SetDrawEnv fname= "Trebuchet MS"
   
    xOff=30;    yOff = 60
    GroupBox LS_ANA pos={xOff-10,yOff-30}, size={350,90 }, title="Analysis",fsize= 12,fstyle= 1
   
    SetVariable LS_EGT,pos={xOff+200,yOff+5},size={120,21},bodywidth=50,title="LM_Energy >"
    SetVariable LS_EGT,help={"Adjust low-energy cut in the analysis"}
    SetVariable LS_EGT,font="Trebuchet MS",fSize=12,limits={0,inf,0},value=minLMEnergy
   
    SetVariable LS_PID,pos={xOff+200,yOff+30},size={120,21},bodywidth=50,title="PID_Minimum >"
    SetVariable LS_PID,help={"Adjust PID cut in the analysis for neutron/gamma separation"}
    SetVariable LS_PID,font="Trebuchet MS",fSize=12,limits={0,inf,0},value=PIDmin
           
End


Thanks in advance for any help or advice.
This is done with one of two methods.

Method 1 - Global Variables
* create a global variable call minLMEnergy
* link the setvariable to that global (easiest method is to double click the setvariable control in edit mode and set the variable)

Method 2 - Local Variable
* define the set variable to hold value=_NUM (check the syntax please!!!)
* read the setvariable with ControlInfo when you need to get the value

--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAHuntsville
jjweimer wrote:

This is done with one of two methods.

Method 1 - Global Variables
* create a global variable call minLMEnergy
* link the setvariable to that global (easiest method is to double click the setvariable control in edit mode and set the variable)



The global variable I want to create is actually PIDmin. For some reason the procedure isn't recognizing:
Variable/G PIDmin


It seems to be creating the minLMEnergy variable, and when I open edit mode for the panel, the value is set to minLMEngergy.
The problem stems from trying to select PIDmin as a value for PID_Minimum in the setvariable control. I used the Variable/G command to create the PIDmin variable in the procedure, but when trying to select this as the value in the setvariable control, it isn't shown on the list of possible options.
PanelCapture.JPG
Quote:
I used the Variable/G command to create the PIDmin variable in the procedure, but when trying to select this as the value in the setvariable control, it isn't shown on the list of possible options.


Two possibilities:

1. The global variable does not exist because the Variable/G command was never executed.

Putting the command in a procedure does not create the global variable. You can execute it from a procedure or from the command to create the global variable. Execute Variable/G command from the command line to create it.

2. The global variable exists but is in a data folder other than the current data folder.
hrodstein wrote:
Quote:
I used the Variable/G command to create the PIDmin variable in the procedure, but when trying to select this as the value in the setvariable control, it isn't shown on the list of possible options.


Two possibilities:

1. The global variable does not exist because the Variable/G command was never executed.

Putting the command in a procedure does not create the global variable. You can execute it from a procedure or from the command to create the global variable. Execute Variable/G command from the command line to create it.

2. The global variable exists but is in a data folder other than the current data folder.


Thank you hrod, I know you've answered several of my questions already and I appreciate the help here as well. I thought I had used the execute command but it seems this was not the case. Entering it via the command line fixed the problem.