ControlWidget variables not recognized

Hi.

I am beginning to implement the features offered by the Pro version and began with the ControlWidget. I assumed to have understood its function but instead I am getting error messages.

The screenshot shows a simplified setup. I placed to sliders to control the start and stop voltage of a PSU output. The variables I entered into the Sweep table correspond to the variable designations I entered into the sliders. Still, SweepMe complains about not getting numerical inputs.

With the parameters debug windows, the variable names appear only within longer variable names that specify their origin. But even when using these long variable designations inside the Sweep table, they are not found.

What is the mistake I made?

Best wishes,
Christian

EDIT: The sequence used for this example consists of only the ControlWidget, next step down Makefile, next step down PSU (HP E3632A)

1 Like

Hi Christian,

in order to add a parameter to an input field, you need to use our parameter system and the parameter syntax behind that.

https://wiki.sweep-me.net/wiki/Parameter_system

It is based on curly brackets, like {…}. To quickly copy a parameter, you can use the widget “Parameters” as you already have in your Dashboard. Right-click on a parameter and copy the parameter including the curly brackets, e.g. {ControlWidgets_PSU_Start_Voltage_psu_start_V}. This string can then be added into a field.

However, there is one drawback of the ControlWidgets module at the moment. It does not make its value available to the Parameter systems early enough. So, it will not work right now even if you would use the correct parameter syntax. The value that you can see in the widget Parameters is probably the last value from your previous measurement.

I would recommend to use the module “Form” here where you can create two float input fields for start and end value. These values are immediately made available to the Parameter systems and the module Form is often used to create a parameterization before the measurement starts.

If you have a use case where you really need the value of a slider as earyl input for a field before the measurement starts, please let us know and we can make a change to the module to update the Parameter system more frequently. So far, the update happened only at each measurement iteration in the sequencer.

Thanks and best,
Axel

Here is an example how to configure an IV run using the SMU Simulation driver and the Form module:

This example shows how the input of the Form module is used in the Sweep editor of the SMU module. The measured (here simulated) IV curve then has a voltage range according to the given start and end voltage.

1 Like

Thanks Axel for the hint towards the parameter system, I wasn’t aware of this.

Regarding the order of variable read-in, I do not necessarily need the gadgets of the ControlWidgets module. I just need to be able to create a sort of page wherein all relevant parameters of the test program can be seen and edited instead of browsing through the various option pages of all instruments that are part of the setup. It sounds like the Forms module will allow to do just that, so I will have a closer look.

Best wishes,
Christian

1 Like

Let me know if something is missing in Form that you need. ControlWidget was more designed for creating input values during a measurement. So, you can use the value of a ControlWidgets Slider as a Sweep value of the SMU to control the voltage during a measurement over time for example. But of course each user brings in new application cases, so we are happy to hear about them.

Thanks and best,
Axel

1 Like

Hi everyone,

here is the full example as setting file

Example_Form_SMU.set (5.8 KB)

Just save the file on your computer and load it via the menu “Settings” in SweepMe! or drag and drop it into the sequencer.

Please make sure that the Form module is activated.

The example runs an IV measurement where start and stop value of the IV curve are defined via Form module input fields for float numbers.

Best, Axel

1 Like

Hi Axel.

Thanks for the example.

One limitation I am encountering now is that I do not see a way to use the variable associated with the Selection form within a selection field of an instrument. For instance, albeit I can create a Selection form with options of 2|4|8|16|32|64|128, I do not see a way to hand this over to the Averaging selection field within the Keysight EXR oscilloscope driver.

When developing the driver, that field was restricted to just a selection of values because it does not accept just any possible value but only some, so I would be hesitant to change it to a field where any value can be entered, just to be able to insert a variable.

Is there a way I missed?

Best wishes,
Christian

Hi Christian,

there are indeed some restrictions to use the parameter system when fields do not allow to enter a text yet.

This is a problem for drivers for Instrument modules that come with a fixed user interface. For drivers for instrument modules with a ‘Parameters’ section like Logger, Switch, Robot or in CustomFunction script, it is possible to define a field to be a string input.

In case of a Selection field (i.e. a drop-down box), there is no good solution yet as changing it into a string input would lead to the loss of the options. A good compromise could be that such a Selection field becomes usable as Combo box, i.e. a drop-down box where the user is still able to select pre-defined options, but can also type in an own value or use the parameter syntax {…}. The driver than would need to check whether the handed over value is reasonable and applicable to the instrument.
It means that we would need to do some modifications to SweepMe! to make this possible.

If you would like to further discuss this new topic, could you please open another topic here in the forum? There you could also highlight, which fields are affected.

Thanks and best
Axel

1 Like

Hello Axel.

Good idea, discussion continued in this new topic:

Best wishes,
Christian

1 Like