Analog Instructions

Analog Instructions


Analog 8-bit input

  1. Analog 8-bit input
  2. Analog inputs and simulation
  3. Practical example
  4. Hardware in action
  5. Analog Hardware Setup

Analog converter example: potmeter.mp4.

Shortcut: none.
Click on More Instructions in the Instructions menu.

This function add a Analog input instruction to the ladder diagram.
Click on the More Instructions button in the toolbar and select an area in the ladder diagram where you want to place the instruction.

This brings up a dialog box, which allows the user to select counters, timers,...
Select a Analog 8-bit Input and click on the OK button.

An Add Analog Converter dialog box will appear. You can make the following settings in the dialog box:

  1. Number: Give the Analog Input a unique number between 0 and 31.
  2. Name: An unique name (not required) for the counter.
  3. Set Value: Value between 0 and 255.
  4. Select a comparison operator:
    1. '=' EQUAL: If the analog input value and set value are equal, the instruction is logically true. If these values are not equal, the instruction is logically false.
    2. '<' LESS THAN: If the analog input value is less than the set value, the instruction is logically true.
    3. '>' GREATER THAN: If the analog input value is greater than the value at source B, the instruction is logically true.
  5. Comment: Place a comment for the instruction

The input field "name" and "comment" is not required.


The Analog Instruction is placed in the ladder diagram.


Simulation state and analog inputs

In simulation state it is possible to test 8 analog inputs (ADC0-ADC7).


Practical example

Creation of the ladder diagram.


Create the .obj file.


Download obj file to the Raspberry Pi board.


Download succeeded.





Execute the RPiPLC software on the gnublin board.


RPIsPLC is started.


Hardware in action


Hardware setup


Jumper settings for GNUBLIN Module-ADC.

Add new comment