Description of the Python interface

Launching the interface

Be sure to have read the page on the installation and prerequisites for the python interface. It contains the information required to install and launch the interface.

Using the interface

Python GUI

  1. On/Off button. Quick way to toggle between no output voltage and the programmed output. If the button is On and you have set a voltage >0 with (5), but there is no output voltage (Feedback on the current parameters (10) remains 0), then the safety HV enable switch (Switch S2) is probably in the off position.
  2. You can toggle between the different output modes of the HVPS: DC (constant voltage), and Switching (square signal of defined amplitude and frequency).
  3. The source of the switching signal for the output, i.e. what controls the output switch that pulls the output high (to the voltage set point) or low (to 0V). The 3 settings are:
    1. Timer: an internal timer that enables switching at a programmed frequency set by (6),
    2. External: a 5V signal applied to pin 6 (F) of the 10-pin header,
    3. Button: the manual push button on the PCB (S1) controls the switching. The software selection of the switching source with button (3) is only possible if the header H2 on the PCB is on the “onboard” position. Otherwise the header forces the setting of the switching source.
  4. How the output voltage is controlled. The default (Regulated) is probably what you want. The “external” setting enables to apply a 0-5V signal to pin 5 (V) of the 10-pin header. Open-loop disables the regulator. If using either external or open-loop, refer to the datasheet of the EMCO DC/DC converter for the relation between input and output voltage, as it is strongly dependent on load!
  5. Slider to choose the output voltage. The voltage can also be set using the numerical inputs (11)
  6. The frequency of the output signal. The range and resolution of the slider can be set in the config.ini file which is located with the interface files. You can edit this file if you wish to change the bounds and resolution of the slider. Minimum value is 0.001 Hz, and maximum value is 1000 Hz. The frequency can also be set using the numerical inputs (11).
  7. If the HVPS is generating a square signal, you can programme a limited number of cycles to perform. Possible values are between 1 and 65535 cycles. The number of cycles can also be set using the numerical inputs (11). The slider is disabled if the HVPS is set to produce a continuous square waveform. This can be changed using (8). At the end of the cycles, pressing the on (1) button, or the push button on the PCB (S1) will start a new series of cycles.
  8. If the HVPS is generating a square signal, this button allows to change between a continuous square signal (infinity of cycles), or a limited number of cycles. In the latter case, the number of cycles can be set with slider 7.
  9. Allows to change the range of the cycle slider (lower and upper bound) by power of 10. The default range is 1 to 10. Pressing on (+) changes the range to 10-100, etc.
  10. This panel of indicators shows the current parameters of the HVPS. It allows to double check that the orders you give to the device are correctly understood. You can also check the feedback voltage value, which represents the voltage at the output of the EMCO. It is important to understand that the feedback voltage is not the voltage at the output of the HVPS. Indeed, to have the high voltage at the output, the HV switch must also be closed. This can be done by pressing the on/off button (1), or putting the HVPS in switching mode. The feedback voltage is present at the output if the HV LED on this panel (and LED D3 on the board) is on. If the voltage set point is >0, but the feedback voltage remains at 0, it is likely that the safety HV enable switch (S2) is off).
  11. Entering a precise value can be difficult with the sliders. You can therefore use the numerical input panel to set the voltage, frequency and cycle number. You can select values outside the slider range for frequency and cycles, and you are not limited to the resolution of the slider. Once you have entered a value, you can press OK (to confirm), Canc to cancel (close dialogue box without taking change into account or C to clear the value if you did a typing error and want to start again. For example, if you enter 1233.8 for the voltage setting and press Ok, the slider will indicate 1230, because it has a 10V resolution. However, the voltage set point in indicator 10 will show 1233, because the HVPS can set voltage with a 1V resolution.
  12. Shows the content of the memory. Some of the parameters are configuration and calibration of the HVPS (Name, PID coefficients, voltage calibration coefficients, etc.), but some other parameters indicate in which state the HVPS will be initialised when powered up. This can be useful if you want to run a demo that requires a configuration and you don’t want to enter it each time the HVPS starts. Unless required for this, the HVPS should not be configured to output a non-0 voltage on startup, as it can be dangerous for an unsuspecting user. The current state of the HVPS can be stored in memory with button 13.
  13. Saves the current configuration of the HVPS in the memory. When the HVPS is powered up, it will start with the parameters stored in memory. The saved information includes:
    1. On/off status (1)
    2. Switching configuration (2)
    3. Voltage and frequency (5, 6)
    4. Number of cycles (7, 8)
    5. Source of switching (3)
    6. Voltage control mode (4)
  14. Options button. It opens a dialogue box where options can be set. The Limit Voltage slider enables the user to set a voltage value (via slider or keypad) that must not be exceeded. If for example the HVPS can output up to 5kV, but it is used to drive an actuator that should not be driven above 3kV, you can limit the output voltage to 3kV as a safety measure. It will then be impossible to set a voltage higher than 3kV on the GUI, which can prevent accidental destruction of the actuator. The Button mode can be set between Latching and Push Button. It defines the behaviour of the manual switch S1: in latching mode, the state of the output is toggled between on and off each time the button is pushed and released, and in push button mode, the output is high as long as the button is pressed.
  15. Disconnect button. Press this to close communication with the HVPS and close the interface.
  16. Strobe setting pannel. You can generate a 5V pulse synchronised with the HV signal (when generating a square wave). Refer to this page for more information on this functionality.