Changing voltages and parameters
1st example: https://github.com/elc-construction-electronique/Librairie-Python-ALR32XX/blob/main/Exemples/Exemple_1.py
Last updated
1st example: https://github.com/elc-construction-electronique/Librairie-Python-ALR32XX/blob/main/Exemples/Exemple_1.py
Last updated
The aim of this is to modify the control voltages on the 3 channels of the ALR3206T, to verify by measuring the voltages and to modify and read some parameters (OVP, OCP, IDN, ETAT).
The ALR32XX library is not in the "example_1.py" script folder, so the sys library changes the location where Python will search for ALR32XX (by default, the library is searched in the same location as the script)
The path now targets the N-1 folder in the Python script and will be able to find the library.
To complete the initialization of the procedure, we need to declare a variable for our power supply:
Here, the variable X will be linked to the ALR3206T connected via USB or RS232 to the computer. X therefore inherits functions from the library, for example X.Meesure_tension() to measure the voltage on one of the power supply channels.
The OVP (over voltage protection) and OCP (over current protection) are the maximum values set by the user to protect a load in case of misuse for example.
Our first action on the power supply will be to modify the OVP values:
32V for CH1
22V for CH2
12V for CH3
The rest of the script in this example is used to modify the voltages on each of the channels. Three voltages will be written:
30V for CH1
10.5V for CH2
3.4V for CH3
The corresponding code :
Once the voltages are available at the output, a check is made by displaying the measurement:
The last step in this example is to display the identity of the power supply on the screen, i.e. its name and version. Once read, the power supply will switch to "parallel" mode (coupling the CH1 & CH2 outputs in parallel) and check that the coupling is correct.
At the end of this example you will get a return similar to this one: