In order to simulate the function block for the pressure sensor, a global variable list is created. It contained the following variables,

  •     sensor_read:REAL;


  •     max_bar:REAL:=0.350; //350mBar


  •     max_bar_in_mAmps:REAL:=20;


  •     min_bar:REAL:=0; //0Bar


  •     min_bar_in_mAmps:REAL:=4;

        


  •      bar_read:REAL; //Should be in mBar

A pressure sensor function block was created in the program, which looked like the following,

Then the visualizer was created and looked like this,

  • No labels