Pressure to Voltage Mapping
The model to convert pressure in PSI to dedicated voltage will be impletement in printer.py file. That voltage would then be passed to setPressure method in Aerotech Class declared in stage_control.py.
def set_pressure(self, pressure = None):
"""
Method to set pressure of the system.
Parameters:
pressure (float) : Using the process model intended pressure is converted
to respective voltage.
Note:
Here analog pin0 on X stage is used which might not always be the case
"""
if pressure != None:
msg = '$AO[1].X = '
msg += '%0.6f' %pressure
else:
raise ValueError('staging.setPressure() was called with all None arguments')
msg += '\n'
print(msg)
self.send_message(msg)
Two considerations to keep in mind, the pressure passed as argument to set_pressure method is corresponding voltage (not PSI) and it can be seen that the pressure circuit it attached in X stage controller.
The pressure.yaml configuration file contains gain and bias to convert either pressure (PSI) -> voltage or vica versa:
Pressure Test
In order to test the pressure, we can run tests -> stages -> pressure_test.py using following command from root directory: (Pressure is passed as an argument in PSI along with regulator and solenoid enabler)