pcb_set_mks()

Sets the value of a parameter. The value must be in MKS (unscaled) units. This function must be called within a PARM_MODIFIED_CB callback function created by dm_create_cb(). Returns data which must be returned by the PARM_MODIFIED_CB callback function.

See also: pcb_get_mks(), pcb_get_form_value(), pcb_set_form_value(), pcb_get_string(), pcb_set_string().

Syntax:

pcb_set_mks(paramData, paramName, value)

where

paramData is parameter data. NULL the first time. In addition to this variable being a parameter to this function, the value returned by this function must also be assigned to it.

paramName is the name of the parameter to set the value of.

value is the new value in MKS units.

Example:
create_item(...
  create_parm("A",
              "A parameter value",
              PARM_REAL | PARM_STATISTICAL | PARM_OPTIMIZABLE,
              "StdFormSet",
              0,
              prm("StdForm", "10.0"),
              list(dm_create_cb(PARM_MODIFIED_CB, "a_modified_cb", NULL, TRUE))),
  create_parm("B",
              "B parameter value",
              PARM_REAL | PARM_STATISTICAL | PARM_OPTIMIZABLE,
              "StdFormSet",
              0,
              prm("StdForm", "20.0")),
  create_parm("C",
              "C parameter value",
              PARM_REAL | PARM_STATISTICAL | PARM_OPTIMIZABLE,
              "StdFormSet",
              0,
              prm("StdForm", "30.0")));
defun a_modified_cb(cbP, clientData, callData)
{
    decl paramData=NULL;
    decl a_mks=pcb_get_mks(callData, "A");
    paramData=pcb_set_mks(paramData, "B", a_mks*2);
    return(pcb_set_mks(paramData, "C", a_mks*3));
}

Where Used:

Schematic

 

Privacy Statement  | Terms of Use  | Legal | Contact Us  | © Agilent 2000-2008 

Contents
Additional Resources