Difference between revisions of "Installation guide: Process and Operator station on the Raspberry Pi"

From Proview Wiki
Jump to: navigation, search
(Created page with "<dl><dt> <strong>1) Install Ubuntu 12.10 desktop OS on the development (virtual) machine:</strong><br /> </dt></dl> <dl><dd><dl><dd>Host system is Microsoft Windows 7 Ultimate...")
 
Line 1: Line 1:
<dl><dt> <strong>1) Install Ubuntu 12.10 desktop OS on the development (virtual) machine:</strong><br /> </dt></dl> <dl><dd><dl><dd>Host system is Microsoft Windows 7 Ultimate 64 bit,  fully patched, 2 socket XeonE5620, 32GB RAM &nbsp;::VM environment is Oracle  VM VirtualBox 4.2.6r82870 with Extension Pack hosted on above </dd><dd>Create virtual machine (VM): 4GB RAM, 30GB disk, bridged  network adaptor, enable 3D accel, no floppy boot, bidir clipboard,  shared folder to pwr docs, otherwise defaults </dd><dd>Boot the iso on the VM </dd><dd>English, install ubuntu </dd><dd>Download updates while installing </dd><dd>Install this third party software </dd><dd>Erase disk and install ubuntu </dd><dd>Chicago </dd><dd>English (us), english (us) </dd><dd>Hostname pwrDevel </dd><dd>Require login pw </dd><dd>Restart<br /><br /> </dd></dl> </dd></dl> <dl><dt><strong>2) Patch the install</strong><br /> </dt></dl> <dl><dd><dl><dd>sudo apt-get update </dd><dd>sudo apt-get dist-upgrade </dd><dd>restart (for new kernel)<br /><br /> </dd></dl> </dd></dl> <dl><dt> 3) <strong>Install virtualbox tools</strong><br /> </dt></dl> <dl><dd><dl><dd>sudo apt-get install linux-headers-generic dkms build-essential </dd><dd>From vbox menu pick: Devices | Install Guest Additions </dd><dd>Allow autorun prompt to procede, authenticate </dd><dd>Restart <br /> </dd></dl> </dd></dl>
+
<p>&nbsp;1) Install Ubuntu 12.10 desktop OS on the development (virtual) machine:<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Host system is Microsoft Windows 7 Ultimate 64 bit, fully patched, 2 socket XeonE5620, 32GB RAM&nbsp; ::VM environment is Oracle VM VirtualBox 4.2.6r82870 with Extension Pack hosted on above <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Create virtual machine (VM): 4GB RAM, 30GB disk, bridged network adaptor, enable 3D accel, no floppy boot, bidir clipboard, shared folder to pwr docs, otherwise defaults <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Boot the iso on the VM <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; English, install ubuntu <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Download updates while installing <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Install this third party software <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Erase disk and install ubuntu <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Chicago <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; English (us), english (us) <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Hostname pwrDevel <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Require login pw <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Restart<br /><br />2) Patch the install<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo apt-get update <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo apt-get dist-upgrade <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; restart (for new kernel)<br /><br />3) Install virtualbox tools<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo apt-get install linux-headers-generic dkms build-essential <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; From vbox menu pick: Devices | Install Guest Additions <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Allow autorun prompt to procede, authenticate <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Restart<br /><br /><br />4) Minimize annoyances<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Get rid of advertising and the global menu <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo apt-get remove unity-lens-shopping appmenu-gtk appmenu-gtk3 appmenu-qt <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Launch firefox, disable 'global menu integration' extension <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Logout, log back in<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; turn off spyware<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; launch "System Settings | Privacy" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pick "Search Results," pick "Include online search results: Off" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pick "Diagnostics", uncheck "Send error reports to Canonical", pick "Record Activity: OFF" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo add-apt-repository ppa:tualatrix/ppa <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo add-apt-repository ppa:satyajit-happy/themes <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo add-apt-repository ppa:indicator-multiload/stable-daily <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo apt-get update <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo apt-get install gnome-shell synaptic gconf-editor gnome-tweak-tool ubuntu-tweak nautilus-open-terminal<br /><br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; note: accept defaults for gdm<br /><br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo apt-get install orion-gtk-theme indicator-multiload compizconfig-settings-manager <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; right click desktop pick "Change Desktop Background", select non-orange and non-purple background <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from Dash, launch "System Load Indicator" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; launch "System Settings | Ubuntu Tweak" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pick "Tweaks | Miscellaneous", pick "Overlay scrollbars: Normal" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pick "Tweaks | Theme", pick "Gtk theme: Orion", "Icon theme: gnome", "Window theme: Radiance" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pick "Tweaks | Desktop Icons", pick "Show Computer", "Show mounted volumes" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pick "Tweaks | Unity", adjust "Launcher icon size" to not waste so much screen space <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pick "Tweaks | Window", pick "Window control button...: Right"<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from Dash, launch "CompizConfig Settings Manager" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; un-check "Snapping Windows" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; delete unneeded icons from launcher: the "bag", the libre office stuff, the "U"s, the advertising <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; add "Terminal" to launcher <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo apt-get install geany <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; add "Geany" to launcher<br /><br /><br />5) Install prerequisites for 'Proview build from source code'<br /><br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install some packages (note: openssh-server is not really a prerequisite) <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo apt-get install make flex libgtk2.0-dev libdb5.1-dev libdb5.1++-dev libasound2-dev doxygen libmysql++-dev xfonts-100dpi openssh-server <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install java JDK <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; download tarball from http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cd /usr/local <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo tar -zxvf /home/&lt;userID&gt;/jdk-7u17-linux-x64.tar.gz <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo chown -R root:root jdk1.7.0_17/ <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo -s <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cd /etc/profile.d <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; touch proview.build.sh <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vi proview.build.sh <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; insert the following lines: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; export jdk=/usr/local/jdk1.7.0_17 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; export PATH=$PATH:$jdk/bin <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; save edited file, exit vi <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit (from sudo)<br /><br /><br />6) Install Proview development environment &amp; debug runtime<br /><br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wget -Opwr48_4.8.6-3.2_amd64.deb http://sourceforge.net/projects/proview/files/proview/proview_4.8.6-3/ubuntu_12.10/pwr48_4.8.6-3.2_amd64.deb/download <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo dpkg -i pwr48_4.8.6-3.2_amd64.deb <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo adduser pwrp sudo <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; logout <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; login as pwrp <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fix annoyances <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from launcher, pick "System Settings | Brightness and Lock" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pick "Lock: OFF" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cd <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo chown pwrp:pwrp Desktop <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install antlr <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wget http://www.antlr2.org/download/antlr-2.7.7.tar.gz <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tar -zxvf antlr-2.7.7.tar.gz <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; geany ~/antlr-2.7.7/lib/cpp/antlr/CharScanner.hpp <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; add: #include &lt;strings.h&gt;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; include &lt;stdio.h&gt; <br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; save changes and exit <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cd ~/antlr-2.7.7 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ./configure <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; make <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo make install <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; change max shared memory <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo geany /etc/sysctl.conf <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; insert a line at the end: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; kernel.shmmax=67108864 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; save changes, exit geany <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo -s <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo 67108864 &gt; /proc/sys/kernel/shmmax <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit<br /><br /><br /><br />7)) Install Proview source<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; login as pwrp <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cd <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wget -Opwrsrc_4.8.6-3.2.tar.gz http://sourceforge.net/projects/proview/files/proview/proview_4.8.6-3/pwrsrc_4.8.6-3.2.tar.gz/download <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tar -zxvf pwrsrc_4.8.6-3.2.tar.gz<br /><br />8) Bake the raspberry pi<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; get the wheezy image 2013-02-09 via torrent <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; write to 8 GB Class 10 SD card <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; boot <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; using the Raspi-config tool: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; expand_rootfs <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; configure_keyboard <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; English (US) <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; English (US) <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The default for the keyboard layout <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; No compose key <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Control-Alt-Backspace to terminal X server: No <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; change_pass <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; change_locale <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; en_US.UTF-8 UTF-8 only <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; default locale for system environment: none <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; change_timezone: US Central <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ssh: Enable <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; boot_behavior: No <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Finish <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; reboot <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; login as pi <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo apt-get update <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo apt-get dist-upgrade <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo apt-get install tightvncserver <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo apt-get install libgtk2.0-dev <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo rm /etc/ssh/ssh_host_* <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo dpkg-reconfigure openssh-server <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo adduser pwrp <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; use password = 'pwrp' (same as Proview distro default) <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo adduser pwrp dialout <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (this is for arduino access) <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo visudo <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; insert following line under the "root ALL=(ALL) ALL" Line: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pwrp ALL=(ALL) ALL <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; save changes, exit <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo nano /etc/security/limits.conf <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; insert the following:<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - rtprio 99 <br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; save and exit <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo nano /etc/pam.d/su <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uncomment line: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; session required pam_limits.so <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; save and exit <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (note: this allows the pwr service start to set pwr tasks' realtime priorities) <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (note2: also applies to the pwrp tightvncserver X session, since that is launched with su also) <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo nano /etc/init.d/tightvncserver <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; insert the following into the new file:<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; !/bin/sh<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /etc/init.d/tightvncserver <br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VNCUSER='pwrp' <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case "$1" in <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; start) <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; su $VNCUSER -c '/usr/bin/tightvncserver :0 -geometry 1024x768 -depth 24' <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo "Starting TightVNC Server for $VNCUSER "<br /><br />&nbsp;&nbsp;&nbsp; stop) <br />&nbsp;&nbsp;&nbsp; pkill Xtightvnc <br />&nbsp;&nbsp;&nbsp; echo "TightVNC Server stopped"<br /><br />&nbsp;&nbsp;&nbsp; ) <br /><br />&nbsp;&nbsp;&nbsp; echo "Usage: /etc/init.d/tightvncserver {start|stop}" <br />&nbsp;&nbsp;&nbsp; exit 1<br /><br />&nbsp;&nbsp;&nbsp; esac <br />&nbsp;&nbsp;&nbsp; exit 0 <br />&nbsp;&nbsp;&nbsp; save changes, exit nano <br />&nbsp;&nbsp;&nbsp; sudo chmod 755 /etc/init.d/tightvncserver <br />&nbsp;&nbsp;&nbsp; sudo update-rc.d tightvncserver defaults <br />&nbsp;&nbsp;&nbsp; exit (i.e. logout) <br />&nbsp;&nbsp;&nbsp; login as pwrp <br />&nbsp;&nbsp;&nbsp; mkdir ~/proview <br />&nbsp;&nbsp;&nbsp; vncpasswd <br />&nbsp;&nbsp;&nbsp; enter and confirm <br />&nbsp;&nbsp;&nbsp; no view-only password <br />&nbsp;&nbsp;&nbsp; sudo nano /etc/hostname <br />&nbsp;&nbsp;&nbsp; change to desired node name (e.g. rpi3) <br />&nbsp;&nbsp;&nbsp; save and exit <br />&nbsp;&nbsp;&nbsp; cd <br />&nbsp;&nbsp;&nbsp; ssh-keygen -t rsa <br />&nbsp;&nbsp;&nbsp; cd ~/.ssh <br />&nbsp;&nbsp;&nbsp; touch authorized_keys <br />&nbsp;&nbsp;&nbsp; chmod 600 authorized_keys <br />&nbsp;&nbsp;&nbsp; choose a static IPv4 address <br />&nbsp;&nbsp;&nbsp; sudo nano /etc/hosts <br />&nbsp;&nbsp;&nbsp; update with hostname and ip <br />&nbsp;&nbsp;&nbsp; add any other nodes which will participate in the distributed control system <br />&nbsp;&nbsp;&nbsp; sudo nano /etc/network/interfaces <br />&nbsp;&nbsp;&nbsp; change eth0 to (substitute actual network values): <br />&nbsp;&nbsp;&nbsp; iface eth0 inet static <br />&nbsp;&nbsp;&nbsp; address 192.168.0.1 <br />&nbsp;&nbsp;&nbsp; netmask 255.255.255.0 <br />&nbsp;&nbsp;&nbsp; network 192.168.0.0 <br />&nbsp;&nbsp;&nbsp; broadcast 192.168.0.255 <br />&nbsp;&nbsp;&nbsp; gateway 192.168.0.254 <br />&nbsp;&nbsp;&nbsp; save changes and exit <br />&nbsp;&nbsp;&nbsp; sudo shutdown -r now <br />&nbsp;&nbsp;&nbsp; login to X desktop using vnc client (to verify X is working)<br /><br />9) Configure ssh access from dev to rpi<br /><br />&nbsp;&nbsp;&nbsp; logon to dev as pwrp <br /><br />&nbsp;&nbsp;&nbsp; do this only once: <br />&nbsp;&nbsp;&nbsp; ssh-keygen -t rsa <br />&nbsp;&nbsp;&nbsp; sudo geany /etc/hosts <br />&nbsp;&nbsp;&nbsp; insert line for raspberry pi machine(s) and any other hosts in the distributed system <br />&nbsp;&nbsp;&nbsp; save and exit <br />&nbsp;&nbsp;&nbsp; scp /home/pwrp/.ssh/id_rsa.pub rpi3:/home/pwrp/.ssh/authorized_keys<br /><br />10) Install cross platform dev tools on dev<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; logon to dev as pwrp <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo apt-get install ia32-libs git <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cd <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mkdir rpitools <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cd rpitools <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo git clone git://github.com/raspberrypi/tools.git <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; create symbolic links to compilers and archiver as a workaround on rather long fully qualified names - <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (Proview merge tool has a hardcoded alloc of 80 chars max for the FQ name of each of these tools): <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo -s <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ln -s /home/pwrp/rpitools/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc /usr/bin/arm-gcc <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ln -s /home/pwrp/rpitools/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++ /usr/bin/arm-g++ <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ln -s /home/pwrp/rpitools/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-ar /usr/bin/arm-ar <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit<br /><br />11) Get a copy of the rpi headers and libraries to compile and link against, respectively<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; logon to dev as pwrp <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rsync -avz -e ssh pwrp@rpi3:/usr/include /home/pwrp/rpi <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo rsync -avz -e ssh pwrp@rpi3:/usr/lib/arm-linux-gnueabihf /usr/lib <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo rsync -avz -e ssh pwrp@rpi3:/lib/arm-linux-gnueabihf /lib<br /><br />12) Setup the build environment<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; logon to dev as pwrp <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cd <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; geany ~/.envarm <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; insert the following into this new file:<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .envarm:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; env for Proview development for raspberry pi<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; export pwre_cc=/usr/bin/arm-gcc <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; export pwre_cxx=/usr/bin/arm-g++ <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; export pwre_ar=/usr/bin/arm-ar <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; export pwr_host_exe=/usr/pwr48/os_linux/hw_x86_64/exp/exe <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; export pwre_host_exe=/usr/pwr48/os_linux/hw_x86_64/exp/exe <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; export pwre_env_db=/home/pwrp/pwre_env_db <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; export pwre_bin=/home/pwrp/pwrsrc_4.8.6-3/src/tools/pwre/src/os_linux <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; export pwre_dir_symbols=$pwre_bin/dir_symbols.mk <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; export PATH=$PATH:/home/pwrp/rpitools/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; source $pwre_bin/pwre_function <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; save and exit <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; geany ~/.bashrc <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; insert at end of file: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; source ~/.envarm <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; save and exit <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; close all Terminal(s) <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; launch Terminal <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cd <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mkdir pwrrls_4.8.6-3 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; define a PWRE environment for the build: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pwre add v486_arm <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Environment&nbsp; : v486_arm <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Module.........: rt <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Source root....: /home/pwrp/pwrsrc_4.8.6-3/src <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Import root....: /usr/pwr48/os_linux/hw_x86_64 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Build root.....: /home/pwrp/pwrrls_4.8.6-3 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Build type.....: dbg <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- OS.............: linux <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Hardware.......: arm <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Description....: X48arm <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; himBH<br /><br />13) Fixup Proview config script<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; logon to dev as pwrp <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cd /home/pwrp/pwrsrc_4.8.6-3/src/tools/pwre/src/os_linux <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cp pwre_configure.sh pwre_configure.sh.org <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cd <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; geany /home/pwrp/pwrsrc_4.8.6-3/src/tools/pwre/src/os_linux/pwre_configure.sh <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; insert after line 311: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pwre_config_check_lib gtk GTK gtk gtk 0 "/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pwre_config_check_include gtk GTK 1 "/home/pwrp/rpi/include/gtk-2.0/gtk/gtk.h" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; as a sanity check, the code block should look like: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if test $pwre_hw == "hw_arm"; then <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pwre_config_check_lib gtk GTK gtk gtk 0 "/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pwre_config_check_include gtk GTK 1 "/home/pwrp/rpi/include/gtk-2.0/gtk/gtk.h" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pwre_config_check_include jni JNI 1 $jdk/include/jni.h <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pwre_config_check_include jni JNI 0 $jdk/include/linux/jni_md.h <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; save and exit <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pwre init v486_arm <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pwre configure <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; need to figure out some paths, will use the output from "pwre configure" to help, <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this is a little tedious: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; geany /home/pwrp/pwrrls_4.8.6-3/pwre_arm_linux.cnf <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; find line "export pwre_conf_libgtk=" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; note the embedded command, e.g. "pkg-config --libs gtk+-2.0", designate as "cmd1" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; find line "export pwre_conf_incdirgtk=" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; note the embedded command, e.g. "pkg-config --cflags gtk+-2.0", designate as "cmd2". the commands will now be run on the rpi: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ssh rpi3 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; execute cmd1: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pkg-config --libs gtk+-2.0 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; save the output in a new temp file, e.g. in geany <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; execute cmd2: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pkg-config --cflags gtk+-2.0 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; save the output to the temp file <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit from ssh session <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; in the temp file, replace "usr/include" with "home/pwrp/rpi/include" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; in geany, open /home/pwrp/pwrsrc_4.8.6-3/src/tools/pwre/src/os_linux/pwre_configure.sh <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; find line "export pwre_conf_libgtk=" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hard-code the contents of that assign to the output of cmd1, e.g.: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo "export pwre_conf_libgtk=\"-lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0\"" &gt;&gt; $cfile <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; find line "export pwre_conf_incdirgtk=" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hard-code the contents of that assign to the edited output of cmd2, e.g.: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo "export pwre_conf_incdirgtk=\"-pthread -I/home/pwrp/rpi/include/gtk-2.0 -I/usr/lib/arm-linux-gnueabihf/gtk-2.0/include -I/home/pwrp/rpi/include/atk-1.0 -I/home/pwrp/rpi/include/cairo -I/home/pwrp/rpi/include/gdk-pixbuf-2.0 -I/home/pwrp/rpi/include/pango-1.0 -I/home/pwrp/rpi/include/gio-unix-2.0/ -I/home/pwrp/rpi/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -I/home/pwrp/rpi/include/pixman-1 -I/home/pwrp/rpi/include/freetype2 -I/home/pwrp/rpi/include/libpng12 \"" &gt;&gt; $cfile <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; find line "echo "export pwre_conf_lib=\"-lpthread -lm -lrt -lcrypt\"" &gt;&gt; $cfile" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; add X11 and db5.1 libraries, e.g.: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo "export pwre_conf_lib=\"-lpthread -lm -lrt -lcrypt -lX11 -ldb-5.1\"" &gt;&gt; $cfile <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; find line "echo "export pwre_conf_libdir=\"$conf_libdir\"" &gt;&gt; $cfile" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hard-code the assignment to: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo "export pwre_conf_libdir=\"-L/usr/lib/arm-linux-gnueabihf -Wl,-rpath=/usr/lib/arm-linux-gnueabihf -Wl,-rpath=/lib/arm-linux-gnueabihf\"" &gt;&gt; $cfile <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; find line "echo "export pwre_conf_incdir=\"$conf_incdir\"" &gt;&gt; $cfile" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hard-code the assignment to: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo "export pwre_conf_incdir=\"-I /home/pwrp/rpi/include -I/usr/local/jdk1.7.0_17/include -I/usr/local/jdk1.7.0_17/include/linux\"" &gt;&gt; $cfile <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; save the edited file <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cd <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mkdir pwrCustom <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; save the edited file (again) as ~/pwrCustom/pwre_configure.sh.custom <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit geany<br /><br />14) Fixup Proview source tree<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fix service start script: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cp /home/pwrp/pwrsrc_4.8.6-3/src/tools/pkg/deb_armel/pwrrt/pwr ~/pwrCustom <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; geany ~/pwrCustom/pwr <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for each of the functions: pwr_start, pwr_stop, pwr_reload, pwr_kill: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; replace the "whoami" conditional test from "root" to "pwrp" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if using an arduino uno, add the following line within the create_wrapper function, after the umask command: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo "stty -F /dev/ttyACM0 10:0:8be:0:3:1c:7f:15:1:0:1:0:11:13:1a:0:12:f:17:16:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0" &gt;&gt; $wrapper <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; save and exit <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fix code error: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; geany /home/pwrp/pwrsrc_4.8.6-3/sev/lib/sev/src/sev_db.cpp <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; add open curly brace on line 52: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else if ( type == sev_eDbType_Sqlite) { <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; add close curly brace after line 58. <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; code block should now look like: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ( type == sev_eDbType_Mysql) {<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if defined PWRE_CONF_MYSQL <br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return sev_dbms::open_database();<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else <br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; printf( "** Release is not built with mysql\n"); <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return 0;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; endif <br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else if ( type == sev_eDbType_Sqlite) {<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if defined PWRE_CONF_SQLITE3 <br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return sev_dbsqlite::open_database();<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else <br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; printf( "** Release is not built with sqlite3\n"); <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return 0;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; endif <br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return 0; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end example code block <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; save the edited file as: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ~/pwrCustom/sev_db.cpp <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit geany <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; edit the build package script, it will not create a *.deb file as-is: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; geany ~/pwrsrc_4.8.6-3/src/tools/pkg/deb_armel/pwrrt/build.sh <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "# Create directories" section, insert line: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mkdir -p $pkgroot/usr/pwrp/adm/db <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uncomment lines which copy op to cnf <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uncomment lines which copy user to cnf <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; add following lines to "# Copy user to cnf" section: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cp $pwre_broot/$pwre_target/exp/inc/pwr_arduino_uno.ino $pkgroot/usr/pwrrt/cnf/user <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cp $pwre_sroot/tools/pkg/deb/adm/proview_icon.png $pkgroot/usr/pwrrt/cnf/user <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cp /home/pwrp/pwrCustom/Proview.desktop $pkgroot/usr/pwrrt/cnf/user <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; after the "# Copy user to cnf" section, insert the following lines:<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Copy user security data <br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mkdir -p $pkgroot/usr/pwrp/adm/db <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cp $pwre_sroot/tools/pkg/deb/adm/pwr_user2.dat $pkgroot/usr/pwrp/adm/db <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; comment out line "dpkg-buildpackage -aarmel -b" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; add following lines: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; packagename=pwrrt-$version.tar.gz <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tar -czf ../$packagename * <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; save the edited file as: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ~/pwrCustom/build.sh <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit geany <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; geany ~/pwrCustom/fixPwrSource.sh <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; insert the following lines into the new file:<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; !/bin/bash<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fix some missing dependencies<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cp /home/pwrp/pwrsrc_4.8.6-3/nmps/lib/nmps/src/nmps.h /home/pwrp/pwrsrc_4.8.6-3/src/exe/rt_sim/src/ <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cp /home/pwrp/pwrsrc_4.8.6-3/src/exe/rt_elog/src/rt_elog.h /home/pwrp/pwrsrc_4.8.6-3/xtt/lib/xtt/src/ <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cp /home/pwrp/pwrsrc_4.8.6-3/src/exe/rt_elog/src/rt_elog.h /home/pwrp/pwrsrc_4.8.6-3/xtt/lib/xtt/gtk/ <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cp /home/pwrp/pwrsrc_4.8.6-3/src/exe/rt_elog/src/rt_elog.h /home/pwrp/pwrsrc_4.8.6-3/src/exe/rt_elog_dump/src <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cp /usr/include/db.h /home/pwrp/pwrsrc_4.8.6-3/src/exe/rt_elog_dump/src <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cp /usr/include/db.h /home/pwrp/pwrsrc_4.8.6-3/xtt/lib/xtt/src <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cp /usr/include/db.h /home/pwrp/pwrsrc_4.8.6-3/xtt/lib/xtt/gtk <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mkdir /home/pwrp/pwrsrc_4.8.6-3/wb/lib/wb/src/antlr <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cp /home/pwrp/antlr-2.7.7/lib/cpp/antlr/* /home/pwrp/pwrsrc_4.8.6-3/wb/lib/wb/src/antlr <br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fix code error<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cp ~/pwrCustom/sev_db.cpp /home/pwrp/pwrsrc_4.8.6-3/sev/lib/sev/src/sev_db.cpp <br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; copy build script which creates just a tarball, not a debian package, and includes some custom rpi/arduino specific stuff<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cp ~/pwrCustom/build.sh /home/pwrp/pwrsrc_4.8.6-3/src/tools/pkg/deb_armel/pwrrt <br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; copy custom pwre_configure.sh<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cp /home/pwrp/pwrCustom/pwre_configure.sh.custom /home/pwrp/pwrsrc_4.8.6-3/src/tools/pwre/src/os_linux/pwre_configure.sh <br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; copy custom pwr service control script<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cp ~/pwrCustom/pwr /home/pwrp/pwrsrc_4.8.6-3/src/tools/pkg/deb_armel/pwrrt/ <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; save and exit <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; chmod 755 ~/pwrCustom/fixPwrSource.sh <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; geany ~/pwrCustom/Proview.desktop <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; insert the following lines into the new file: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [Desktop Entry] <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Name=Proview <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Comment=SCADA Operator Station <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Exec=/home/pwrp/.xtt_start <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Icon=proview_icon <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Terminal=false <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Type=Application <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MimeType=text/plain <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Categories=GTK <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; save and exit<br /><br />15) Final cleanup<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; logon to dev as pwrp <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; delete /home/pwrp/pwrsrc_4.8.6-3 (and all contents) <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; delete everything from /home/pwrp/pwrrls_4.8.6-3, leaving the folder <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unpack the source (again): <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cd <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tar -zxvf pwrsrc_4.8.6-3.2.tar.gz<br /><br />16) Build Proview for raspberry pi<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; logon to dev as pwrp <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cd <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pwre list <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pwre init v486_arm <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ./pwrCustom/fixPwrSource.sh <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pwre create_all_modules <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pwre import rt <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pwre import java <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pwre import op <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pwre configure <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ./pwrCustom/fixPwrSource.sh <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pwre ebuild rt <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pwre ebuild op <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pwre build tools/pkg deb_armel <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; note: to enable pkg rebuild (when make says nothing to do): <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; touch /home/pwrp/pwrsrc_4.8.6-3/src/tools/pkg/deb_armel/pwrrt/control<br /><br /><br />17) Install Proview runtime and op station on Raspberry Pi<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; logon to dev as pwrp <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; geany ~/pwrCustom/installRpi.sh <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; insert the following lines into the new file:<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; !/bin/bash<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install Proview package on Raspberry Pi<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unpack the tarball<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cd /home/pwrp/proview <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tar -zxvf pwrrt-.tar.gz <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; chown -R pwrp:pwrp /home/pwrp/proview<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; configure target dirs, install the archive<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install -d -o pwrp -g pwrp /usr/pwrrt <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install -d -o pwrp -g pwrp /usr/pwrrt/cnf <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install -d -o pwrp -g pwrp /usr/pwrrt/cnf/op <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install -d -o pwrp -g pwrp /usr/pwrrt/cnf/user <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install -d -o pwrp -g pwrp /usr/pwrrt/exe <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install -d -o pwrp -g pwrp /usr/pwrrt/lib <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install -d -o pwrp -g pwrp /usr/pwrrt/load <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install -d -o pwrp -g pwrp /pwrp <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install -d -o pwrp -g pwrp /pwrp/arm_linux <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install -d -o pwrp -g pwrp /pwrp/arm_linux/exe <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install -d -o pwrp -g pwrp /pwrp/arm_linux/lib <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install -d -o pwrp -g pwrp /pwrp/arm_linux/lis <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install -d -o pwrp -g pwrp /pwrp/arm_linux/obj <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install -d -o pwrp -g pwrp /pwrp/common <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install -d -o pwrp -g pwrp /pwrp/common/db <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install -d -o pwrp -g pwrp /pwrp/common/inc <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install -d -o pwrp -g pwrp /pwrp/common/load <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install -d -o pwrp -g pwrp /pwrp/common/log <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install -d -o pwrp -g pwrp /pwrp/common/loghist <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install -d -o pwrp -g pwrp /pwrp/common/web <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install -d /usr/pwrp <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install -d -o pwrp -g pwrp /usr/pwrp/adm <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install -d -o pwrp -g pwrp /usr/pwrp/adm/db <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install -d /usr/share/doc/pwrrt <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install -D /home/pwrp/proview/etc/* /etc <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install -D /home/pwrp/proview/etc/init.d/* /etc/init.d <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install -D -m 644 /home/pwrp/proview/usr/pwrrt/cnf/proview.cnf /etc <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install -D -o pwrp -g pwrp /home/pwrp/proview/usr/pwrrt/* /usr/pwrrt <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install -D -o pwrp -g pwrp /home/pwrp/proview/usr/pwrrt/cnf/* /usr/pwrrt/cnf <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install -D -o pwrp -g pwrp /home/pwrp/proview/usr/pwrrt/exe/* /usr/pwrrt/exe <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install -D -o pwrp -g pwrp /home/pwrp/proview/usr/pwrrt/lib/* /usr/pwrrt/lib <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install -D -o pwrp -g pwrp /home/pwrp/proview/usr/pwrrt/load/* /usr/pwrrt/load <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install -D -o pwrp -g pwrp /home/pwrp/proview/usr/pwrrt/cnf/op/.??* /usr/pwrrt/cnf/op <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install -D -o pwrp -g pwrp /home/pwrp/proview/usr/pwrrt/cnf/user/.??* /usr/pwrrt/cnf/user <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install -D -o pwrp -g pwrp /home/pwrp/proview/usr/pwrp/adm/db/* /usr/pwrp/adm/db <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install -D -m 644 /home/pwrp/proview/usr/share/doc/pwrrt/* /usr/share/doc/pwrrt <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install -D -m 644 /home/pwrp/proview/usr/share/man/man1/* /usr/share/man/man1 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install -D -o pwrp -g pwrp -m 775 /home/pwrp/proview/usr/pwrrt/cnf/user/.??* /home/pwrp <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install -D -o pwrp -g pwrp -m 775 /home/pwrp/proview/usr/pwrrt/cnf/user/* /home/pwrp <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install -D -m 644 /home/pwrp/proview/usr/pwrrt/cnf/user/proview_icon.png /usr/share/pixmaps <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install -D -o pwrp -g pwrp -m 644 /home/pwrp/proview/usr/pwrrt/cnf/user/Proview.desktop /home/pwrp/Desktop <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if [ -f /home/pwrp/pwr_arduino_uno.ino ] <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; then <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install -d -o pwrp -g pwrp /home/pwrp/sketchbook <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install -d -o pwrp -g pwrp /home/pwrp/sketchbook/pwr_arduino_uno <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mv /home/pwrp/pwr_arduino_uno.ino /home/pwrp/sketchbook/pwr_arduino_uno <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; chown pwrp:pwrp /home/pwrp/sketchbook/pwr_arduino_uno/pwr_arduino_uno.ino <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fi <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; save and exit <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; scp /home/pwrp/pwrrls_4.8.6-3/os_linux/hw_arm/bld/pkg/pwrrt-.tar.gz pwrp@rpi3:~/proview <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; scp /home/pwrp/pwrCustom/installRpi.sh pwrp@rpi3:~/ <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ssh rpi3 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cd <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; chmod 775 installRpi.sh <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo ./installRpi.sh <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo update-rc.d pwr defaults <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit (from ssh session) <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 18) create proof-of-concept Proview project <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; logon to dev as pwrp <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; one-time fix so plc prog will build: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mkdir /home/pwrp/pwrrls_4.8.6-3/os_linux/hw_x86_64 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mkdir /home/pwrp/pwrrls_4.8.6-3/os_linux/hw_x86_64/exp <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mkdir /home/pwrp/pwrrls_4.8.6-3/os_linux/hw_x86_64/exp/exe <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cp ~/pwrsrc_4.8.6-3/src/exp/com/src/os_linux/pwrp_env.sh /home/pwrp/pwrrls_4.8.6-3/os_linux/hw_x86_64/exp/exe <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end one time fix <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; on the desktop, double-click Proview V4.8 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; accept (and respect) the license terms <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; using "PwR Project List": <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; enter edit mode <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; add a BaseReg object, child to Bases <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; open the new object, set attributes: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ObjectName: BaseV48arm <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Version&nbsp; : X48arm <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Path&nbsp; : /home/pwrp/pwrrls_4.8.6-3 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; close the object <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; save changes <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; note: the new base define is reflected as a new line in /usr/pwrp/adm/db/pwr_projectlist.dat <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the binding to the release build's path is via the "X48arm" token, which will be used below <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; add a $Hier object, sibling to Bases <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set ObjectName attribute = "testProjects" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; add a ProjectReg object, child of testProjects <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; open new object, set attributes: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ObjectName : piPOC <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Description: Raspberry Pi Proof of Concept <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Version&nbsp; : X48arm <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (note: Version attr binds the project to the BaseV48arm) <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; close the object <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; save changes <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Confirm Actions: Yes <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; note: the new project is reflected as a new directory tree at /usr/local/pwrp/pipoc <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; leave edit mode <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; right-click piPOC, pick Open Project <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; using "Configure Directory Volume": <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; enter "Production QBUS id" = 5 (this is arbitrary, but better than using defaults, for troubleshooting) <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; click Next <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; click Next <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; click No <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; click Next <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; click Next <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; click Skip this node <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; click Next <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; click Yes <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; using "Configure Root Volume": <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pick Operator Station <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; click Next <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; click Next <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; click Next <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; using "PwR VolPipoc, pwrp on pipoc": <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from the drop-down menu, pick "File | Volume Attributes..." <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; change the "OperatingSystem" attribute to "CustomBuild" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; close the object <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; save changes <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; close the window <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; using "PwR Directory, pwrp on pipoc": <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; enter edit mode <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; open pipoc object, set attributes: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NodeName&nbsp; : rpi3 (i.e. the hostname of the target rpi) <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OperatingSystem: CustomBuild <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BootNode:&nbsp; : rpi3 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Address&nbsp; : 192.168.0.1 (i.e. the IPv4 address of the rpi) <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; close the object <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; add a CustomBuild object as child to pipoc <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; open the new object, set attributes: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ObjectName&nbsp; : build <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cc&nbsp; : /usr/bin/arm-gcc <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cxx&nbsp; : /usr/bin/arm-g++ <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ar&nbsp; : /usr/bin/arm-ar <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OperatingSystem: Linux on ARM <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Platform&nbsp; : arm_linux <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Release&nbsp; : X48arm <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; close the object <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; save changes <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; leave edit mode <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; right-click "VolPipoc", pick Open Volume <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; using "PwR VolPipoc, pwrp on pipoc": <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; enter edit mode <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; in the right pane, delete the Maintenance object <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; in the right pane, delete the OpDefault object <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; in the right pane, delete the WebHandler object <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; in the right pane, delete the WebBrowser object <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; add a XttGraph object as child to Op <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set ObjectName to Display1 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; open Op object, set attributes: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UserName&nbsp; : pwrp <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FastAvail[0]&nbsp; : Nodes-Pipoc-Op-Display1 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; close the object <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; in the center pane, add a $PlantHier object <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set ObjectName to Bakery <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; add a $PlantHier, child to Bakery <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set ObjectName to Signals <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; add two Iv objects as children of Signals <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set ObjectName's to Iin and Iout, respectively <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; add a PlcPgm object as child of Bakery <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set ObjectName to Plc <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; save changes <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; leave edit mode <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; right-click Bakery-Plc, pick Open Program <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; using "Bakery-Plc" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; enter edit mode <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; add a GetIv object <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; add a StoIv object <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; connect the GetIv output to the StoIv input <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from drop-down menu, pick "View | Palette | Plant". Using the right-pane <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; plant hierarchy: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Connect (bind) Signals-Iin to GetIv <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Connect (bind) Signals-Iout to StoIv <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; save changes <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; leave edit mode <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; close the window <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; using "PwR VolPipoc, pwrp on pipoc": <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; right click Nodes-Op-Display1 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pick "Open Ge..." <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; using "PwR Ge display1" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; add two ValueInputMedium objects <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; record the coordinates for the area to display, i.e. the area which contains the two objects <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from the drop-down menu, pick "File | Graph Attributes" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; enter the x &amp; y coordinates for this display area <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; close the object <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; double-click one of the ValueInputMedium objects, set attribute: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Value.Format&nbsp; : %6d <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; close object <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; repeat for the other Input object <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; View "Plant Hierarchy", select Bakery-Signals-Iin <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; press Ctrl key, double-click on first ValInpMed object (binds signal to object) <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; repeat, bind Iout to other display object <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pick "File | Save" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; close the window <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; using "PwR VolPipoc, pwrp on pipoc": <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from drop-down menu, pick "Functions | Build Node" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; example output as shown in "Proview Development Console": <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Setting base /usr/pwr48 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Open pipoc <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; args: pipoc pwrp pwrp <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Welcome to <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pipoc V4.8 Raspberry Pi Proof of Concept <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Revision history <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2013-03-09 pwrp Project created <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Processing line: 50 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Building volume directory <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Opening volume 'VolPipoc' <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Berkeley DB 5.1.29: (October 25, 2011) <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; info get: 0 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Build node pipoc <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Plc window generated Bakery-Plc-W <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /home/pwrp/pwrrls_4.8.6-3 is baseroot <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Setting base /home/pwrp/pwrrls_4.8.6-3 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Cross compilation ARM_LINUX <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Plc window compiled for arm_linux optimized -O3 Bakery-Plc-W <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /home/pwrp/pwrrls_4.8.6-3 is baseroot <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Setting base /home/pwrp/pwrrls_4.8.6-3 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Cross compilation ARM_LINUX <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Plc plcpgm compiled for arm_linux optimized -O3 Bakery-Plc <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Web startpage generated $pwrp_web/index.html <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /home/pwrp/pwrrls_4.8.6-3 is baseroot <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Setting base /home/pwrp/pwrrls_4.8.6-3 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Cross compilation ARM_LINUX <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Building archive for volume: 000_001_001_001 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Archive built for volume: 000_001_001_001 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Working with load file volume 'VolPipoc'... <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Open file... <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Successfully created load file for volume 'VolPipoc' <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- 26 objects with a total body size of 26392 bytes were written to new file. <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Creating bootfile for node rpi3 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Plc thread generated priority 22, scantime 0.10000 s, 1 plcpgm's <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /home/pwrp/pwrrls_4.8.6-3 is baseroot <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Setting base /home/pwrp/pwrrls_4.8.6-3 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Cross compilation ARM_LINUX <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Plc process compiled for arm_linux optimized -O3 Dummy <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /home/pwrp/pwrrls_4.8.6-3 is baseroot <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Setting base /home/pwrp/pwrrls_4.8.6-3 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Cross compilation ARM_LINUX <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Plc program linked for arm_linux node plc_rpi3_0005_plc <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Build node pipoc <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end example output <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from drop-down menu, pick "Functions | Distribute" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; using "Distributor": <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; select rpi3 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from the drop-down menu, pick "Functions | Distribute" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; example output in "Proview Development Console": <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pwrp_pkg_rpi3_0001.tgz 100% 1705KB 1.7MB/s 00:00 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- No package installed <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Installing package pwrp_pkg_rpi3_0001.tgz <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Unpack package pwrp_pkg_rpi3_0001.tgz <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Move files to target directories <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo: no tty present and no askpass program specified <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end example output <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; there will be some warnings in Workbench Messages re missing files, ignore these <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit from the Proview development environment (close all windows in reverse order of opening them) <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 19) run the test project <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; connect to rpi3 via vnc client <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nano ~/.xtt_start <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; edit the rt_xtt invoke to launch the operator station: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $pwr_exe/rt_xtt Nodes-Pipoc-Op &amp; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; save changes and exit <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo nano /etc/proview.cnf <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; edit the qcomBusId to 5 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; save changes and exit <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo shutdown -r now <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (so the pwr service will pick up the new bus ID) <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; connect to rpi3 via vnc client <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; start the op station: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; double-click the Proview desktop icon <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; launch Display1 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; verify manually entering a value in Iin is copied to Iout <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; verify manually entering a value in Iout is overwritten by value in Iin <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; verify status is green <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; note: to reset runtime from an abend: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; source pwr_stop.sh <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --------------------------------------------------------------------------------------------------- <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OK, proof of concept works, let's have another pi do some I/O <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; after all, what good is a SCADA system without I/O? <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ---------------------------------------------------------------------------------------------------<br /><br />20) Build another rpi (nobody can have just one!), hostname rpi2<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install base OS (item 8 above) <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; config new pi for ssh (item 9 above) <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install Proview (item 17 above) <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo nano /etc/proview.cnf <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; edit the qcomBusId to 5 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; save changes and exit <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 21) configure rpi2 for arduino <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; login to rpi2 as pwrp <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; connect the arduino device <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo apt-get install arduino <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; launch arduino <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pick "Tools | Board | Arduino Uno" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pick "Tools | Serial Port | /dev/ttyACM0" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pick "File | Sketchbook | pwr_arduino_uno" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; in sketch, verify debug assignment is 0 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; verify baudRate is 19200 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; upload sketch to the arduino <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; note: due to the bizarre handling of serial in Linux (i.e. raw, cooked, much interference by software layers, etc.), <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the following config is needed prior to starting the pwr runtime: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; stty -F /dev/sttyACM0 10:0:8be:0:3:1c:7f:15:1:0:1:0:11:13:1a:0:12:f:17:16:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this config is included in the "pwr" service start script as per edits in sections above. <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (as a side note, if the Uno is connected to a virtual machine via VirtualBox, if you bind the Uno device from the (Windows) host <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; to the VM using USB and not COM, then things seem to work in Proview debug runtime. Again, the stty config needs to be run prior to runtime start.)<br /><br />22) Update Proview project<br /><br />&nbsp;&nbsp;&nbsp; logon to dev as pwrp <br /><br />&nbsp;&nbsp;&nbsp; launch Proview <br />&nbsp;&nbsp;&nbsp; using "PwR Project List" <br />&nbsp;&nbsp;&nbsp; from the menu, pick "File | Open | GlobalVolumeList" <br />&nbsp;&nbsp;&nbsp; using "PwR Global Volume List" <br />&nbsp;&nbsp;&nbsp; enter edit mode <br />&nbsp;&nbsp;&nbsp; add a VolumeReg object as sibling of VolPipoc <br />&nbsp;&nbsp;&nbsp; open object, set attributes: <br />&nbsp;&nbsp;&nbsp; ObjectName&nbsp; : VolPipoc2 <br />&nbsp;&nbsp;&nbsp; Description&nbsp; : 0.1.1.2 pipoc <br />&nbsp;&nbsp;&nbsp; VolumeId&nbsp; : _V0.1.1.2 <br />&nbsp;&nbsp;&nbsp; Project&nbsp; : pipoc <br />&nbsp;&nbsp;&nbsp; close the object <br />&nbsp;&nbsp;&nbsp; save changes <br />&nbsp;&nbsp;&nbsp; leave edit mode <br />&nbsp;&nbsp;&nbsp; close the window <br />&nbsp;&nbsp;&nbsp; using "PwR Project List" <br />&nbsp;&nbsp;&nbsp; open PiPOC project <br />&nbsp;&nbsp;&nbsp; enter edit mode<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; add a RootVolumeConfig object as sibling of VolPipoc <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; open object, set attribute: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ObjectName&nbsp; : VolPipoc2 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; close the object<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; add a NodeConfig object as sibling to pipoc <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; open object, set attributes: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ObjectName&nbsp; : pipoc2 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NodeName&nbsp; : rpi2 (i.e. the hostname of the target rpi) <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OperatingSystem: CustomBuild <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BootNode:&nbsp; : rpi2 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Address&nbsp; : 192.168.0.2 (i.e. the IPv4 address of the rpi) <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; close the object<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; add a CustomBuild as child to pipoc2 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; open object, set attributes: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ObjectName&nbsp; : build <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cc&nbsp; : /usr/bin/arm-gcc <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cxx&nbsp; : /usr/bin/arm-g++ <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ar&nbsp; : /usr/bin/arm-ar <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OperatingSystem: Linux on ARM <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Platform&nbsp; : arm_linux <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Release&nbsp; : X48arm <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; close the object <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; open pipoc2's RootVolumeLoad object, set attribute: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ObjectName&nbsp; : VolPipoc2 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; close the object<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; save changes <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; click Yes to "Do you want to create this Volume?" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; leave edit mode<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; right click VolPipoc2, pick OpenVolume <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; using "Configure Root Volume" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pick "Operator Station" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; click Next <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; click Next <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; click Next <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; using "PwR VolPipoc2, pwrp on pipoc" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; enter edit mode <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from the drop-down menu, pick "File | Volume Attributes..." <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; change the "OperatingSystem" attribute to "CustomBuild" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; close the object <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; in the right pane, delete the Maintenance object <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; in the right pane, delete the OpDefault object <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; in the right pane, delete the WebHandler object <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; in the right pane, delete the WebBrowser object<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; add a XttGraph object as child to Op <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set ObjectName to Display2<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; open Op object, set attributes: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UserName&nbsp; : pwrp <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AutoStart[0]&nbsp; : Nodes-Pipoc2-Op-Display2 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FastAvail[0]&nbsp; : Nodes-Pipoc2-Op-Display2 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; close the object <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; add a Arduino_USB object as child of Pipoc2 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; open object, set attributes: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ObjectName&nbsp; : Arduino <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; close object <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; add a Arduino_Uno object as child of Arduino <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; open object, set attributes: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ObjectName&nbsp; : Uno1 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Device&nbsp; : /dev/ttyACM0 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BaudRate&nbsp; : 19200 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; close object <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; add a ChanAi object as child of Uno1 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; open object, set attributes: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ObjectName&nbsp; : Ai0 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Number&nbsp; : 0 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RawValRangeLow&nbsp; : 0 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RawValRangeHigh&nbsp; : 1023 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ChannelSigValRangeLow&nbsp; : 0 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ChannelSigValRangeHigh : 5 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SensorSigValRangeLow&nbsp; : 0 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SensorSigValRangeHigh&nbsp; : 5 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ActValRangeLow&nbsp; : 0 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ActValRangeHigh&nbsp; : 1023 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; close object <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; add a ChanDo object as child of Uno1 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; open object, set attributes: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ObjectName&nbsp; : Do2 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Number&nbsp; : 2 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; close object <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; add a ChanDi object as child of Uno1 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; open object, set attributes: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ObjectName&nbsp; : Di4 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Number&nbsp; : 4 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; close object <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; in the center pane, add a $PlantHier object <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set ObjectName to Bakery2 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; add a $PlantHier object, child to Bakery2 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set ObjectName to Signals <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; add an Ai object as child of Signals <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; open object, set attributes: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ObjectName&nbsp; : Ai0 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SigChanCon&nbsp; : Nodes-Pipoc2-Arduino-Uno1-Ai0 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; close object <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; add a Di object as child of Signals <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; open object, set attributes: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ObjectName&nbsp; : Di4 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SigChanCon&nbsp; : Nodes-Pipoc2-Arduino-Uno1-Di4 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; close object <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; add a Do object as child of Signals <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; open object, set attributes: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ObjectName&nbsp; : Do2 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SigChanCon&nbsp; : Nodes-Pipoc2-Arduino-Uno1-Do2 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; close object <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; add a PlcPgm object as child of Bakery2 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set ObjectName to Plc2 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; save changes <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; leave edit mode <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; right-click Bakery2-Plc, pick Open Program <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; using "Bakery2-Plc2" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; enter edit mode <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; save changes (there are none - but we need the sub-window to exist) <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; leave edit mode <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; close the window <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; using "PwR VolPipoc, pwrp on pipoc": <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; right click Nodes-Op-Display2 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pick "Open Ge..." <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; using "PwR Ge display2" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; add one ValueInputMedium object <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; add two ValueMedium objects <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; note the coordinates for the area to display <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from the drop-down menu, pick "File | Graph Attributes" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; enter the x &amp; y coordinates for display area noted above <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; close the object <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; double-click the ValueInputMedium object, set attribute: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Value.Format&nbsp; : %6d <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; close object <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; repeat for the first ValueMedium object <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; repeat with %6.2f for other ValueMedium object <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; View Plant Hierarchy, select Bakery2-Signals-Do2 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; press Ctrl key, double-click on ValueInputMedium object <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; note: this connects the display object to the target plant signal<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; repeat, connect Di4 to ValMed, connect Ai0 to other ValMed<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pick "File | Save" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; close the window <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; using "PwR VolPipoc2, pwrp on pipoc": <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from drop-down menu, pick "Functions | Build Node" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from drop-down menu, pick "Functions | Distribute" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; using "Distributor": <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; select rpi2 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from the drop-down menu, pick "Functions | Distribute" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit from the Proview development environment (close all windows)<br /><br />23) use the Arduino<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; connect to rpi2 via VNC X window <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; restart the runtime: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sudo service pwr restart <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hint: if problems, then to get some diagnostics: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cd <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; source pwr_stop.sh <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rt_ini -i &amp; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ps -ef | grep rt <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; edit ~./.xtt_start to launch the operator station windows:<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; !/bin/bash <br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; source /etc/pwrp_profile <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $pwr_exe/rt_xtt Nodes-Pipoc2-Op &amp; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; save changes and exit <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; double-click the Proview desktop icon <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; in Display2, the analog in value will vary slightly due to noise (unless you have connected a pot or some signal to it) <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; experiment with the Di and Do values <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; finish <br /><br /></p>
<p>&nbsp;</p>
+
<dl><dt>4) Minimize annoyances<strong> <br /><br /></strong> </dt></dl> <dl><dd><dl><dd>Get rid of advertising and the global menu </dd><dd>sudo apt-get remove unity-lens-shopping appmenu-gtk appmenu-gtk3 appmenu-qt </dd><dd>Launch firefox, disable 'global menu integration' extension </dd><dd>Logout, log back in<br /> </dd></dl> </dd></dl> <dl><dd><dl><dd>turn off spyware<strong><br /></strong> </dd></dl> </dd></dl> <dl><dd><dl><dd>launch "System Settings | Privacy" </dd><dd>pick "Search Results," pick "Include online search results: Off" </dd><dd>pick "Diagnostics", uncheck "Send error reports to Canonical", pick "Record Activity: OFF" </dd><dd>sudo add-apt-repository ppa:tualatrix/ppa </dd><dd>sudo add-apt-repository ppa:satyajit-happy/themes </dd><dd>sudo add-apt-repository ppa:indicator-multiload/stable-daily </dd><dd>sudo apt-get update </dd><dd>sudo apt-get install gnome-shell synaptic gconf-editor gnome-tweak-tool ubuntu-tweak nautilus-open-terminal<br /> </dd></dl> </dd></dl>
+
<p>&nbsp;</p>
+
<dl><dd><dl><dd><strong>note: accept defaults for gdm</strong><br /> </dd></dl> </dd></dl>
+
<p>&nbsp;</p>
+
<dl><dd><dl><dd>sudo apt-get install orion-gtk-theme indicator-multiload compizconfig-settings-manager </dd><dd>right click desktop pick "Change Desktop Background", select non-orange and non-purple background </dd><dd>from Dash, launch "System Load Indicator" </dd><dd>launch "System Settings | Ubuntu Tweak" </dd><dd>pick "Tweaks | Miscellaneous",  pick "Overlay scrollbars: Normal" </dd><dd>pick "Tweaks | Theme",          pick "Gtk theme: Orion", "Icon theme: gnome", "Window theme: Radiance" </dd><dd>pick "Tweaks | Desktop Icons",  pick "Show Computer", "Show mounted volumes" </dd><dd>pick "Tweaks | Unity",          adjust "Launcher icon size" to not waste so much screen space </dd><dd>pick "Tweaks | Window",        pick "Window control button...: Right"<br /> </dd></dl> </dd></dl> <dl><dd><dl><dd>from Dash, launch "CompizConfig Settings Manager" </dd><dd>un-check "Snapping Windows" </dd><dd>delete unneeded icons from launcher: the "bag", the libre office stuff, the "U"s, the advertising </dd><dd>add "Terminal" to launcher </dd><dd>sudo apt-get install geany </dd><dd>add "Geany" to launcher<br /> </dd></dl> </dd></dl>
+
<p>&nbsp;</p>
+
<dl><dt>5) <strong>Install prerequisites for 'Proview build from source code'</strong> <br /> </dt></dl>
+
<p>&nbsp;</p>
+
<dl><dd><dl><dd>install some packages (note: openssh-server is not really a prerequisite) </dd><dd>sudo apt-get install make flex libgtk2.0-dev libdb5.1-dev  libdb5.1++-dev libasound2-dev doxygen libmysql++-dev xfonts-100dpi  openssh-server </dd><dd>install java JDK </dd><dd>download tarball from <a class="external free" rel="nofollow" href="http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html">http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html</a> </dd><dd>cd /usr/local </dd><dd>sudo tar -zxvf /home/&lt;userID&gt;/jdk-7u17-linux-x64.tar.gz </dd><dd>sudo chown -R root:root jdk1.7.0_17/ </dd><dd>sudo -s </dd><dd>cd /etc/profile.d </dd><dd>touch proview.build.sh </dd><dd>vi proview.build.sh </dd><dd>insert the following lines: </dd><dd>export jdk=/usr/local/jdk1.7.0_17 </dd><dd>export PATH=$PATH:$jdk/bin </dd><dd>save edited file, exit vi </dd><dd>exit (from sudo)<br /> </dd></dl> </dd></dl>
+
<p>&nbsp;</p>
+
<dl><dt>6) <strong>Install Proview development environment &amp; debug runtime</strong> </dt></dl>
+
<p>&nbsp;</p>
+
<dl><dd><dl><dd>wget -Opwr48_4.8.6-3.2_amd64.deb <a class="external free" rel="nofollow" href="http://sourceforge.net/projects/proview/files/proview/proview_4.8.6-3/ubuntu_12.10/pwr48_4.8.6-3.2_amd64.deb/download">http://sourceforge.net/projects/proview/files/proview/proview_4.8.6-3/ubuntu_12.10/pwr48_4.8.6-3.2_amd64.deb/download</a> </dd><dd>sudo dpkg -i pwr48_4.8.6-3.2_amd64.deb </dd><dd>sudo adduser pwrp sudo </dd><dd>logout </dd><dd>login as pwrp </dd><dd>fix annoyances </dd><dd>from launcher, pick "System Settings | Brightness and Lock" </dd><dd>pick "Lock: OFF" </dd><dd>exit </dd><dd>cd </dd><dd>sudo chown pwrp:pwrp Desktop </dd><dd>install antlr </dd><dd>wget <a class="external free" rel="nofollow" href="http://www.antlr2.org/download/antlr-2.7.7.tar.gz">http://www.antlr2.org/download/antlr-2.7.7.tar.gz</a> </dd><dd>tar -zxvf antlr-2.7.7.tar.gz </dd><dd>geany ~/antlr-2.7.7/lib/cpp/antlr/CharScanner.hpp </dd><dd>add: #include &lt;strings.h&gt;                <ol>
+
<li>include &lt;stdio.h&gt; </li>
+
</ol> </dd><dd>save changes and exit </dd><dd>cd ~/antlr-2.7.7 </dd><dd>./configure </dd><dd>make </dd><dd>sudo make install </dd><dd>change max shared memory </dd><dd>sudo geany /etc/sysctl.conf </dd><dd>insert a line at the end: </dd><dd>kernel.shmmax=67108864 </dd><dd>save changes, exit geany </dd><dd>sudo -s </dd><dd>echo 67108864 &gt; /proc/sys/kernel/shmmax </dd><dd>exit<br /> </dd></dl> </dd></dl>
+
<p>&nbsp;</p>
+
<p>&nbsp;</p>
+
<dl><dt>7)) <strong>Install Proview source</strong><br /> </dt></dl> <dl><dd><dl><dd>login as pwrp </dd><dd>cd </dd><dd>wget -Opwrsrc_4.8.6-3.2.tar.gz <a class="external free" rel="nofollow" href="http://sourceforge.net/projects/proview/files/proview/proview_4.8.6-3/pwrsrc_4.8.6-3.2.tar.gz/download">http://sourceforge.net/projects/proview/files/proview/proview_4.8.6-3/pwrsrc_4.8.6-3.2.tar.gz/download</a> </dd><dd>tar -zxvf pwrsrc_4.8.6-3.2.tar.gz<br /> </dd></dl> </dd></dl> <dl><dt>8) <strong>Bake the raspberry pi</strong><br /> </dt></dl> <dl><dd><dl><dd>get the wheezy image 2013-02-09 via torrent </dd><dd>write to 8 GB Class 10 SD card </dd><dd>boot </dd><dd>using the Raspi-config tool: </dd><dd>expand_rootfs </dd><dd>configure_keyboard </dd><dd>English (US) </dd><dd>English (US) </dd><dd>The default for the keyboard layout </dd><dd>No compose key </dd><dd>Control-Alt-Backspace to terminal X server: No </dd><dd>change_pass </dd><dd>change_locale </dd><dd>en_US.UTF-8 UTF-8  only </dd><dd>default locale for system environment: none </dd><dd>change_timezone: US Central </dd><dd>ssh: Enable </dd><dd>boot_behavior: No </dd><dd>Finish </dd><dd>reboot </dd><dd>login as pi </dd><dd>sudo apt-get update </dd><dd>sudo apt-get dist-upgrade </dd><dd>sudo apt-get install tightvncserver </dd><dd>sudo apt-get install libgtk2.0-dev </dd><dd>sudo rm /etc/ssh/ssh_host_* </dd><dd>sudo dpkg-reconfigure openssh-server </dd><dd>sudo adduser pwrp </dd><dd>use password = 'pwrp' (same as Proview distro default) </dd><dd>sudo adduser pwrp dialout </dd><dd>(this is for arduino access) </dd><dd>sudo visudo </dd><dd>insert following line under the "root ALL=(ALL) ALL" Line: </dd><dd>pwrp ALL=(ALL) ALL </dd><dd>save changes, exit </dd><dd>sudo nano /etc/security/limits.conf </dd><dd>insert the following:
+
<ul>
+
<li> -  rtprio  99 </li>
+
</ul>
+
</dd><dd>save and exit </dd><dd>sudo nano /etc/pam.d/su </dd><dd>uncomment line: </dd><dd>session    required  pam_limits.so </dd><dd>save and exit </dd><dd>(note: this allows the pwr service start to set pwr tasks' realtime priorities) </dd><dd>(note2: also applies to the pwrp tightvncserver X session, since that is launched with su also) </dd><dd>sudo nano /etc/init.d/tightvncserver </dd><dd>insert the following into the new file: <ol>
+
<li>!/bin/sh </li>
+
<li> /etc/init.d/tightvncserver </li>
+
</ol> </dd><dd>VNCUSER='pwrp' </dd><dd>case "$1" in </dd><dd>start) </dd><dd>su $VNCUSER -c '/usr/bin/tightvncserver&nbsp;:0 -geometry 1024x768 -depth 24' </dd><dd>echo "Starting TightVNC Server for $VNCUSER " <dl><dt><dl><dt> </dt></dl> </dt></dl></dd></dl> </dd><dd>stop) </dd><dd>pkill Xtightvnc </dd><dd>echo "TightVNC Server stopped" <dl><dt><dl><dt> </dt></dl> </dt></dl></dd></dl>
+
<ul>
+
<li>) </li>
+
</ul>
+
<div class="mw-content-ltr" dir="ltr" lang="en"><dd>echo "Usage: /etc/init.d/tightvncserver {start|stop}" </dd><dd>exit 1 <dl><dt><dl><dt> </dt></dl> </dt></dl></dd> <dd>esac </dd><dd>exit 0 </dd><dd>save changes, exit nano </dd><dd>sudo chmod 755 /etc/init.d/tightvncserver </dd><dd>sudo update-rc.d tightvncserver defaults </dd><dd>exit (i.e. logout) </dd><dd>login as pwrp </dd><dd>mkdir ~/proview </dd><dd>vncpasswd </dd><dd>enter and confirm </dd><dd>no view-only password </dd><dd>sudo nano /etc/hostname </dd><dd>change to desired node name (e.g. rpi3) </dd><dd>save and exit </dd><dd>cd </dd><dd>ssh-keygen -t rsa </dd><dd>cd ~/.ssh </dd><dd>touch authorized_keys </dd><dd>chmod 600 authorized_keys </dd><dd>choose a static IPv4 address </dd><dd>sudo nano /etc/hosts </dd><dd>update with hostname and ip </dd><dd>add any other nodes which will participate in the distributed control system </dd><dd>sudo nano /etc/network/interfaces </dd><dd>change eth0 to (substitute actual network values): </dd><dd>iface eth0 inet static </dd><dd>address 192.168.0.1 </dd><dd>netmask 255.255.255.0 </dd><dd>network 192.168.0.0 </dd><dd>broadcast 192.168.0.255 </dd><dd>gateway 192.168.0.254 </dd><dd>save changes and exit </dd><dd>sudo shutdown -r now </dd><dd>login to X desktop using vnc client  (to verify X is working)<br /> </dd> <dl><dt>9) <strong>Configure ssh access from dev to rpi</strong> <dl><dd>logon to dev as pwrp </dd></dl></dt><dd>do this only once: </dd><dd>ssh-keygen -t rsa </dd><dd>sudo geany /etc/hosts </dd><dd>insert line for raspberry pi machine(s) and any other hosts in the distributed system </dd><dd>save and exit </dd><dd>scp /home/pwrp/.ssh/id_rsa.pub rpi3:/home/pwrp/.ssh/authorized_keys<br /> </dd></dl> <dl><dt>10) <strong>Install cross platform dev tools on dev</strong><br /> </dt></dl> <dl><dd><dl><dd>logon to dev as pwrp </dd><dd>sudo apt-get install ia32-libs git </dd><dd>cd </dd><dd>mkdir rpitools </dd><dd>cd rpitools </dd><dd>sudo git clone <a class="external free" rel="nofollow" href="git://github.com/raspberrypi/tools.git">git://github.com/raspberrypi/tools.git</a> </dd><dd>create symbolic links to compilers and archiver as a workaround on rather long fully qualified names - </dd><dd>(Proview merge tool has a hardcoded alloc of 80 chars max for the FQ name of each of these tools): </dd><dd>sudo -s </dd><dd>ln -s  /home/pwrp/rpitools/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc  /usr/bin/arm-gcc </dd><dd>ln -s  /home/pwrp/rpitools/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++  /usr/bin/arm-g++ </dd><dd>ln -s /home/pwrp/rpitools/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-ar  /usr/bin/arm-ar </dd><dd>exit<br /> </dd></dl> </dd></dl> <dl><dt>11) <strong>Get a copy of the rpi headers and libraries to compile and link against, respectively</strong><br /> </dt></dl> <dl><dd><dl><dd>logon to dev as pwrp </dd><dd>rsync      -avz -e ssh pwrp@rpi3:/usr/include                /home/pwrp/rpi </dd><dd>sudo rsync -avz -e ssh pwrp@rpi3:/usr/lib/arm-linux-gnueabihf /usr/lib </dd><dd>sudo rsync -avz -e ssh pwrp@rpi3:/lib/arm-linux-gnueabihf    /lib  <br /> </dd></dl> </dd></dl> <dl><dt>12) <strong>Setup the build environment</strong><br /> </dt></dl> <dl><dd><dl><dd>logon to dev as pwrp </dd><dd>cd </dd><dd>geany ~/.envarm </dd><dd>insert the following into this new file: <ol>
+
<li> .envarm: </li>
+
<li> env for Proview development for raspberry pi </li>
+
<li> </li>
+
<li> </li>
+
</ol> </dd><dd>export pwre_cc=/usr/bin/arm-gcc </dd><dd>export pwre_cxx=/usr/bin/arm-g++ </dd><dd>export pwre_ar=/usr/bin/arm-ar </dd><dd>export pwr_host_exe=/usr/pwr48/os_linux/hw_x86_64/exp/exe </dd><dd>export pwre_host_exe=/usr/pwr48/os_linux/hw_x86_64/exp/exe </dd><dd>export pwre_env_db=/home/pwrp/pwre_env_db </dd><dd>export pwre_bin=/home/pwrp/pwrsrc_4.8.6-3/src/tools/pwre/src/os_linux </dd><dd>export pwre_dir_symbols=$pwre_bin/dir_symbols.mk </dd><dd>export PATH=$PATH:/home/pwrp/rpitools/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin </dd><dd>source $pwre_bin/pwre_function </dd><dd>save and exit </dd><dd>geany ~/.bashrc </dd><dd>insert at end of file: </dd><dd>source ~/.envarm </dd><dd>save and exit </dd><dd>close all Terminal(s) </dd><dd>launch Terminal </dd><dd>cd </dd><dd>mkdir pwrrls_4.8.6-3 </dd><dd>define a PWRE environment for the build: </dd><dd>pwre add v486_arm </dd><dd>-- </dd><dd>-- Environment  &nbsp;: v486_arm </dd><dd>-- Module.........: rt </dd><dd>-- Source root....: /home/pwrp/pwrsrc_4.8.6-3/src </dd><dd>-- Import root....: /usr/pwr48/os_linux/hw_x86_64 </dd><dd>-- Build root.....: /home/pwrp/pwrrls_4.8.6-3 </dd><dd>-- Build type.....: dbg </dd><dd>-- OS.............: linux </dd><dd>-- Hardware.......: arm </dd><dd>-- Description....: X48arm </dd><dd>-- </dd><dd>himBH<br /> </dd></dl> </dd></dl> <dl><dt>13) <strong>Fixup Proview config script</strong><br /> </dt></dl> <dl><dd><dl><dd>logon to dev as pwrp </dd><dd>cd /home/pwrp/pwrsrc_4.8.6-3/src/tools/pwre/src/os_linux </dd><dd>cp pwre_configure.sh pwre_configure.sh.org </dd><dd>cd </dd><dd>geany /home/pwrp/pwrsrc_4.8.6-3/src/tools/pwre/src/os_linux/pwre_configure.sh </dd><dd>insert after line 311: </dd><dd>pwre_config_check_lib gtk      GTK      gtk gtk 0 "/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so" </dd><dd>pwre_config_check_include gtk  GTK  1 "/home/pwrp/rpi/include/gtk-2.0/gtk/gtk.h" </dd><dd>as a sanity check, the code block should look like: </dd><dd>if test $pwre_hw == "hw_arm"; then </dd><dd> </dd><dd>pwre_config_check_lib gtk      GTK  gtk gtk 0 "/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so" </dd><dd>pwre_config_check_include gtk  GTK  1 "/home/pwrp/rpi/include/gtk-2.0/gtk/gtk.h" </dd><dd> </dd><dd> </dd><dd>pwre_config_check_include jni  JNI  1 $jdk/include/jni.h </dd><dd>pwre_config_check_include jni  JNI  0 $jdk/include/linux/jni_md.h </dd><dd>save and exit </dd><dd>pwre init v486_arm </dd><dd>pwre configure </dd><dd>need to figure out some paths, will use the output from "pwre configure" to help, </dd><dd>this is a little tedious: </dd><dd>geany /home/pwrp/pwrrls_4.8.6-3/pwre_arm_linux.cnf </dd><dd>find line "export pwre_conf_libgtk=" </dd><dd>note the embedded command, e.g. "pkg-config --libs gtk+-2.0", designate as "cmd1" </dd><dd>find line "export pwre_conf_incdirgtk=" </dd><dd>note the embedded command, e.g. "pkg-config --cflags gtk+-2.0", designate as "cmd2". the commands will now be run on the rpi: </dd><dd>ssh rpi3 </dd><dd>execute cmd1: </dd><dd>pkg-config --libs gtk+-2.0 </dd><dd>save the output in a new temp file, e.g. in geany </dd><dd>execute cmd2: </dd><dd>pkg-config --cflags gtk+-2.0 </dd><dd>save the output to the temp file </dd><dd>exit from ssh session </dd><dd>in the temp file, replace "usr/include" with "home/pwrp/rpi/include" </dd><dd>in geany, open /home/pwrp/pwrsrc_4.8.6-3/src/tools/pwre/src/os_linux/pwre_configure.sh </dd><dd>find line "export pwre_conf_libgtk=" </dd><dd>hard-code the contents of that assign to the output of cmd1, e.g.: </dd><dd>echo "export pwre_conf_libgtk=\"-lgtk-x11-2.0 -lgdk-x11-2.0  -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0  -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0\""  &gt;&gt; $cfile </dd><dd>find line "export pwre_conf_incdirgtk=" </dd><dd>hard-code the contents of that assign to the edited output of cmd2, e.g.: </dd><dd>echo "export pwre_conf_incdirgtk=\"-pthread  -I/home/pwrp/rpi/include/gtk-2.0  -I/usr/lib/arm-linux-gnueabihf/gtk-2.0/include  -I/home/pwrp/rpi/include/atk-1.0 -I/home/pwrp/rpi/include/cairo  -I/home/pwrp/rpi/include/gdk-pixbuf-2.0  -I/home/pwrp/rpi/include/pango-1.0  -I/home/pwrp/rpi/include/gio-unix-2.0/ -I/home/pwrp/rpi/include/glib-2.0  -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include  -I/home/pwrp/rpi/include/pixman-1 -I/home/pwrp/rpi/include/freetype2  -I/home/pwrp/rpi/include/libpng12 \"" &gt;&gt; $cfile </dd><dd>find line "echo "export pwre_conf_lib=\"-lpthread -lm -lrt -lcrypt\"" &gt;&gt; $cfile" </dd><dd>add X11 and db5.1 libraries, e.g.: </dd><dd>echo "export pwre_conf_lib=\"-lpthread -lm -lrt -lcrypt -lX11 -ldb-5.1\"" &gt;&gt; $cfile </dd><dd>find line "echo "export pwre_conf_libdir=\"$conf_libdir\"" &gt;&gt; $cfile" </dd><dd>hard-code the assignment to: </dd><dd>echo "export pwre_conf_libdir=\"-L/usr/lib/arm-linux-gnueabihf  -Wl,-rpath=/usr/lib/arm-linux-gnueabihf  -Wl,-rpath=/lib/arm-linux-gnueabihf\"" &gt;&gt; $cfile </dd><dd>find line "echo "export pwre_conf_incdir=\"$conf_incdir\"" &gt;&gt; $cfile" </dd><dd>hard-code the assignment to: </dd><dd>echo "export pwre_conf_incdir=\"-I /home/pwrp/rpi/include  -I/usr/local/jdk1.7.0_17/include  -I/usr/local/jdk1.7.0_17/include/linux\"" &gt;&gt; $cfile </dd><dd>save the edited file </dd><dd>cd </dd><dd>mkdir pwrCustom </dd><dd>save the edited file (again) as ~/pwrCustom/pwre_configure.sh.custom </dd><dd>exit geany<br /> </dd></dl> </dd></dl> <dl><dt>14) <strong>Fixup Proview source tree</strong><br /> </dt></dl> <dl><dd><dl><dd>fix service start script: </dd><dd>cp /home/pwrp/pwrsrc_4.8.6-3/src/tools/pkg/deb_armel/pwrrt/pwr ~/pwrCustom </dd><dd>geany  ~/pwrCustom/pwr </dd><dd>for each of the functions: pwr_start, pwr_stop, pwr_reload, pwr_kill: </dd><dd>replace the "whoami" conditional test from "root" to "pwrp" </dd><dd>if using an arduino uno, add the following line within the create_wrapper function, after the umask command: </dd><dd>echo "stty -F /dev/ttyACM0  10:0:8be:0:3:1c:7f:15:1:0:1:0:11:13:1a:0:12:f:17:16:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0"  &gt;&gt; $wrapper </dd><dd>save and exit </dd><dd>fix code error: </dd><dd>geany /home/pwrp/pwrsrc_4.8.6-3/sev/lib/sev/src/sev_db.cpp </dd><dd>add open curly brace on line 52: </dd><dd>else if ( type == sev_eDbType_Sqlite) { </dd><dd>add close curly brace after line 58. </dd><dd>code block should now look like: </dd><dd>if ( type == sev_eDbType_Mysql) { <ol>
+
<li>if defined PWRE_CONF_MYSQL </li>
+
</ol> </dd><dd>return sev_dbms::open_database(); <ol>
+
<li>else </li>
+
</ol> </dd><dd>printf( "** Release is not built with mysql\n"); </dd><dd>return 0; <ol>
+
<li>endif </li>
+
</ol> </dd><dd>} </dd><dd>else if ( type == sev_eDbType_Sqlite) { <ol>
+
<li>if defined PWRE_CONF_SQLITE3 </li>
+
</ol> </dd><dd>return sev_dbsqlite::open_database(); <ol>
+
<li>else </li>
+
</ol> </dd><dd>printf( "** Release is not built with sqlite3\n"); </dd><dd>return 0; <ol>
+
<li>endif </li>
+
</ol> </dd><dd>} </dd><dd>else </dd><dd>return 0; </dd><dd>} </dd><dd>end example code block </dd><dd>save the edited file as: </dd><dd>~/pwrCustom/sev_db.cpp </dd><dd>exit geany </dd><dd>edit the build package script, it will not create a *.deb file as-is: </dd><dd>geany ~/pwrsrc_4.8.6-3/src/tools/pkg/deb_armel/pwrrt/build.sh </dd><dd>"# Create directories" section, insert line: </dd><dd>mkdir -p $pkgroot/usr/pwrp/adm/db </dd><dd>uncomment lines which copy op  to cnf </dd><dd>uncomment lines which copy user to cnf </dd><dd>add following lines to "# Copy user to cnf" section: </dd><dd>cp $pwre_broot/$pwre_target/exp/inc/pwr_arduino_uno.ino $pkgroot/usr/pwrrt/cnf/user </dd><dd>cp $pwre_sroot/tools/pkg/deb/adm/proview_icon.png      $pkgroot/usr/pwrrt/cnf/user </dd><dd>cp /home/pwrp/pwrCustom/Proview.desktop                $pkgroot/usr/pwrrt/cnf/user </dd><dd>after the "# Copy user to cnf" section, insert the following lines: <ol>
+
<li> Copy user security data </li>
+
</ol> </dd><dd>mkdir -p $pkgroot/usr/pwrp/adm/db </dd><dd>cp $pwre_sroot/tools/pkg/deb/adm/pwr_user2.dat $pkgroot/usr/pwrp/adm/db </dd><dd>comment out line "dpkg-buildpackage -aarmel -b" </dd><dd>add following lines: </dd><dd>packagename=pwrrt-$version.tar.gz </dd><dd>tar -czf ../$packagename * </dd><dd>save the edited file as: </dd><dd>~/pwrCustom/build.sh </dd><dd>exit geany </dd><dd>geany ~/pwrCustom/fixPwrSource.sh </dd><dd>insert the following lines into the new file:      <ol>
+
<li>!/bin/bash </li>
+
<li> </li>
+
<li> fix some missing dependencies </li>
+
<li> </li>
+
</ol> </dd><dd>cp /home/pwrp/pwrsrc_4.8.6-3/nmps/lib/nmps/src/nmps.h      /home/pwrp/pwrsrc_4.8.6-3/src/exe/rt_sim/src/ </dd><dd>cp /home/pwrp/pwrsrc_4.8.6-3/src/exe/rt_elog/src/rt_elog.h /home/pwrp/pwrsrc_4.8.6-3/xtt/lib/xtt/src/ </dd><dd>cp /home/pwrp/pwrsrc_4.8.6-3/src/exe/rt_elog/src/rt_elog.h /home/pwrp/pwrsrc_4.8.6-3/xtt/lib/xtt/gtk/ </dd><dd>cp /home/pwrp/pwrsrc_4.8.6-3/src/exe/rt_elog/src/rt_elog.h /home/pwrp/pwrsrc_4.8.6-3/src/exe/rt_elog_dump/src </dd><dd>cp /usr/include/db.h                                      /home/pwrp/pwrsrc_4.8.6-3/src/exe/rt_elog_dump/src </dd><dd>cp /usr/include/db.h                                      /home/pwrp/pwrsrc_4.8.6-3/xtt/lib/xtt/src </dd><dd>cp /usr/include/db.h                                      /home/pwrp/pwrsrc_4.8.6-3/xtt/lib/xtt/gtk </dd><dd> </dd><dd>mkdir /home/pwrp/pwrsrc_4.8.6-3/wb/lib/wb/src/antlr </dd><dd>cp /home/pwrp/antlr-2.7.7/lib/cpp/antlr/*                  /home/pwrp/pwrsrc_4.8.6-3/wb/lib/wb/src/antlr </dd><dd> <ol>
+
<li> fix code error </li>
+
<li> </li>
+
</ol> </dd><dd>cp ~/pwrCustom/sev_db.cpp                                  /home/pwrp/pwrsrc_4.8.6-3/sev/lib/sev/src/sev_db.cpp </dd><dd> <ol>
+
<li> copy build script which creates just a tarball, not a debian package, and includes some custom rpi/arduino specific stuff </li>
+
<li> </li>
+
</ol> </dd><dd>cp ~/pwrCustom/build.sh                                    /home/pwrp/pwrsrc_4.8.6-3/src/tools/pkg/deb_armel/pwrrt </dd><dd> <ol>
+
<li> copy custom pwre_configure.sh </li>
+
<li> </li>
+
</ol> </dd><dd>cp /home/pwrp/pwrCustom/pwre_configure.sh.custom            /home/pwrp/pwrsrc_4.8.6-3/src/tools/pwre/src/os_linux/pwre_configure.sh </dd><dd> <ol>
+
<li> copy custom pwr service control script </li>
+
<li> </li>
+
</ol> </dd><dd>cp ~/pwrCustom/pwr                                        /home/pwrp/pwrsrc_4.8.6-3/src/tools/pkg/deb_armel/pwrrt/ </dd><dd>save and exit </dd><dd>chmod 755 ~/pwrCustom/fixPwrSource.sh </dd><dd>geany ~/pwrCustom/Proview.desktop </dd><dd>insert the following lines into the new file: </dd><dd>[Desktop Entry] </dd><dd>Name=Proview </dd><dd>Comment=SCADA Operator Station </dd><dd>Exec=/home/pwrp/.xtt_start </dd><dd>Icon=proview_icon </dd><dd>Terminal=false </dd><dd>Type=Application </dd><dd>MimeType=text/plain </dd><dd>Categories=GTK </dd><dd>save and exit <br /> </dd></dl> </dd></dl> <dl><dt>15) <strong>Final cleanup</strong><br /> </dt></dl> <dl><dd><dl><dd>logon to dev as pwrp </dd><dd>delete /home/pwrp/pwrsrc_4.8.6-3 (and all contents) </dd><dd>delete everything from /home/pwrp/pwrrls_4.8.6-3, leaving the folder </dd><dd>unpack the source (again): </dd><dd>cd </dd><dd>tar -zxvf pwrsrc_4.8.6-3.2.tar.gz  <br /> </dd></dl> </dd></dl> <dl><dt>16) <strong>Build Proview for raspberry pi</strong><br /> </dt></dl> <dl><dd><dl><dd>logon to dev as pwrp </dd><dd>cd </dd><dd>pwre list </dd><dd>pwre init v486_arm </dd><dd>./pwrCustom/fixPwrSource.sh </dd><dd>pwre create_all_modules </dd><dd>pwre import rt </dd><dd>pwre import java </dd><dd>pwre import op </dd><dd>pwre configure </dd><dd>./pwrCustom/fixPwrSource.sh </dd><dd>pwre ebuild rt </dd><dd>pwre ebuild op </dd><dd>pwre build tools/pkg deb_armel </dd><dd>note: to enable pkg rebuild (when make says nothing to do): </dd><dd>touch /home/pwrp/pwrsrc_4.8.6-3/src/tools/pkg/deb_armel/pwrrt/control<br /> </dd></dl> </dd></dl>
+
<p>&nbsp;</p>
+
<dl><dt>17) <strong>Install Proview runtime and op station on Raspberry Pi</strong><br /> </dt></dl> <dl><dd><dl><dd>logon to dev as pwrp </dd><dd>geany ~/pwrCustom/installRpi.sh </dd><dd>insert the following lines into the new file: <ol>
+
<li>!/bin/bash </li>
+
<li> </li>
+
<li> install Proview package on Raspberry Pi </li>
+
<li> </li>
+
<li> unpack the tarball </li>
+
<li> </li>
+
</ol> </dd><dd>cd /home/pwrp/proview </dd><dd>tar -zxvf pwrrt-.tar.gz </dd><dd>chown -R pwrp:pwrp /home/pwrp/proview<br /> </dd></dl> </dd></dl> <dl><dd><dl><dd> <ol>
+
<li> configure target dirs, install the archive </li>
+
<li> </li>
+
</ol> </dd><dd>install -d -o pwrp -g pwrp /usr/pwrrt </dd><dd>install -d -o pwrp -g pwrp /usr/pwrrt/cnf </dd><dd>install -d -o pwrp -g pwrp /usr/pwrrt/cnf/op </dd><dd>install -d -o pwrp -g pwrp /usr/pwrrt/cnf/user </dd><dd>install -d -o pwrp -g pwrp /usr/pwrrt/exe </dd><dd>install -d -o pwrp -g pwrp /usr/pwrrt/lib </dd><dd>install -d -o pwrp -g pwrp /usr/pwrrt/load </dd><dd> </dd><dd>install -d -o pwrp -g pwrp /pwrp </dd><dd>install -d -o pwrp -g pwrp /pwrp/arm_linux </dd><dd>install -d -o pwrp -g pwrp /pwrp/arm_linux/exe </dd><dd>install -d -o pwrp -g pwrp /pwrp/arm_linux/lib </dd><dd>install -d -o pwrp -g pwrp /pwrp/arm_linux/lis </dd><dd>install -d -o pwrp -g pwrp /pwrp/arm_linux/obj </dd><dd> </dd><dd>install -d -o pwrp -g pwrp /pwrp/common </dd><dd>install -d -o pwrp -g pwrp /pwrp/common/db </dd><dd>install -d -o pwrp -g pwrp /pwrp/common/inc </dd><dd>install -d -o pwrp -g pwrp /pwrp/common/load </dd><dd>install -d -o pwrp -g pwrp /pwrp/common/log </dd><dd>install -d -o pwrp -g pwrp /pwrp/common/loghist </dd><dd>install -d -o pwrp -g pwrp /pwrp/common/web </dd><dd> </dd><dd>install -d                /usr/pwrp </dd><dd>install -d -o pwrp -g pwrp /usr/pwrp/adm </dd><dd>install -d -o pwrp -g pwrp /usr/pwrp/adm/db </dd><dd> </dd><dd>install -d  /usr/share/doc/pwrrt </dd><dd> </dd><dd>install -D /home/pwrp/proview/etc/*                                /etc </dd><dd>install -D /home/pwrp/proview/etc/init.d/*                        /etc/init.d </dd><dd>install -D -m 644 /home/pwrp/proview/usr/pwrrt/cnf/proview.cnf    /etc </dd><dd> </dd><dd>install -D -o pwrp -g pwrp /home/pwrp/proview/usr/pwrrt/*          /usr/pwrrt </dd><dd>install -D -o pwrp -g pwrp /home/pwrp/proview/usr/pwrrt/cnf/*      /usr/pwrrt/cnf </dd><dd>install -D -o pwrp -g pwrp /home/pwrp/proview/usr/pwrrt/exe/*      /usr/pwrrt/exe </dd><dd>install -D -o pwrp -g pwrp /home/pwrp/proview/usr/pwrrt/lib/*      /usr/pwrrt/lib </dd><dd>install -D -o pwrp -g pwrp /home/pwrp/proview/usr/pwrrt/load/*    /usr/pwrrt/load </dd><dd> </dd><dd>install -D -o pwrp -g pwrp /home/pwrp/proview/usr/pwrrt/cnf/op/.??*  /usr/pwrrt/cnf/op </dd><dd>install -D -o pwrp -g pwrp /home/pwrp/proview/usr/pwrrt/cnf/user/.??* /usr/pwrrt/cnf/user </dd><dd> </dd><dd>install -D -o pwrp -g pwrp /home/pwrp/proview/usr/pwrp/adm/db/*    /usr/pwrp/adm/db </dd><dd> </dd><dd>install -D -m 644 /home/pwrp/proview/usr/share/doc/pwrrt/*        /usr/share/doc/pwrrt </dd><dd>install -D -m 644 /home/pwrp/proview/usr/share/man/man1/*          /usr/share/man/man1 </dd><dd> </dd><dd>install -D -o pwrp -g pwrp -m 775 /home/pwrp/proview/usr/pwrrt/cnf/user/.??* /home/pwrp </dd><dd>install -D -o pwrp -g pwrp -m 775 /home/pwrp/proview/usr/pwrrt/cnf/user/*    /home/pwrp </dd><dd> </dd><dd>install -D                -m 644 /home/pwrp/proview/usr/pwrrt/cnf/user/proview_icon.png  /usr/share/pixmaps </dd><dd>install -D -o pwrp -g pwrp -m 644 /home/pwrp/proview/usr/pwrrt/cnf/user/Proview.desktop  /home/pwrp/Desktop </dd><dd> </dd><dd>if [ -f /home/pwrp/pwr_arduino_uno.ino ] </dd><dd>then </dd><dd>install -d -o pwrp -g pwrp /home/pwrp/sketchbook </dd><dd>install -d -o pwrp -g pwrp /home/pwrp/sketchbook/pwr_arduino_uno </dd><dd>mv /home/pwrp/pwr_arduino_uno.ino /home/pwrp/sketchbook/pwr_arduino_uno </dd><dd>chown pwrp:pwrp /home/pwrp/sketchbook/pwr_arduino_uno/pwr_arduino_uno.ino </dd><dd>fi </dd><dd>save and exit </dd><dd>scp /home/pwrp/pwrrls_4.8.6-3/os_linux/hw_arm/bld/pkg/pwrrt-.tar.gz pwrp@rpi3:~/proview </dd><dd>scp /home/pwrp/pwrCustom/installRpi.sh pwrp@rpi3:~/ </dd><dd>ssh rpi3 </dd><dd>cd </dd><dd>chmod 775 installRpi.sh </dd><dd>sudo ./installRpi.sh </dd><dd>sudo update-rc.d pwr defaults </dd><dd>exit (from ssh session) </dd><dd>18) create proof-of-concept Proview project </dd><dd>logon to dev as pwrp </dd><dd> </dd><dd>one-time fix so plc prog will build: </dd><dd>mkdir /home/pwrp/pwrrls_4.8.6-3/os_linux/hw_x86_64 </dd><dd>mkdir /home/pwrp/pwrrls_4.8.6-3/os_linux/hw_x86_64/exp </dd><dd>mkdir /home/pwrp/pwrrls_4.8.6-3/os_linux/hw_x86_64/exp/exe </dd><dd>cp ~/pwrsrc_4.8.6-3/src/exp/com/src/os_linux/pwrp_env.sh /home/pwrp/pwrrls_4.8.6-3/os_linux/hw_x86_64/exp/exe </dd><dd>end one time fix </dd><dd> </dd><dd>on the desktop, double-click Proview V4.8 </dd><dd>accept (and respect) the license terms </dd><dd>using "PwR Project List": </dd><dd>enter edit mode </dd><dd>add a BaseReg object, child to Bases </dd><dd>open the new object, set attributes: </dd><dd>ObjectName: BaseV48arm </dd><dd>Version  &nbsp;: X48arm </dd><dd>Path    &nbsp;: /home/pwrp/pwrrls_4.8.6-3 </dd><dd>close the object </dd><dd>save changes </dd><dd>note: the new base define is reflected as a new line in /usr/pwrp/adm/db/pwr_projectlist.dat </dd><dd>the binding to the release build's path is via the "X48arm" token, which will be used below </dd><dd>add a $Hier object, sibling to Bases </dd><dd>set ObjectName attribute = "testProjects" </dd><dd>add a ProjectReg object, child of testProjects </dd><dd>open new object, set attributes: </dd><dd>ObjectName&nbsp;: piPOC </dd><dd>Description: Raspberry Pi Proof of Concept </dd><dd>Version  &nbsp;: X48arm </dd><dd>(note: Version attr binds the project to the BaseV48arm) </dd><dd>close the object </dd><dd>save changes </dd><dd>Confirm Actions: Yes </dd><dd>note: the new project is reflected as a new directory tree at /usr/local/pwrp/pipoc </dd><dd>leave edit mode </dd><dd>right-click piPOC, pick Open Project </dd><dd>using "Configure Directory Volume": </dd><dd>enter "Production QBUS id" = 5      (this is arbitrary, but better than using defaults, for troubleshooting) </dd><dd>click Next </dd><dd>click Next </dd><dd>click No </dd><dd>click Next </dd><dd>click Next </dd><dd>click Skip this node </dd><dd>click Next </dd><dd>click Yes </dd><dd>using "Configure Root Volume": </dd><dd>pick Operator Station </dd><dd>click Next </dd><dd>click Next </dd><dd>click Next </dd><dd>using "PwR VolPipoc, pwrp on pipoc": </dd><dd>from the drop-down menu, pick "File | Volume Attributes..." </dd><dd>change the "OperatingSystem" attribute to "CustomBuild" </dd><dd>close the object </dd><dd>save changes </dd><dd>close the window </dd><dd>using "PwR Directory, pwrp on pipoc": </dd><dd>enter edit mode </dd><dd> </dd><dd>open pipoc object, set attributes: </dd><dd>NodeName      &nbsp;: rpi3        (i.e. the hostname of the target rpi) </dd><dd>OperatingSystem: CustomBuild </dd><dd>BootNode:    &nbsp;: rpi3 </dd><dd>Address      &nbsp;: 192.168.0.1 (i.e. the IPv4 address of the rpi) </dd><dd>close the object </dd><dd> </dd><dd>add a CustomBuild object as child to pipoc </dd><dd>open the new object, set attributes: </dd><dd>ObjectName    &nbsp;: build </dd><dd>cc            &nbsp;: /usr/bin/arm-gcc </dd><dd>cxx          &nbsp;: /usr/bin/arm-g++ </dd><dd>ar            &nbsp;: /usr/bin/arm-ar </dd><dd>OperatingSystem: Linux on ARM </dd><dd>Platform      &nbsp;: arm_linux </dd><dd>Release      &nbsp;: X48arm </dd><dd>close the object </dd><dd> </dd><dd>save changes </dd><dd>leave edit mode </dd><dd>right-click "VolPipoc", pick Open Volume </dd><dd>using "PwR VolPipoc, pwrp on pipoc": </dd><dd>enter edit mode </dd><dd> </dd><dd>in the right pane, delete the Maintenance object </dd><dd>in the right pane, delete the OpDefault object </dd><dd>in the right pane, delete the WebHandler object </dd><dd>in the right pane, delete the WebBrowser object </dd><dd> </dd><dd>add a XttGraph object as child to Op </dd><dd>set ObjectName to Display1 </dd><dd> </dd><dd>open Op object, set attributes: </dd><dd>UserName    &nbsp;: pwrp </dd><dd>FastAvail[0] &nbsp;: Nodes-Pipoc-Op-Display1 </dd><dd>close the object </dd><dd> </dd><dd>in the center pane, add a $PlantHier object </dd><dd>set ObjectName to Bakery </dd><dd> </dd><dd>add a $PlantHier, child to Bakery </dd><dd>set ObjectName to Signals </dd><dd> </dd><dd>add two Iv objects as children of Signals </dd><dd>set ObjectName's to Iin and Iout, respectively </dd><dd> </dd><dd>add a PlcPgm object as child of Bakery </dd><dd>set ObjectName to Plc </dd><dd> </dd><dd>save changes </dd><dd>leave edit mode </dd><dd> </dd><dd>right-click Bakery-Plc, pick Open Program </dd><dd>using "Bakery-Plc" </dd><dd>enter edit mode </dd><dd> </dd><dd>add a GetIv object </dd><dd>add a StoIv object </dd><dd> </dd><dd>connect the GetIv output to the StoIv input </dd><dd> </dd><dd>from drop-down menu, pick "View | Palette | Plant". Using the right-pane </dd><dd>plant hierarchy: </dd><dd>Connect (bind) Signals-Iin to GetIv </dd><dd>Connect (bind) Signals-Iout to StoIv </dd><dd> </dd><dd>save changes </dd><dd>leave edit mode </dd><dd>close the window </dd><dd>using "PwR VolPipoc, pwrp on pipoc": </dd><dd>right click Nodes-Op-Display1 </dd><dd>pick "Open Ge..." </dd><dd>using "PwR Ge display1" </dd><dd> </dd><dd>add two ValueInputMedium objects </dd><dd> </dd><dd>record the coordinates for the area to display, i.e. the area which contains the two objects </dd><dd>from the drop-down menu, pick "File | Graph Attributes" </dd><dd>enter the x &amp; y coordinates for this display area </dd><dd>close the object </dd><dd> </dd><dd>double-click one of the ValueInputMedium objects, set attribute: </dd><dd>Value.Format    &nbsp;:&nbsp;%6d </dd><dd>close object </dd><dd> </dd><dd>repeat for the other Input object </dd><dd> </dd><dd>View "Plant Hierarchy", select Bakery-Signals-Iin </dd><dd>press Ctrl key, double-click on first ValInpMed object (binds signal to object) </dd><dd> </dd><dd>repeat, bind Iout to other display object </dd><dd> </dd><dd>pick "File | Save" </dd><dd>close the window </dd><dd>using "PwR VolPipoc, pwrp on pipoc": </dd><dd>from drop-down menu, pick "Functions | Build Node" </dd><dd>example output as shown in "Proview Development Console": </dd><dd>Setting base /usr/pwr48 </dd><dd>Open pipoc </dd><dd>args: pipoc pwrp pwrp </dd><dd>-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ </dd><dd>Welcome to </dd><dd>pipoc          V4.8    Raspberry Pi Proof of Concept </dd><dd> </dd><dd>Revision history </dd><dd>2013-03-09      pwrp    Project created </dd><dd>-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ </dd><dd>-- Processing line: 50 </dd><dd>-- Building volume directory </dd><dd>-- Opening volume 'VolPipoc' </dd><dd>Berkeley DB 5.1.29: (October 25, 2011) </dd><dd>info get: 0 </dd><dd>-- Build node pipoc </dd><dd>-- Plc window generated            Bakery-Plc-W </dd><dd>/home/pwrp/pwrrls_4.8.6-3 is baseroot </dd><dd>Setting base /home/pwrp/pwrrls_4.8.6-3 </dd><dd>-- Cross compilation ARM_LINUX </dd><dd>-- Plc window compiled for arm_linux optimized -O3 Bakery-Plc-W </dd><dd>/home/pwrp/pwrrls_4.8.6-3 is baseroot </dd><dd>Setting base /home/pwrp/pwrrls_4.8.6-3 </dd><dd>-- Cross compilation ARM_LINUX </dd><dd>-- Plc plcpgm compiled for arm_linux optimized -O3 Bakery-Plc </dd><dd>-- Web startpage generated $pwrp_web/index.html </dd><dd>/home/pwrp/pwrrls_4.8.6-3 is baseroot </dd><dd>Setting base /home/pwrp/pwrrls_4.8.6-3 </dd><dd>-- Cross compilation ARM_LINUX </dd><dd>-- Building archive for volume: 000_001_001_001 </dd><dd>-- Archive built for volume: 000_001_001_001 </dd><dd>-- Working with load file volume 'VolPipoc'... </dd><dd>-- Open file... </dd><dd>-- Successfully created load file for volume 'VolPipoc' </dd><dd>-- 26 objects with a total body size of 26392 bytes were written to new file. </dd><dd>-- Creating bootfile for node rpi3 </dd><dd>-- Plc thread generated priority 22, scantime  0.10000 s, 1 plcpgm's </dd><dd>/home/pwrp/pwrrls_4.8.6-3 is baseroot </dd><dd>Setting base /home/pwrp/pwrrls_4.8.6-3 </dd><dd>-- Cross compilation ARM_LINUX </dd><dd>-- Plc process compiled for arm_linux optimized -O3 Dummy </dd><dd>/home/pwrp/pwrrls_4.8.6-3 is baseroot </dd><dd>Setting base /home/pwrp/pwrrls_4.8.6-3 </dd><dd>-- Cross compilation ARM_LINUX </dd><dd>-- Plc program linked for arm_linux  node plc_rpi3_0005_plc </dd><dd>-- Build node pipoc </dd><dd>end example output </dd><dd>from drop-down menu, pick "Functions | Distribute" </dd><dd>using "Distributor": </dd><dd>select rpi3 </dd><dd>from the drop-down menu, pick "Functions | Distribute" </dd><dd>example output in "Proview Development Console": </dd><dd>pwrp_pkg_rpi3_0001.tgz                        100% 1705KB  1.7MB/s  00:00 </dd><dd>-- No package installed </dd><dd>-- Installing package pwrp_pkg_rpi3_0001.tgz </dd><dd>-- Unpack package pwrp_pkg_rpi3_0001.tgz </dd><dd>-- Move files to target directories </dd><dd>sudo: no tty present and no askpass program specified </dd><dd>end example output </dd><dd>there will be some warnings in Workbench Messages re missing files, ignore these </dd><dd>exit from the Proview development environment (close all windows in reverse order of opening them) </dd><dd>19) run the test project </dd><dd>connect to rpi3 via vnc client </dd><dd> </dd><dd>nano ~/.xtt_start </dd><dd>edit the rt_xtt invoke to launch the operator station: </dd><dd>$pwr_exe/rt_xtt Nodes-Pipoc-Op &amp; </dd><dd>save changes and exit </dd><dd> </dd><dd>sudo nano /etc/proview.cnf </dd><dd>edit the qcomBusId to 5 </dd><dd>save changes and exit </dd><dd> </dd><dd>sudo shutdown -r now </dd><dd>(so the pwr service will pick up the new bus ID) </dd><dd>connect to rpi3 via vnc client </dd><dd> </dd><dd>start the op station: </dd><dd>double-click the Proview desktop icon </dd><dd> </dd><dd>launch Display1 </dd><dd>verify manually entering a value in Iin is copied to Iout </dd><dd>verify manually entering a value in Iout is overwritten by value in Iin </dd><dd>verify status is green </dd><dd> </dd><dd>note: to reset runtime from an abend: </dd><dd>source pwr_stop.sh </dd><dd> </dd><dd>--------------------------------------------------------------------------------------------------- </dd><dd>OK, proof of concept works, let's have another pi do some I/O </dd><dd>after all, what good is a SCADA system without I/O? </dd><dd>---------------------------------------------------------------------------------------------------  <br /> </dd></dl> </dd></dl> <dl><dd><dl><dd> </dd></dl> </dd></dl> <dl><dt>20) <strong>Build another rpi (nobody can have just one!), hostname rpi2</strong><br /> </dt></dl> <dl><dd><dl><dd>install base OS (item 8 above) </dd><dd>config new pi for ssh (item 9 above) </dd><dd>install Proview (item 17 above) </dd><dd>sudo nano /etc/proview.cnf </dd><dd>edit the qcomBusId to 5 </dd><dd>save changes and exit </dd><dd>21) configure rpi2 for arduino </dd><dd>login to rpi2 as pwrp </dd><dd>connect the arduino device </dd><dd>sudo apt-get install arduino </dd><dd>launch arduino </dd><dd>pick "Tools | Board | Arduino Uno" </dd><dd>pick "Tools | Serial Port | /dev/ttyACM0" </dd><dd>pick "File | Sketchbook | pwr_arduino_uno" </dd><dd>in sketch, verify debug assignment is 0 </dd><dd>verify baudRate is 19200 </dd><dd>upload sketch to the arduino </dd><dd> </dd><dd>note: due to the bizarre handling of serial in Linux (i.e. raw, cooked, much interference by software layers, etc.), </dd><dd>the following config is needed prior to starting the pwr runtime: </dd><dd> </dd><dd>stty -F /dev/sttyACM0 10:0:8be:0:3:1c:7f:15:1:0:1:0:11:13:1a:0:12:f:17:16:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0 </dd><dd>this config is included in the "pwr" service start script as per edits in sections above. </dd><dd> </dd><dd>(as a side note, if the Uno is connected to a virtual machine via VirtualBox, if you bind the Uno device from the (Windows) host </dd><dd>to the VM using USB and not COM, then things seem to work in  Proview debug runtime. Again, the stty config needs to be run prior to  runtime start.) <br /> </dd></dl> </dd></dl> <dl><dt>22) <strong>Update Proview project</strong> <dl><dd>logon to dev as pwrp </dd></dl></dt><dd>launch Proview </dd><dd> </dd><dd>using "PwR Project List" </dd><dd>from the menu, pick "File | Open | GlobalVolumeList" </dd><dd>using "PwR Global Volume List" </dd><dd>enter edit mode </dd><dd>add a VolumeReg object as sibling of VolPipoc </dd><dd>open object, set attributes: </dd><dd>ObjectName  &nbsp;:  VolPipoc2 </dd><dd>Description  &nbsp;:  0.1.1.2    pipoc </dd><dd>VolumeId    &nbsp;:  _V0.1.1.2 </dd><dd>Project      &nbsp;:  pipoc </dd><dd>close the object </dd><dd>save changes </dd><dd>leave edit mode </dd><dd>close the window </dd><dd>using "PwR Project List" </dd><dd>open PiPOC project </dd><dd>enter edit mode<br /> </dd></dl> <dl><dd><dl><dd> </dd><dd>add a RootVolumeConfig object as sibling of VolPipoc </dd><dd>open object, set attribute: </dd><dd>ObjectName  &nbsp;:  VolPipoc2 </dd><dd>close the object<br /> </dd></dl> </dd></dl> <dl><dd><dl><dd> </dd><dd>add a NodeConfig object as sibling to pipoc </dd><dd>open object, set attributes: </dd><dd>ObjectName  &nbsp;:  pipoc2 </dd><dd>NodeName      &nbsp;: rpi2        (i.e. the hostname of the target rpi) </dd><dd>OperatingSystem: CustomBuild </dd><dd>BootNode:    &nbsp;: rpi2 </dd><dd>Address      &nbsp;: 192.168.0.2 (i.e. the IPv4 address of the rpi) </dd><dd>close the object<br /> </dd></dl> </dd></dl> <dl><dd><dl><dd> </dd><dd>add a CustomBuild as child to pipoc2 </dd><dd>open object, set attributes: </dd><dd>ObjectName    &nbsp;: build </dd><dd>cc            &nbsp;: /usr/bin/arm-gcc </dd><dd>cxx          &nbsp;: /usr/bin/arm-g++ </dd><dd>ar            &nbsp;: /usr/bin/arm-ar </dd><dd>OperatingSystem: Linux on ARM </dd><dd>Platform      &nbsp;: arm_linux </dd><dd>Release      &nbsp;: X48arm </dd><dd>close the object </dd><dd> </dd><dd>open pipoc2's RootVolumeLoad object, set attribute: </dd><dd>ObjectName    &nbsp;: VolPipoc2 </dd><dd>close the object<br /> </dd></dl> </dd></dl> <dl><dd><dl><dd> </dd><dd>save changes </dd><dd>click Yes to "Do you want to create this Volume?" </dd><dd>leave edit mode<br /> </dd></dl> </dd></dl> <dl><dd><dl><dd> </dd><dd>right click VolPipoc2, pick OpenVolume </dd><dd>using "Configure Root Volume" </dd><dd>pick "Operator Station" </dd><dd>click Next </dd><dd>click Next </dd><dd>click Next </dd><dd>using "PwR VolPipoc2, pwrp on pipoc" </dd><dd>enter edit mode </dd><dd>from the drop-down menu, pick "File | Volume Attributes..." </dd><dd>change the "OperatingSystem" attribute to "CustomBuild" </dd><dd>close the object </dd><dd>in the right pane, delete the Maintenance object </dd><dd>in the right pane, delete the OpDefault object </dd><dd>in the right pane, delete the WebHandler object </dd><dd>in the right pane, delete the WebBrowser object<br /> </dd></dl> </dd></dl> <dl><dd><dl><dd> </dd><dd>add a XttGraph object as child to Op </dd><dd>set ObjectName to Display2<br /> </dd></dl> </dd></dl> <dl><dd><dl><dd> </dd><dd>open Op object, set attributes: </dd><dd>UserName    &nbsp;: pwrp </dd><dd>AutoStart[0] &nbsp;: Nodes-Pipoc2-Op-Display2 </dd><dd>FastAvail[0] &nbsp;: Nodes-Pipoc2-Op-Display2 </dd><dd>close the object </dd><dd> </dd><dd>add a Arduino_USB object as child of Pipoc2 </dd><dd>open object, set attributes: </dd><dd>ObjectName    &nbsp;: Arduino </dd><dd>close object </dd><dd> </dd><dd>add a Arduino_Uno object as child of Arduino </dd><dd>open object, set attributes: </dd><dd>ObjectName    &nbsp;: Uno1 </dd><dd>Device        &nbsp;: /dev/ttyACM0 </dd><dd>BaudRate      &nbsp;: 19200 </dd><dd>close object </dd><dd> </dd><dd>add a ChanAi object as child of Uno1 </dd><dd>open object, set attributes: </dd><dd>ObjectName            &nbsp;: Ai0 </dd><dd>Number                &nbsp;: 0 </dd><dd>RawValRangeLow        &nbsp;: 0 </dd><dd>RawValRangeHigh      &nbsp;: 1023 </dd><dd>ChannelSigValRangeLow &nbsp;: 0 </dd><dd>ChannelSigValRangeHigh&nbsp;: 5 </dd><dd>SensorSigValRangeLow  &nbsp;: 0 </dd><dd>SensorSigValRangeHigh &nbsp;: 5 </dd><dd>ActValRangeLow        &nbsp;: 0 </dd><dd>ActValRangeHigh      &nbsp;: 1023 </dd><dd>close object </dd><dd> </dd><dd>add a ChanDo object as child of Uno1 </dd><dd>open object, set attributes: </dd><dd>ObjectName    &nbsp;: Do2 </dd><dd>Number        &nbsp;: 2 </dd><dd>close object </dd><dd> </dd><dd>add a ChanDi object as child of Uno1 </dd><dd>open object, set attributes: </dd><dd>ObjectName    &nbsp;: Di4 </dd><dd>Number        &nbsp;: 4 </dd><dd>close object </dd><dd> </dd><dd>in the center pane, add a $PlantHier object </dd><dd>set ObjectName to Bakery2 </dd><dd> </dd><dd>add a $PlantHier object, child to Bakery2 </dd><dd>set ObjectName to Signals </dd><dd> </dd><dd>add an Ai object as child of Signals </dd><dd>open object, set attributes: </dd><dd>ObjectName    &nbsp;: Ai0 </dd><dd>SigChanCon    &nbsp;: Nodes-Pipoc2-Arduino-Uno1-Ai0 </dd><dd>close object </dd><dd> </dd><dd>add a Di object as child of Signals </dd><dd>open object, set attributes: </dd><dd>ObjectName    &nbsp;: Di4 </dd><dd>SigChanCon    &nbsp;: Nodes-Pipoc2-Arduino-Uno1-Di4 </dd><dd>close object </dd><dd> </dd><dd>add a Do object as child of Signals </dd><dd>open object, set attributes: </dd><dd>ObjectName    &nbsp;: Do2 </dd><dd>SigChanCon    &nbsp;: Nodes-Pipoc2-Arduino-Uno1-Do2 </dd><dd>close object </dd><dd> </dd><dd>add a PlcPgm object as child of Bakery2 </dd><dd>set ObjectName to Plc2 </dd><dd> </dd><dd>save changes </dd><dd>leave edit mode </dd><dd> </dd><dd>right-click Bakery2-Plc, pick Open Program </dd><dd>using "Bakery2-Plc2" </dd><dd>enter edit mode </dd><dd>save changes (there are none - but we need the sub-window to exist) </dd><dd>leave edit mode </dd><dd>close the window </dd><dd>using "PwR VolPipoc, pwrp on pipoc": </dd><dd>right click Nodes-Op-Display2 </dd><dd>pick "Open Ge..." </dd><dd>using "PwR Ge display2" </dd><dd>add one ValueInputMedium object </dd><dd>add two ValueMedium objects </dd><dd> </dd><dd>note the coordinates for the area to display </dd><dd>from the drop-down menu, pick "File | Graph Attributes" </dd><dd>enter the x &amp; y coordinates for display area noted above </dd><dd>close the object </dd><dd> </dd><dd>double-click the ValueInputMedium object, set attribute: </dd><dd>Value.Format    &nbsp;:&nbsp;%6d </dd><dd>close object </dd><dd> </dd><dd>repeat for the first ValueMedium object </dd><dd>repeat with&nbsp;%6.2f for other ValueMedium object </dd><dd> </dd><dd>View Plant Hierarchy, select Bakery2-Signals-Do2 </dd><dd>press Ctrl key, double-click on ValueInputMedium object </dd><dd>note: this connects the display object to the target plant signal<br /> </dd></dl> </dd></dl> <dl><dd><dl><dd> </dd><dd>repeat, connect Di4 to ValMed,  connect Ai0 to other ValMed<br /> </dd></dl> </dd></dl> <dl><dd><dl><dd> </dd><dd>pick "File | Save" </dd><dd>close the window </dd><dd>using "PwR VolPipoc2, pwrp on pipoc": </dd><dd>from drop-down menu, pick "Functions | Build Node" </dd><dd>from drop-down menu, pick "Functions | Distribute" </dd><dd>using "Distributor": </dd><dd>select rpi2 </dd><dd>from the drop-down menu, pick "Functions | Distribute" </dd><dd>exit from the Proview development environment (close all windows)<br /> </dd></dl> </dd></dl> <dl><dt>23) <strong>use the Arduino</strong> <br /> </dt></dl> <dl><dd><dl><dd>connect to rpi2 via VNC X window </dd><dd>restart the runtime: </dd><dd>sudo service pwr restart </dd><dd>hint: if problems, then to get some diagnostics: </dd><dd>cd </dd><dd>source  pwr_stop.sh </dd><dd>rt_ini -i &amp; </dd><dd>ps -ef | grep rt </dd><dd>edit ~./.xtt_start to launch the operator station windows: <ol>
+
<li>!/bin/bash </li>
+
</ol> </dd><dd>source /etc/pwrp_profile </dd><dd>$pwr_exe/rt_xtt Nodes-Pipoc2-Op &amp; </dd><dd>save changes and exit </dd><dd>double-click the Proview desktop icon </dd><dd>in Display2, the analog in value will vary slightly due to noise (unless you have connected a pot or some signal to it) </dd><dd>experiment with the Di and Do values </dd><dd>finish </dd></dl> </dd></dl></div>
+

Revision as of 04:16, 4 August 2013

 1) Install Ubuntu 12.10 desktop OS on the development (virtual) machine:

        Host system is Microsoft Windows 7 Ultimate 64 bit, fully patched, 2 socket XeonE5620, 32GB RAM  ::VM environment is Oracle VM VirtualBox 4.2.6r82870 with Extension Pack hosted on above
        Create virtual machine (VM): 4GB RAM, 30GB disk, bridged network adaptor, enable 3D accel, no floppy boot, bidir clipboard, shared folder to pwr docs, otherwise defaults
        Boot the iso on the VM
        English, install ubuntu
        Download updates while installing
        Install this third party software
        Erase disk and install ubuntu
        Chicago
        English (us), english (us)
        Hostname pwrDevel
        Require login pw
        Restart

2) Patch the install

        sudo apt-get update
        sudo apt-get dist-upgrade
        restart (for new kernel)

3) Install virtualbox tools

        sudo apt-get install linux-headers-generic dkms build-essential
        From vbox menu pick: Devices | Install Guest Additions
        Allow autorun prompt to procede, authenticate
        Restart


4) Minimize annoyances

        Get rid of advertising and the global menu
        sudo apt-get remove unity-lens-shopping appmenu-gtk appmenu-gtk3 appmenu-qt
        Launch firefox, disable 'global menu integration' extension
        Logout, log back in

        turn off spyware

        launch "System Settings | Privacy"
        pick "Search Results," pick "Include online search results: Off"
        pick "Diagnostics", uncheck "Send error reports to Canonical", pick "Record Activity: OFF"
        sudo add-apt-repository ppa:tualatrix/ppa
        sudo add-apt-repository ppa:satyajit-happy/themes
        sudo add-apt-repository ppa:indicator-multiload/stable-daily
        sudo apt-get update
        sudo apt-get install gnome-shell synaptic gconf-editor gnome-tweak-tool ubuntu-tweak nautilus-open-terminal


        note: accept defaults for gdm


        sudo apt-get install orion-gtk-theme indicator-multiload compizconfig-settings-manager
        right click desktop pick "Change Desktop Background", select non-orange and non-purple background
        from Dash, launch "System Load Indicator"
        launch "System Settings | Ubuntu Tweak"
        pick "Tweaks | Miscellaneous", pick "Overlay scrollbars: Normal"
        pick "Tweaks | Theme", pick "Gtk theme: Orion", "Icon theme: gnome", "Window theme: Radiance"
        pick "Tweaks | Desktop Icons", pick "Show Computer", "Show mounted volumes"
        pick "Tweaks | Unity", adjust "Launcher icon size" to not waste so much screen space
        pick "Tweaks | Window", pick "Window control button...: Right"

        from Dash, launch "CompizConfig Settings Manager"
        un-check "Snapping Windows"
        delete unneeded icons from launcher: the "bag", the libre office stuff, the "U"s, the advertising
        add "Terminal" to launcher
        sudo apt-get install geany
        add "Geany" to launcher


5) Install prerequisites for 'Proview build from source code'


        install some packages (note: openssh-server is not really a prerequisite)
        sudo apt-get install make flex libgtk2.0-dev libdb5.1-dev libdb5.1++-dev libasound2-dev doxygen libmysql++-dev xfonts-100dpi openssh-server
        install java JDK
        download tarball from http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
        cd /usr/local
        sudo tar -zxvf /home/<userID>/jdk-7u17-linux-x64.tar.gz
        sudo chown -R root:root jdk1.7.0_17/
        sudo -s
        cd /etc/profile.d
        touch proview.build.sh
        vi proview.build.sh
        insert the following lines:
        export jdk=/usr/local/jdk1.7.0_17
        export PATH=$PATH:$jdk/bin
        save edited file, exit vi
        exit (from sudo)


6) Install Proview development environment & debug runtime


        wget -Opwr48_4.8.6-3.2_amd64.deb http://sourceforge.net/projects/proview/files/proview/proview_4.8.6-3/ubuntu_12.10/pwr48_4.8.6-3.2_amd64.deb/download
        sudo dpkg -i pwr48_4.8.6-3.2_amd64.deb
        sudo adduser pwrp sudo
        logout
        login as pwrp
        fix annoyances
        from launcher, pick "System Settings | Brightness and Lock"
        pick "Lock: OFF"
        exit
        cd
        sudo chown pwrp:pwrp Desktop
        install antlr
        wget http://www.antlr2.org/download/antlr-2.7.7.tar.gz
        tar -zxvf antlr-2.7.7.tar.gz
        geany ~/antlr-2.7.7/lib/cpp/antlr/CharScanner.hpp
        add: #include <strings.h>

            include <stdio.h>

        save changes and exit
        cd ~/antlr-2.7.7
        ./configure
        make
        sudo make install
        change max shared memory
        sudo geany /etc/sysctl.conf
        insert a line at the end:
        kernel.shmmax=67108864
        save changes, exit geany
        sudo -s
        echo 67108864 > /proc/sys/kernel/shmmax
        exit



7)) Install Proview source

        login as pwrp
        cd
        wget -Opwrsrc_4.8.6-3.2.tar.gz http://sourceforge.net/projects/proview/files/proview/proview_4.8.6-3/pwrsrc_4.8.6-3.2.tar.gz/download
        tar -zxvf pwrsrc_4.8.6-3.2.tar.gz

8) Bake the raspberry pi

        get the wheezy image 2013-02-09 via torrent
        write to 8 GB Class 10 SD card
        boot
        using the Raspi-config tool:
        expand_rootfs
        configure_keyboard
        English (US)
        English (US)
        The default for the keyboard layout
        No compose key
        Control-Alt-Backspace to terminal X server: No
        change_pass
        change_locale
        en_US.UTF-8 UTF-8 only
        default locale for system environment: none
        change_timezone: US Central
        ssh: Enable
        boot_behavior: No
        Finish
        reboot
        login as pi
        sudo apt-get update
        sudo apt-get dist-upgrade
        sudo apt-get install tightvncserver
        sudo apt-get install libgtk2.0-dev
        sudo rm /etc/ssh/ssh_host_*
        sudo dpkg-reconfigure openssh-server
        sudo adduser pwrp
        use password = 'pwrp' (same as Proview distro default)
        sudo adduser pwrp dialout
        (this is for arduino access)
        sudo visudo
        insert following line under the "root ALL=(ALL) ALL" Line:
        pwrp ALL=(ALL) ALL
        save changes, exit
        sudo nano /etc/security/limits.conf
        insert the following:

            - rtprio 99

        save and exit
        sudo nano /etc/pam.d/su
        uncomment line:
        session required pam_limits.so
        save and exit
        (note: this allows the pwr service start to set pwr tasks' realtime priorities)
        (note2: also applies to the pwrp tightvncserver X session, since that is launched with su also)
        sudo nano /etc/init.d/tightvncserver
        insert the following into the new file:

            !/bin/sh
            /etc/init.d/tightvncserver

        VNCUSER='pwrp'
        case "$1" in
        start)
        su $VNCUSER -c '/usr/bin/tightvncserver :0 -geometry 1024x768 -depth 24'
        echo "Starting TightVNC Server for $VNCUSER "

    stop)
    pkill Xtightvnc
    echo "TightVNC Server stopped"

    )

    echo "Usage: /etc/init.d/tightvncserver {start|stop}"
    exit 1

    esac
    exit 0
    save changes, exit nano
    sudo chmod 755 /etc/init.d/tightvncserver
    sudo update-rc.d tightvncserver defaults
    exit (i.e. logout)
    login as pwrp
    mkdir ~/proview
    vncpasswd
    enter and confirm
    no view-only password
    sudo nano /etc/hostname
    change to desired node name (e.g. rpi3)
    save and exit
    cd
    ssh-keygen -t rsa
    cd ~/.ssh
    touch authorized_keys
    chmod 600 authorized_keys
    choose a static IPv4 address
    sudo nano /etc/hosts
    update with hostname and ip
    add any other nodes which will participate in the distributed control system
    sudo nano /etc/network/interfaces
    change eth0 to (substitute actual network values):
    iface eth0 inet static
    address 192.168.0.1
    netmask 255.255.255.0
    network 192.168.0.0
    broadcast 192.168.0.255
    gateway 192.168.0.254
    save changes and exit
    sudo shutdown -r now
    login to X desktop using vnc client (to verify X is working)

9) Configure ssh access from dev to rpi

    logon to dev as pwrp

    do this only once:
    ssh-keygen -t rsa
    sudo geany /etc/hosts
    insert line for raspberry pi machine(s) and any other hosts in the distributed system
    save and exit
    scp /home/pwrp/.ssh/id_rsa.pub rpi3:/home/pwrp/.ssh/authorized_keys

10) Install cross platform dev tools on dev

        logon to dev as pwrp
        sudo apt-get install ia32-libs git
        cd
        mkdir rpitools
        cd rpitools
        sudo git clone git://github.com/raspberrypi/tools.git
        create symbolic links to compilers and archiver as a workaround on rather long fully qualified names -
        (Proview merge tool has a hardcoded alloc of 80 chars max for the FQ name of each of these tools):
        sudo -s
        ln -s /home/pwrp/rpitools/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc /usr/bin/arm-gcc
        ln -s /home/pwrp/rpitools/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++ /usr/bin/arm-g++
        ln -s /home/pwrp/rpitools/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-ar /usr/bin/arm-ar
        exit

11) Get a copy of the rpi headers and libraries to compile and link against, respectively

        logon to dev as pwrp
        rsync -avz -e ssh pwrp@rpi3:/usr/include /home/pwrp/rpi
        sudo rsync -avz -e ssh pwrp@rpi3:/usr/lib/arm-linux-gnueabihf /usr/lib
        sudo rsync -avz -e ssh pwrp@rpi3:/lib/arm-linux-gnueabihf /lib

12) Setup the build environment

        logon to dev as pwrp
        cd
        geany ~/.envarm
        insert the following into this new file:

            .envarm:
            env for Proview development for raspberry pi

        export pwre_cc=/usr/bin/arm-gcc
        export pwre_cxx=/usr/bin/arm-g++
        export pwre_ar=/usr/bin/arm-ar
        export pwr_host_exe=/usr/pwr48/os_linux/hw_x86_64/exp/exe
        export pwre_host_exe=/usr/pwr48/os_linux/hw_x86_64/exp/exe
        export pwre_env_db=/home/pwrp/pwre_env_db
        export pwre_bin=/home/pwrp/pwrsrc_4.8.6-3/src/tools/pwre/src/os_linux
        export pwre_dir_symbols=$pwre_bin/dir_symbols.mk
        export PATH=$PATH:/home/pwrp/rpitools/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin
        source $pwre_bin/pwre_function
        save and exit
        geany ~/.bashrc
        insert at end of file:
        source ~/.envarm
        save and exit
        close all Terminal(s)
        launch Terminal
        cd
        mkdir pwrrls_4.8.6-3
        define a PWRE environment for the build:
        pwre add v486_arm
        --
        -- Environment  : v486_arm
        -- Module.........: rt
        -- Source root....: /home/pwrp/pwrsrc_4.8.6-3/src
        -- Import root....: /usr/pwr48/os_linux/hw_x86_64
        -- Build root.....: /home/pwrp/pwrrls_4.8.6-3
        -- Build type.....: dbg
        -- OS.............: linux
        -- Hardware.......: arm
        -- Description....: X48arm
        --
        himBH

13) Fixup Proview config script

        logon to dev as pwrp
        cd /home/pwrp/pwrsrc_4.8.6-3/src/tools/pwre/src/os_linux
        cp pwre_configure.sh pwre_configure.sh.org
        cd
        geany /home/pwrp/pwrsrc_4.8.6-3/src/tools/pwre/src/os_linux/pwre_configure.sh
        insert after line 311:
        pwre_config_check_lib gtk GTK gtk gtk 0 "/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so"
        pwre_config_check_include gtk GTK 1 "/home/pwrp/rpi/include/gtk-2.0/gtk/gtk.h"
        as a sanity check, the code block should look like:
        if test $pwre_hw == "hw_arm"; then
        pwre_config_check_lib gtk GTK gtk gtk 0 "/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so"
        pwre_config_check_include gtk GTK 1 "/home/pwrp/rpi/include/gtk-2.0/gtk/gtk.h"
        pwre_config_check_include jni JNI 1 $jdk/include/jni.h
        pwre_config_check_include jni JNI 0 $jdk/include/linux/jni_md.h
        save and exit
        pwre init v486_arm
        pwre configure
        need to figure out some paths, will use the output from "pwre configure" to help,
        this is a little tedious:
        geany /home/pwrp/pwrrls_4.8.6-3/pwre_arm_linux.cnf
        find line "export pwre_conf_libgtk="
        note the embedded command, e.g. "pkg-config --libs gtk+-2.0", designate as "cmd1"
        find line "export pwre_conf_incdirgtk="
        note the embedded command, e.g. "pkg-config --cflags gtk+-2.0", designate as "cmd2". the commands will now be run on the rpi:
        ssh rpi3
        execute cmd1:
        pkg-config --libs gtk+-2.0
        save the output in a new temp file, e.g. in geany
        execute cmd2:
        pkg-config --cflags gtk+-2.0
        save the output to the temp file
        exit from ssh session
        in the temp file, replace "usr/include" with "home/pwrp/rpi/include"
        in geany, open /home/pwrp/pwrsrc_4.8.6-3/src/tools/pwre/src/os_linux/pwre_configure.sh
        find line "export pwre_conf_libgtk="
        hard-code the contents of that assign to the output of cmd1, e.g.:
        echo "export pwre_conf_libgtk=\"-lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0\"" >> $cfile
        find line "export pwre_conf_incdirgtk="
        hard-code the contents of that assign to the edited output of cmd2, e.g.:
        echo "export pwre_conf_incdirgtk=\"-pthread -I/home/pwrp/rpi/include/gtk-2.0 -I/usr/lib/arm-linux-gnueabihf/gtk-2.0/include -I/home/pwrp/rpi/include/atk-1.0 -I/home/pwrp/rpi/include/cairo -I/home/pwrp/rpi/include/gdk-pixbuf-2.0 -I/home/pwrp/rpi/include/pango-1.0 -I/home/pwrp/rpi/include/gio-unix-2.0/ -I/home/pwrp/rpi/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -I/home/pwrp/rpi/include/pixman-1 -I/home/pwrp/rpi/include/freetype2 -I/home/pwrp/rpi/include/libpng12 \"" >> $cfile
        find line "echo "export pwre_conf_lib=\"-lpthread -lm -lrt -lcrypt\"" >> $cfile"
        add X11 and db5.1 libraries, e.g.:
        echo "export pwre_conf_lib=\"-lpthread -lm -lrt -lcrypt -lX11 -ldb-5.1\"" >> $cfile
        find line "echo "export pwre_conf_libdir=\"$conf_libdir\"" >> $cfile"
        hard-code the assignment to:
        echo "export pwre_conf_libdir=\"-L/usr/lib/arm-linux-gnueabihf -Wl,-rpath=/usr/lib/arm-linux-gnueabihf -Wl,-rpath=/lib/arm-linux-gnueabihf\"" >> $cfile
        find line "echo "export pwre_conf_incdir=\"$conf_incdir\"" >> $cfile"
        hard-code the assignment to:
        echo "export pwre_conf_incdir=\"-I /home/pwrp/rpi/include -I/usr/local/jdk1.7.0_17/include -I/usr/local/jdk1.7.0_17/include/linux\"" >> $cfile
        save the edited file
        cd
        mkdir pwrCustom
        save the edited file (again) as ~/pwrCustom/pwre_configure.sh.custom
        exit geany

14) Fixup Proview source tree

        fix service start script:
        cp /home/pwrp/pwrsrc_4.8.6-3/src/tools/pkg/deb_armel/pwrrt/pwr ~/pwrCustom
        geany ~/pwrCustom/pwr
        for each of the functions: pwr_start, pwr_stop, pwr_reload, pwr_kill:
        replace the "whoami" conditional test from "root" to "pwrp"
        if using an arduino uno, add the following line within the create_wrapper function, after the umask command:
        echo "stty -F /dev/ttyACM0 10:0:8be:0:3:1c:7f:15:1:0:1:0:11:13:1a:0:12:f:17:16:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0" >> $wrapper
        save and exit
        fix code error:
        geany /home/pwrp/pwrsrc_4.8.6-3/sev/lib/sev/src/sev_db.cpp
        add open curly brace on line 52:
        else if ( type == sev_eDbType_Sqlite) {
        add close curly brace after line 58.
        code block should now look like:
        if ( type == sev_eDbType_Mysql) {

            if defined PWRE_CONF_MYSQL

        return sev_dbms::open_database();

            else

        printf( "** Release is not built with mysql\n");
        return 0;

            endif

        }
        else if ( type == sev_eDbType_Sqlite) {

            if defined PWRE_CONF_SQLITE3

        return sev_dbsqlite::open_database();

            else

        printf( "** Release is not built with sqlite3\n");
        return 0;

            endif

        }
        else
        return 0;
        }
        end example code block
        save the edited file as:
        ~/pwrCustom/sev_db.cpp
        exit geany
        edit the build package script, it will not create a *.deb file as-is:
        geany ~/pwrsrc_4.8.6-3/src/tools/pkg/deb_armel/pwrrt/build.sh
        "# Create directories" section, insert line:
        mkdir -p $pkgroot/usr/pwrp/adm/db
        uncomment lines which copy op to cnf
        uncomment lines which copy user to cnf
        add following lines to "# Copy user to cnf" section:
        cp $pwre_broot/$pwre_target/exp/inc/pwr_arduino_uno.ino $pkgroot/usr/pwrrt/cnf/user
        cp $pwre_sroot/tools/pkg/deb/adm/proview_icon.png $pkgroot/usr/pwrrt/cnf/user
        cp /home/pwrp/pwrCustom/Proview.desktop $pkgroot/usr/pwrrt/cnf/user
        after the "# Copy user to cnf" section, insert the following lines:

            Copy user security data

        mkdir -p $pkgroot/usr/pwrp/adm/db
        cp $pwre_sroot/tools/pkg/deb/adm/pwr_user2.dat $pkgroot/usr/pwrp/adm/db
        comment out line "dpkg-buildpackage -aarmel -b"
        add following lines:
        packagename=pwrrt-$version.tar.gz
        tar -czf ../$packagename *
        save the edited file as:
        ~/pwrCustom/build.sh
        exit geany
        geany ~/pwrCustom/fixPwrSource.sh
        insert the following lines into the new file:

            !/bin/bash
            fix some missing dependencies

        cp /home/pwrp/pwrsrc_4.8.6-3/nmps/lib/nmps/src/nmps.h /home/pwrp/pwrsrc_4.8.6-3/src/exe/rt_sim/src/
        cp /home/pwrp/pwrsrc_4.8.6-3/src/exe/rt_elog/src/rt_elog.h /home/pwrp/pwrsrc_4.8.6-3/xtt/lib/xtt/src/
        cp /home/pwrp/pwrsrc_4.8.6-3/src/exe/rt_elog/src/rt_elog.h /home/pwrp/pwrsrc_4.8.6-3/xtt/lib/xtt/gtk/
        cp /home/pwrp/pwrsrc_4.8.6-3/src/exe/rt_elog/src/rt_elog.h /home/pwrp/pwrsrc_4.8.6-3/src/exe/rt_elog_dump/src
        cp /usr/include/db.h /home/pwrp/pwrsrc_4.8.6-3/src/exe/rt_elog_dump/src
        cp /usr/include/db.h /home/pwrp/pwrsrc_4.8.6-3/xtt/lib/xtt/src
        cp /usr/include/db.h /home/pwrp/pwrsrc_4.8.6-3/xtt/lib/xtt/gtk
        mkdir /home/pwrp/pwrsrc_4.8.6-3/wb/lib/wb/src/antlr
        cp /home/pwrp/antlr-2.7.7/lib/cpp/antlr/* /home/pwrp/pwrsrc_4.8.6-3/wb/lib/wb/src/antlr

            fix code error

        cp ~/pwrCustom/sev_db.cpp /home/pwrp/pwrsrc_4.8.6-3/sev/lib/sev/src/sev_db.cpp

            copy build script which creates just a tarball, not a debian package, and includes some custom rpi/arduino specific stuff

        cp ~/pwrCustom/build.sh /home/pwrp/pwrsrc_4.8.6-3/src/tools/pkg/deb_armel/pwrrt

            copy custom pwre_configure.sh

        cp /home/pwrp/pwrCustom/pwre_configure.sh.custom /home/pwrp/pwrsrc_4.8.6-3/src/tools/pwre/src/os_linux/pwre_configure.sh

            copy custom pwr service control script

        cp ~/pwrCustom/pwr /home/pwrp/pwrsrc_4.8.6-3/src/tools/pkg/deb_armel/pwrrt/
        save and exit
        chmod 755 ~/pwrCustom/fixPwrSource.sh
        geany ~/pwrCustom/Proview.desktop
        insert the following lines into the new file:
        [Desktop Entry]
        Name=Proview
        Comment=SCADA Operator Station
        Exec=/home/pwrp/.xtt_start
        Icon=proview_icon
        Terminal=false
        Type=Application
        MimeType=text/plain
        Categories=GTK
        save and exit

15) Final cleanup

        logon to dev as pwrp
        delete /home/pwrp/pwrsrc_4.8.6-3 (and all contents)
        delete everything from /home/pwrp/pwrrls_4.8.6-3, leaving the folder
        unpack the source (again):
        cd
        tar -zxvf pwrsrc_4.8.6-3.2.tar.gz

16) Build Proview for raspberry pi

        logon to dev as pwrp
        cd
        pwre list
        pwre init v486_arm
        ./pwrCustom/fixPwrSource.sh
        pwre create_all_modules
        pwre import rt
        pwre import java
        pwre import op
        pwre configure
        ./pwrCustom/fixPwrSource.sh
        pwre ebuild rt
        pwre ebuild op
        pwre build tools/pkg deb_armel
        note: to enable pkg rebuild (when make says nothing to do):
        touch /home/pwrp/pwrsrc_4.8.6-3/src/tools/pkg/deb_armel/pwrrt/control


17) Install Proview runtime and op station on Raspberry Pi

        logon to dev as pwrp
        geany ~/pwrCustom/installRpi.sh
        insert the following lines into the new file:

            !/bin/bash
            install Proview package on Raspberry Pi
            unpack the tarball

        cd /home/pwrp/proview
        tar -zxvf pwrrt-.tar.gz
        chown -R pwrp:pwrp /home/pwrp/proview

            configure target dirs, install the archive

        install -d -o pwrp -g pwrp /usr/pwrrt
        install -d -o pwrp -g pwrp /usr/pwrrt/cnf
        install -d -o pwrp -g pwrp /usr/pwrrt/cnf/op
        install -d -o pwrp -g pwrp /usr/pwrrt/cnf/user
        install -d -o pwrp -g pwrp /usr/pwrrt/exe
        install -d -o pwrp -g pwrp /usr/pwrrt/lib
        install -d -o pwrp -g pwrp /usr/pwrrt/load
        install -d -o pwrp -g pwrp /pwrp
        install -d -o pwrp -g pwrp /pwrp/arm_linux
        install -d -o pwrp -g pwrp /pwrp/arm_linux/exe
        install -d -o pwrp -g pwrp /pwrp/arm_linux/lib
        install -d -o pwrp -g pwrp /pwrp/arm_linux/lis
        install -d -o pwrp -g pwrp /pwrp/arm_linux/obj
        install -d -o pwrp -g pwrp /pwrp/common
        install -d -o pwrp -g pwrp /pwrp/common/db
        install -d -o pwrp -g pwrp /pwrp/common/inc
        install -d -o pwrp -g pwrp /pwrp/common/load
        install -d -o pwrp -g pwrp /pwrp/common/log
        install -d -o pwrp -g pwrp /pwrp/common/loghist
        install -d -o pwrp -g pwrp /pwrp/common/web
        install -d /usr/pwrp
        install -d -o pwrp -g pwrp /usr/pwrp/adm
        install -d -o pwrp -g pwrp /usr/pwrp/adm/db
        install -d /usr/share/doc/pwrrt
        install -D /home/pwrp/proview/etc/* /etc
        install -D /home/pwrp/proview/etc/init.d/* /etc/init.d
        install -D -m 644 /home/pwrp/proview/usr/pwrrt/cnf/proview.cnf /etc
        install -D -o pwrp -g pwrp /home/pwrp/proview/usr/pwrrt/* /usr/pwrrt
        install -D -o pwrp -g pwrp /home/pwrp/proview/usr/pwrrt/cnf/* /usr/pwrrt/cnf
        install -D -o pwrp -g pwrp /home/pwrp/proview/usr/pwrrt/exe/* /usr/pwrrt/exe
        install -D -o pwrp -g pwrp /home/pwrp/proview/usr/pwrrt/lib/* /usr/pwrrt/lib
        install -D -o pwrp -g pwrp /home/pwrp/proview/usr/pwrrt/load/* /usr/pwrrt/load
        install -D -o pwrp -g pwrp /home/pwrp/proview/usr/pwrrt/cnf/op/.??* /usr/pwrrt/cnf/op
        install -D -o pwrp -g pwrp /home/pwrp/proview/usr/pwrrt/cnf/user/.??* /usr/pwrrt/cnf/user
        install -D -o pwrp -g pwrp /home/pwrp/proview/usr/pwrp/adm/db/* /usr/pwrp/adm/db
        install -D -m 644 /home/pwrp/proview/usr/share/doc/pwrrt/* /usr/share/doc/pwrrt
        install -D -m 644 /home/pwrp/proview/usr/share/man/man1/* /usr/share/man/man1
        install -D -o pwrp -g pwrp -m 775 /home/pwrp/proview/usr/pwrrt/cnf/user/.??* /home/pwrp
        install -D -o pwrp -g pwrp -m 775 /home/pwrp/proview/usr/pwrrt/cnf/user/* /home/pwrp
        install -D -m 644 /home/pwrp/proview/usr/pwrrt/cnf/user/proview_icon.png /usr/share/pixmaps
        install -D -o pwrp -g pwrp -m 644 /home/pwrp/proview/usr/pwrrt/cnf/user/Proview.desktop /home/pwrp/Desktop
        if [ -f /home/pwrp/pwr_arduino_uno.ino ]
        then
        install -d -o pwrp -g pwrp /home/pwrp/sketchbook
        install -d -o pwrp -g pwrp /home/pwrp/sketchbook/pwr_arduino_uno
        mv /home/pwrp/pwr_arduino_uno.ino /home/pwrp/sketchbook/pwr_arduino_uno
        chown pwrp:pwrp /home/pwrp/sketchbook/pwr_arduino_uno/pwr_arduino_uno.ino
        fi
        save and exit
        scp /home/pwrp/pwrrls_4.8.6-3/os_linux/hw_arm/bld/pkg/pwrrt-.tar.gz pwrp@rpi3:~/proview
        scp /home/pwrp/pwrCustom/installRpi.sh pwrp@rpi3:~/
        ssh rpi3
        cd
        chmod 775 installRpi.sh
        sudo ./installRpi.sh
        sudo update-rc.d pwr defaults
        exit (from ssh session)
        18) create proof-of-concept Proview project
        logon to dev as pwrp
        one-time fix so plc prog will build:
        mkdir /home/pwrp/pwrrls_4.8.6-3/os_linux/hw_x86_64
        mkdir /home/pwrp/pwrrls_4.8.6-3/os_linux/hw_x86_64/exp
        mkdir /home/pwrp/pwrrls_4.8.6-3/os_linux/hw_x86_64/exp/exe
        cp ~/pwrsrc_4.8.6-3/src/exp/com/src/os_linux/pwrp_env.sh /home/pwrp/pwrrls_4.8.6-3/os_linux/hw_x86_64/exp/exe
        end one time fix
        on the desktop, double-click Proview V4.8
        accept (and respect) the license terms
        using "PwR Project List":
        enter edit mode
        add a BaseReg object, child to Bases
        open the new object, set attributes:
        ObjectName: BaseV48arm
        Version  : X48arm
        Path  : /home/pwrp/pwrrls_4.8.6-3
        close the object
        save changes
        note: the new base define is reflected as a new line in /usr/pwrp/adm/db/pwr_projectlist.dat
        the binding to the release build's path is via the "X48arm" token, which will be used below
        add a $Hier object, sibling to Bases
        set ObjectName attribute = "testProjects"
        add a ProjectReg object, child of testProjects
        open new object, set attributes:
        ObjectName : piPOC
        Description: Raspberry Pi Proof of Concept
        Version  : X48arm
        (note: Version attr binds the project to the BaseV48arm)
        close the object
        save changes
        Confirm Actions: Yes
        note: the new project is reflected as a new directory tree at /usr/local/pwrp/pipoc
        leave edit mode
        right-click piPOC, pick Open Project
        using "Configure Directory Volume":
        enter "Production QBUS id" = 5 (this is arbitrary, but better than using defaults, for troubleshooting)
        click Next
        click Next
        click No
        click Next
        click Next
        click Skip this node
        click Next
        click Yes
        using "Configure Root Volume":
        pick Operator Station
        click Next
        click Next
        click Next
        using "PwR VolPipoc, pwrp on pipoc":
        from the drop-down menu, pick "File | Volume Attributes..."
        change the "OperatingSystem" attribute to "CustomBuild"
        close the object
        save changes
        close the window
        using "PwR Directory, pwrp on pipoc":
        enter edit mode
        open pipoc object, set attributes:
        NodeName  : rpi3 (i.e. the hostname of the target rpi)
        OperatingSystem: CustomBuild
        BootNode:  : rpi3
        Address  : 192.168.0.1 (i.e. the IPv4 address of the rpi)
        close the object
        add a CustomBuild object as child to pipoc
        open the new object, set attributes:
        ObjectName  : build
        cc  : /usr/bin/arm-gcc
        cxx  : /usr/bin/arm-g++
        ar  : /usr/bin/arm-ar
        OperatingSystem: Linux on ARM
        Platform  : arm_linux
        Release  : X48arm
        close the object
        save changes
        leave edit mode
        right-click "VolPipoc", pick Open Volume
        using "PwR VolPipoc, pwrp on pipoc":
        enter edit mode
        in the right pane, delete the Maintenance object
        in the right pane, delete the OpDefault object
        in the right pane, delete the WebHandler object
        in the right pane, delete the WebBrowser object
        add a XttGraph object as child to Op
        set ObjectName to Display1
        open Op object, set attributes:
        UserName  : pwrp
        FastAvail[0]  : Nodes-Pipoc-Op-Display1
        close the object
        in the center pane, add a $PlantHier object
        set ObjectName to Bakery
        add a $PlantHier, child to Bakery
        set ObjectName to Signals
        add two Iv objects as children of Signals
        set ObjectName's to Iin and Iout, respectively
        add a PlcPgm object as child of Bakery
        set ObjectName to Plc
        save changes
        leave edit mode
        right-click Bakery-Plc, pick Open Program
        using "Bakery-Plc"
        enter edit mode
        add a GetIv object
        add a StoIv object
        connect the GetIv output to the StoIv input
        from drop-down menu, pick "View | Palette | Plant". Using the right-pane
        plant hierarchy:
        Connect (bind) Signals-Iin to GetIv
        Connect (bind) Signals-Iout to StoIv
        save changes
        leave edit mode
        close the window
        using "PwR VolPipoc, pwrp on pipoc":
        right click Nodes-Op-Display1
        pick "Open Ge..."
        using "PwR Ge display1"
        add two ValueInputMedium objects
        record the coordinates for the area to display, i.e. the area which contains the two objects
        from the drop-down menu, pick "File | Graph Attributes"
        enter the x & y coordinates for this display area
        close the object
        double-click one of the ValueInputMedium objects, set attribute:
        Value.Format  : %6d
        close object
        repeat for the other Input object
        View "Plant Hierarchy", select Bakery-Signals-Iin
        press Ctrl key, double-click on first ValInpMed object (binds signal to object)
        repeat, bind Iout to other display object
        pick "File | Save"
        close the window
        using "PwR VolPipoc, pwrp on pipoc":
        from drop-down menu, pick "Functions | Build Node"
        example output as shown in "Proview Development Console":
        Setting base /usr/pwr48
        Open pipoc
        args: pipoc pwrp pwrp
        -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
        Welcome to
        pipoc V4.8 Raspberry Pi Proof of Concept
        Revision history
        2013-03-09 pwrp Project created
        -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
        -- Processing line: 50
        -- Building volume directory
        -- Opening volume 'VolPipoc'
        Berkeley DB 5.1.29: (October 25, 2011)
        info get: 0
        -- Build node pipoc
        -- Plc window generated Bakery-Plc-W
        /home/pwrp/pwrrls_4.8.6-3 is baseroot
        Setting base /home/pwrp/pwrrls_4.8.6-3
        -- Cross compilation ARM_LINUX
        -- Plc window compiled for arm_linux optimized -O3 Bakery-Plc-W
        /home/pwrp/pwrrls_4.8.6-3 is baseroot
        Setting base /home/pwrp/pwrrls_4.8.6-3
        -- Cross compilation ARM_LINUX
        -- Plc plcpgm compiled for arm_linux optimized -O3 Bakery-Plc
        -- Web startpage generated $pwrp_web/index.html
        /home/pwrp/pwrrls_4.8.6-3 is baseroot
        Setting base /home/pwrp/pwrrls_4.8.6-3
        -- Cross compilation ARM_LINUX
        -- Building archive for volume: 000_001_001_001
        -- Archive built for volume: 000_001_001_001
        -- Working with load file volume 'VolPipoc'...
        -- Open file...
        -- Successfully created load file for volume 'VolPipoc'
        -- 26 objects with a total body size of 26392 bytes were written to new file.
        -- Creating bootfile for node rpi3
        -- Plc thread generated priority 22, scantime 0.10000 s, 1 plcpgm's
        /home/pwrp/pwrrls_4.8.6-3 is baseroot
        Setting base /home/pwrp/pwrrls_4.8.6-3
        -- Cross compilation ARM_LINUX
        -- Plc process compiled for arm_linux optimized -O3 Dummy
        /home/pwrp/pwrrls_4.8.6-3 is baseroot
        Setting base /home/pwrp/pwrrls_4.8.6-3
        -- Cross compilation ARM_LINUX
        -- Plc program linked for arm_linux node plc_rpi3_0005_plc
        -- Build node pipoc
        end example output
        from drop-down menu, pick "Functions | Distribute"
        using "Distributor":
        select rpi3
        from the drop-down menu, pick "Functions | Distribute"
        example output in "Proview Development Console":
        pwrp_pkg_rpi3_0001.tgz 100% 1705KB 1.7MB/s 00:00
        -- No package installed
        -- Installing package pwrp_pkg_rpi3_0001.tgz
        -- Unpack package pwrp_pkg_rpi3_0001.tgz
        -- Move files to target directories
        sudo: no tty present and no askpass program specified
        end example output
        there will be some warnings in Workbench Messages re missing files, ignore these
        exit from the Proview development environment (close all windows in reverse order of opening them)
        19) run the test project
        connect to rpi3 via vnc client
        nano ~/.xtt_start
        edit the rt_xtt invoke to launch the operator station:
        $pwr_exe/rt_xtt Nodes-Pipoc-Op &
        save changes and exit
        sudo nano /etc/proview.cnf
        edit the qcomBusId to 5
        save changes and exit
        sudo shutdown -r now
        (so the pwr service will pick up the new bus ID)
        connect to rpi3 via vnc client
        start the op station:
        double-click the Proview desktop icon
        launch Display1
        verify manually entering a value in Iin is copied to Iout
        verify manually entering a value in Iout is overwritten by value in Iin
        verify status is green
        note: to reset runtime from an abend:
        source pwr_stop.sh
        ---------------------------------------------------------------------------------------------------
        OK, proof of concept works, let's have another pi do some I/O
        after all, what good is a SCADA system without I/O?
        ---------------------------------------------------------------------------------------------------

20) Build another rpi (nobody can have just one!), hostname rpi2

        install base OS (item 8 above)
        config new pi for ssh (item 9 above)
        install Proview (item 17 above)
        sudo nano /etc/proview.cnf
        edit the qcomBusId to 5
        save changes and exit
        21) configure rpi2 for arduino
        login to rpi2 as pwrp
        connect the arduino device
        sudo apt-get install arduino
        launch arduino
        pick "Tools | Board | Arduino Uno"
        pick "Tools | Serial Port | /dev/ttyACM0"
        pick "File | Sketchbook | pwr_arduino_uno"
        in sketch, verify debug assignment is 0
        verify baudRate is 19200
        upload sketch to the arduino
        note: due to the bizarre handling of serial in Linux (i.e. raw, cooked, much interference by software layers, etc.),
        the following config is needed prior to starting the pwr runtime:
        stty -F /dev/sttyACM0 10:0:8be:0:3:1c:7f:15:1:0:1:0:11:13:1a:0:12:f:17:16:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0
        this config is included in the "pwr" service start script as per edits in sections above.
        (as a side note, if the Uno is connected to a virtual machine via VirtualBox, if you bind the Uno device from the (Windows) host
        to the VM using USB and not COM, then things seem to work in Proview debug runtime. Again, the stty config needs to be run prior to runtime start.)

22) Update Proview project

    logon to dev as pwrp

    launch Proview
    using "PwR Project List"
    from the menu, pick "File | Open | GlobalVolumeList"
    using "PwR Global Volume List"
    enter edit mode
    add a VolumeReg object as sibling of VolPipoc
    open object, set attributes:
    ObjectName  : VolPipoc2
    Description  : 0.1.1.2 pipoc
    VolumeId  : _V0.1.1.2
    Project  : pipoc
    close the object
    save changes
    leave edit mode
    close the window
    using "PwR Project List"
    open PiPOC project
    enter edit mode

        add a RootVolumeConfig object as sibling of VolPipoc
        open object, set attribute:
        ObjectName  : VolPipoc2
        close the object

        add a NodeConfig object as sibling to pipoc
        open object, set attributes:
        ObjectName  : pipoc2
        NodeName  : rpi2 (i.e. the hostname of the target rpi)
        OperatingSystem: CustomBuild
        BootNode:  : rpi2
        Address  : 192.168.0.2 (i.e. the IPv4 address of the rpi)
        close the object

        add a CustomBuild as child to pipoc2
        open object, set attributes:
        ObjectName  : build
        cc  : /usr/bin/arm-gcc
        cxx  : /usr/bin/arm-g++
        ar  : /usr/bin/arm-ar
        OperatingSystem: Linux on ARM
        Platform  : arm_linux
        Release  : X48arm
        close the object
        open pipoc2's RootVolumeLoad object, set attribute:
        ObjectName  : VolPipoc2
        close the object

        save changes
        click Yes to "Do you want to create this Volume?"
        leave edit mode

        right click VolPipoc2, pick OpenVolume
        using "Configure Root Volume"
        pick "Operator Station"
        click Next
        click Next
        click Next
        using "PwR VolPipoc2, pwrp on pipoc"
        enter edit mode
        from the drop-down menu, pick "File | Volume Attributes..."
        change the "OperatingSystem" attribute to "CustomBuild"
        close the object
        in the right pane, delete the Maintenance object
        in the right pane, delete the OpDefault object
        in the right pane, delete the WebHandler object
        in the right pane, delete the WebBrowser object

        add a XttGraph object as child to Op
        set ObjectName to Display2

        open Op object, set attributes:
        UserName  : pwrp
        AutoStart[0]  : Nodes-Pipoc2-Op-Display2
        FastAvail[0]  : Nodes-Pipoc2-Op-Display2
        close the object
        add a Arduino_USB object as child of Pipoc2
        open object, set attributes:
        ObjectName  : Arduino
        close object
        add a Arduino_Uno object as child of Arduino
        open object, set attributes:
        ObjectName  : Uno1
        Device  : /dev/ttyACM0
        BaudRate  : 19200
        close object
        add a ChanAi object as child of Uno1
        open object, set attributes:
        ObjectName  : Ai0
        Number  : 0
        RawValRangeLow  : 0
        RawValRangeHigh  : 1023
        ChannelSigValRangeLow  : 0
        ChannelSigValRangeHigh : 5
        SensorSigValRangeLow  : 0
        SensorSigValRangeHigh  : 5
        ActValRangeLow  : 0
        ActValRangeHigh  : 1023
        close object
        add a ChanDo object as child of Uno1
        open object, set attributes:
        ObjectName  : Do2
        Number  : 2
        close object
        add a ChanDi object as child of Uno1
        open object, set attributes:
        ObjectName  : Di4
        Number  : 4
        close object
        in the center pane, add a $PlantHier object
        set ObjectName to Bakery2
        add a $PlantHier object, child to Bakery2
        set ObjectName to Signals
        add an Ai object as child of Signals
        open object, set attributes:
        ObjectName  : Ai0
        SigChanCon  : Nodes-Pipoc2-Arduino-Uno1-Ai0
        close object
        add a Di object as child of Signals
        open object, set attributes:
        ObjectName  : Di4
        SigChanCon  : Nodes-Pipoc2-Arduino-Uno1-Di4
        close object
        add a Do object as child of Signals
        open object, set attributes:
        ObjectName  : Do2
        SigChanCon  : Nodes-Pipoc2-Arduino-Uno1-Do2
        close object
        add a PlcPgm object as child of Bakery2
        set ObjectName to Plc2
        save changes
        leave edit mode
        right-click Bakery2-Plc, pick Open Program
        using "Bakery2-Plc2"
        enter edit mode
        save changes (there are none - but we need the sub-window to exist)
        leave edit mode
        close the window
        using "PwR VolPipoc, pwrp on pipoc":
        right click Nodes-Op-Display2
        pick "Open Ge..."
        using "PwR Ge display2"
        add one ValueInputMedium object
        add two ValueMedium objects
        note the coordinates for the area to display
        from the drop-down menu, pick "File | Graph Attributes"
        enter the x & y coordinates for display area noted above
        close the object
        double-click the ValueInputMedium object, set attribute:
        Value.Format  : %6d
        close object
        repeat for the first ValueMedium object
        repeat with %6.2f for other ValueMedium object
        View Plant Hierarchy, select Bakery2-Signals-Do2
        press Ctrl key, double-click on ValueInputMedium object
        note: this connects the display object to the target plant signal

        repeat, connect Di4 to ValMed, connect Ai0 to other ValMed

        pick "File | Save"
        close the window
        using "PwR VolPipoc2, pwrp on pipoc":
        from drop-down menu, pick "Functions | Build Node"
        from drop-down menu, pick "Functions | Distribute"
        using "Distributor":
        select rpi2
        from the drop-down menu, pick "Functions | Distribute"
        exit from the Proview development environment (close all windows)

23) use the Arduino

        connect to rpi2 via VNC X window
        restart the runtime:
        sudo service pwr restart
        hint: if problems, then to get some diagnostics:
        cd
        source pwr_stop.sh
        rt_ini -i &
        ps -ef | grep rt
        edit ~./.xtt_start to launch the operator station windows:

            !/bin/bash

        source /etc/pwrp_profile
        $pwr_exe/rt_xtt Nodes-Pipoc2-Op &
        save changes and exit
        double-click the Proview desktop icon
        in Display2, the analog in value will vary slightly due to noise (unless you have connected a pot or some signal to it)
        experiment with the Di and Do values
        finish

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox