Diva

From Axel Public Wiki
Jump to navigation Jump to search

PLC Runtime configuration on Diva board

The following instructions will help you to set up a Diva board from Dave, so that it can be used as a PLC target, with the ability to configure generic modules for I/O on CANopen fieldbus.

Prerequisites

  • Owning a Diva board with Divelk and Daku daughter-boards or equivalent hardware, and Linux-Xenomai kernel and filesystem.

Please see following link: http://www.dave.eu/dave-cpu-module-am335x-diva.html

  • Have a development environment for your Diva, please refer to the documentation here:
http://wiki.dave.eu/index.php/Category:Diva
and
http://wiki.dave.eu/index.php/Booting_Linux_Kernel

Installation steps

Set up a Diva board

You need a Diva board with a Linux kernel with Xenomai extensions, and a filesystem with relative user-space libraries.

Download PLC runtime software from Axel

You can download the archive TargetDiva_xxxxxx.tar.bz2 from the section
Downloads of our website, under section Run-times PLC and Diva board PLC Run-time
Uncompress the archive on a Unix-type filesystem.

Copy DTB on target board

Copy the file ./kernel_dtb/am335x-axel.dtb on your board.
Please refer to instruction here: http://wiki.dave.eu/index.php/Booting_Linux_Kernel.
Example: if you are booting from a tftp server, copy the file in the tftp publish directory and then, on your board u-boot prompt, type

setenv dtb_file am335x-axel.dtb
saveenv

Copy Linux kernel on target board

Copy the file ./kernel_dtb/uImage_axel on your board.
Please refer to instruction here: http://wiki.dave.eu/index.php/Booting_Linux_Kernel.
Example: if you are booting from a tftp server, copy the file in the tftp publish directory and then, on your board u-boot prompt, type

setenv bootfile uImage_axel
saveenv

Extract extralibs in your root filesystem

Extract the archive ./extralibs/extralibs.tar.bz2 in your root filesystem under the directory /usr/local In a target shell type:

cd /usr/local
tar jxvf extralibs.tar.bz2

Copy plc runtime on your board

Copy the content if the directory ./data/plc in the directory /data/plc on the target board. Please create it if it does not exist.

Find Hardware ID

On your target please run

cd /data/plc/
./LLExec

This command produce an output line like the following one

Hardware Id: 39d37fbaedc40000

Obtain a License file from Axel

Please write to info@axelsw.it and ask for a valid license file, please include your Hardware Id. Copy the obtained file LLExec.key on your target in the directory /data/plc

Setup startup scripts

Copy the file ./etc/init.d/llexec in your target filesystem in /etc/init.d On the target create symbolic link as follow

ln -s /etc/init.d/llexec /etc/rc5.d/S99llexec

Reboot the Diva board

If all the steps have done, you can connect to the target with the last official Axel Automation Suite

(optional) Change VNC password

PLC runtime comes with HMI remote control via VNC protocol.
You can connect to the target and, when asked, you can type the default password D1va

If you wish to change the default password, log in in the board prompt and type

cd /data/plc
./AlVncConf -p new_password
cp vnc.auth authVNC 

Please reboot.

Connection with Axel Automation Suite

First connection with LogicLab

  • Please open LogicLab
  • Select New project...
  • Please type a name for the project and select target Diva 1.0
  • From the menu On Line select Set up communication...
  • Select protocol GDB and press Properties button
  • Insert the ip address of the Diva board and confirm.
  • From the menu On Line press Connect
  • Press F5 to download the example code on the target board.
  • Please confirm all the sequent questions.
  • On the tree on the left unfold the icon Global vars
  • Drag variable cnt on watch window
  • Here you can see the variable counting cycles

First connection with PageLab

  • Please open PageLab
  • Select New project...
  • Please type a name for the project and select target Diva 1.0
  • Left-click icon Pageson the left tree.
  • Select Insert page and type a name for the new page.
  • Press Insert new edit toolbar item
  • Draw the edit in the page
  • Double click on the property Variable on the right
  • Value selection select Variable
  • Select sysTimer and confirm
  • From the menu Project select Communication setting
  • Select protocol GDB and press Properties button
  • Insert the ip address of the Diva board and confirm.
  • From the menu Projectselect Download project
  • Please confirm all the sequent questions.
  • On the display of the target you will see the milliseconds timer that's running