Hi all, has anyone successfully changed the intencity of a PWM channel?
I am trying to change the intencity of channel 1 and 2 for the stirring and the ai_bubbler respectively, but it doesn’t work.
It is updating in the settings but not in the pioreactors tab.
I have tried on different channels but still no luck.
Hi @Eleni_M,
Generally it’s not possible to change the PWM intensity, at least not from the default UI. How are you trying to change the intensity?
You can enable changing the stirring intensity / duty-cycle from the UI with the following change:
Another name for PWM intensity is “duty-cycle”, which we use internally.
- SSH into your leader Pioreactor
nano /var/www/pioreactorui/contrib/jobs/00_stirring.yaml
- Add the following the bottom of the file:
- key: duty_cycle
unit: "%"
label: Stirring DC
description: Duty cycle for stirring
type: numeric
default: null
display: true
- Refresh the Pioreactors page:
For the bubbler, the only way currently is by changing the config.ini duty_cycle
under [air_bubbler]
and restarting the job. However, we can make this editable, like stirring’s above. Would you like that?
Looking into the air-bubbler more:
In the source code for air_bubbler, we have duty_cycle
with settable: False
. This means other clients can’t edit duty_cycle, and a message like “Unable to set duty_cycle
in air_bubbler. duty_cycle
is read-only.” will appear.
However, the UI doesn’t know this setting is not settable! And the UI looks like you can edit it:
This is a flaw in our UI: we should make it more clear when a user can and can’t edit a setting.
In retrospect, we should allow duty_cycle
to be settable, so you can change it during an experiment. I’ll make that change now.
EDIT: I’ve just uploaded a new version of the bubbler plugin, v0.5.0. You can uninstall / reinstall the get the latest, or if you copied the code to your .pioreactor/plugins
folder, you can change False
to True
.
Ok, I see. I thought that we could change it in the settings. We managed to figure it out by changing the configuration. I was just worried that something is up with my version of the software.
I reinstalled the plugin and it works now! Thank you