Setting sinusoidal pressure with Python. Flow EZ-2000 mbar
Hello.
I would like to set a sinusoidal pressure wave with Python using fgt_set_pressure. I think I have to set up the sine wave individually with values? Or is there a better way to do it.
I would like to do some pressure sweep and see at what values of pressure I get stable values. Frequencies in the range of 0.1Hz to 1-2 Hz.
Do you think that is possible?
If there are examples that you know, please let me know.
Thank you!
Hello,
The SDK only supports setting a single pressure with the fgt_set_pressure, so to produce a varying signal, you have to call the function at regular intervals with sample values of the desired signal. We don't have an example which produces a sine wave specifically, the closest we have is the BasicSetPressure example, which produces a linear ramp. See also the AdvancedParallelPressureControl example, which shows how to control the pressure from a background thread, if you don't already have a loop running in your application's main thread.
The Flow EZ accepts commands at a 20ms interval, so generating a 2Hz sine wave is possible. Whether the output pressure will be able to keep up with it depends on the volume of air you are pressurizing.
Best regards, Ygor