Raspberry Pi HMI: Difference between revisions

From Axel Public Wiki
Jump to navigation Jump to search
Line 6: Line 6:
The steps to follow are simply to modify the '''LLExecLinux.conf''' file, under directory '''/data/plc'''<br>
The steps to follow are simply to modify the '''LLExecLinux.conf''' file, under directory '''/data/plc'''<br>
You have to uncomment one of these section, please select the correct one about your Raspberry PI model:
You have to uncomment one of these section, please select the correct one about your Raspberry PI model:
  <b>For Raspberry PI <= 3<b>
  <b>For Raspberry PI <= 3</b>
  <runtime filename="./LLXRt_Linux_ARM_HMI.so" area="1" targetId="RaspPI_2p2" targetComm="RaspPI_HMI">
  <runtime filename="./LLXRt_Linux_ARM_HMI.so" area="1" targetId="RaspPI_2p2" targetComm="RaspPI_HMI">
   <memory>
   <memory>
Line 23: Line 23:
   <param name="vnc_enable" value="false"/>
   <param name="vnc_enable" value="false"/>
   </params>
   </params>
  </runtime> -->
  </runtime>
   
   
  <b>Raspberry PI >= 4</b>
  <b>Raspberry PI >= 4</b>
Line 42: Line 42:
   <param name="vnc_enable" value="false"/>
   <param name="vnc_enable" value="false"/>
   </params>
   </params>
  </runtime> -->
  </runtime>


then you must restart your Raspberry PI.
then you must restart your Raspberry PI.

Revision as of 10:43, 9 July 2020

This article is intended to give some basic HMI support on the Raspberry PI runtime.

Requirements

  • An HDMI display capable to display resolution of 800x480.
  • A usb touch screen, or a usb mouse supported by the Raspbian distribution.

Target configuration

The steps to follow are simply to modify the LLExecLinux.conf file, under directory /data/plc
You have to uncomment one of these section, please select the correct one about your Raspberry PI model:

For Raspberry PI <= 3
<runtime filename="./LLXRt_Linux_ARM_HMI.so" area="1" targetId="RaspPI_2p2" targetComm="RaspPI_HMI">
 <memory>
  
  <databit size="0x0"/>
  <dataret size="0x0"/>
  
  <debug size="0x400000"/>
 </memory>
 <tasks>
  <task name="Draw" id="0" period="20000" type="worker"/>
  <task name="Refresh" id="1" period="20000" type="worker"/>
  <task name="Trend" id="2" period="100000" type="worker"/>
 </tasks>
 <params>
  <param name="vnc_enable" value="false"/>
 </params>
</runtime>

Raspberry PI >= 4
<runtime filename="./LLXRt_Linux_ARM_HMI_RASPPI4.so" area="1" targetId="RaspPI_2p2" targetComm="RaspPI_HMI">
 <memory>
  
  <databit size="0x0"/>
  <dataret size="0x0"/>
  
  <debug size="0x400000"/>
 </memory>
 <tasks>
  <task name="Draw" id="0" period="20000" type="worker"/>
  <task name="Refresh" id="1" period="20000" type="worker"/>
  <task name="Trend" id="2" period="100000" type="worker"/>
 </tasks>
 <params>
  <param name="vnc_enable" value="false"/>
 </params>
</runtime>

then you must restart your Raspberry PI. Please set the targetId to the right PageLab / LogicLab target release.

Using Pagelab

Configuration

Open PageLab software, the click on New project button.
Select target Raspberry PI 2.0 then give a name to the project.
Click on menu Project ==> Communication settings.
Select the GDB protocol and click on button Properties to specify the actual IP of the Raspberry.

Create a page

On the project tree, please right click on the Pages node then press Insert page.
Double click on the new page node, from the PLC Vars pane drag the sysSeconds variable in the page,
then select Edit control.

Compile and download

Select menu Project ==> Generate code
Select menu Project ==> Download project