This is an old revision of the document!


Analog inputs

In this tutorial, we are going to demonstrated how to use different modes of analog inputs.

  • UniPi controller running Mervis OS
  • Basic project with attached controller a program in FBD mode
  • Knowledge of how the analog inputs work on UniPi units

In this tutorial, we will use Unipi Neuron L503.

The different analog inputs have different modes of operation, see Analog inputs. Change between modes in Mervis is done by configuring the UniPi module, therefor the changes in modes cannot be done in the program and the program has to be stopped during the configuration.

The default mode of each input is “Voltage”.

The changes are done on the prototype of the PLC or Extension. Double click on the prototype in the Left panel. The list of all available inputs and outputs will show up in the Main Window. Search for “AI_” and you will be presented with the list of all Analog input.

As you can see, for each physical Analog input you have two properties available: AO_X.Y_r and AO_X.Y_w. The one with suffix _w is for writing the values to the output. You will use this variable almost exclusively. The property with suffix _r is for reading back the current value set on the output. To change the mode, select appropriate “write” variable, head over to the Properties panel and select the desired mode in the “Analog Type” property.

We just changed the configuration of the PLC, which is not applicable by simply uploading the solution To save the configuration, right click on the prototype in the Left panel and in the context menu click on “UniPi - Configure Module”. The same procedure applies when changing modes of the Analog Output on the Extension.

During the configuration, the PLC will be switched to “Commissioning mode”, which means it will stop running the previously deployed solution. After the configuration, the PLC will return to its previous state. Make sure, that the connected technology is prepared for this blackout.