All exercises

Pressure Comparator

Monitor a REAL pressure value against a static threshold in rungs.dev. The AOI sets a critical-state output when pressure drops below the threshold.

beginner

Parameters

NameTypeUsageDescription
In_PressureREALInputCurrent pressure reading to monitor.
Out_MotorCriticalBOOLOutput1 when pressure is below the threshold, 0 otherwise.

Behavior

  1. Use a fixed threshold value of 36464.0 for every scan.
  2. Compare the input In_Pressure to the threshold value every scan.
  3. If In_Pressure is less than the threshold value, set Out_MotorCritical to 1.
  4. If In_Pressure is greater than or equal to the threshold value, set Out_MotorCritical to 0.
  5. The comparison must work correctly for values equal to the threshold and for negative REAL values.

Ready to start?

Open this exercise in Rungs Studio, write your solution, then click Test in the toolbar to verify your work against the built-in test cases.