Popular Post jdieringer Posted November 4, 2015 Popular Post Report Share Posted November 4, 2015 (edited) I had a LabVIEW user group meeting last week talking about embedded platforms and when I got home I saw the Intel Edison collecting dust on my desk: Since it is x86, I thought I would try to deploy a Linux LabVIEW executable to the Edison and run it in the Run Time Environment. Here is what I did: 1) Install Ubilinux, based on Debian Linux, from: https://learn.sparkfun.com/tutorials/loading-debian-ubilinux-on-the-edison 2) Install xvfb, a virtual framebuffer display server (no video on this device), fluxbox display manager and x11vnc: apt-get install xvfb fluxbox x11vnc xterm 3) Install the prereqs for the LabVIEW RTE (this was already installed with the above, but good to check): apt-get install libxinerama1 libgl1-mesa-glx 4) Download the RTE and unzip it, I put it in /home as /root gets pretty full wget http://ftp.ni.com/support/softlib/labview/labview_runtime/2014/Linux/LabVIEW2014RTE_Linux.tgz tar zxvf LabVIEW2014RTE_Linux.tgz 6) the RTE is an rpm and we need deb so get alien: apt-get install alien 7) convert the rpm to deb (this takes a while): alien -k -c labview-2014-rte-14.0.0-1.i386.rpm 8) Install the RTE: dpkg -i labview-2014-rte_14.0.0_1.i386.deb 9) Install some missing fonts: apt-get install xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic ttf-mscorefonts-installer At this point, I compiled the "UDP sender" from the examples using LabVIEW for Linux 2014 with my desktop hardcoded as the destination IP address. I copied the executable over to the Edison, ran it as follows: xvfb-run ./send and a few seconds later on my desktop: I am getting UDP packets from my Edison to my host computer sent from a LabVIEW application! I was pretty excited by this. At this point, I decided that I wanted to see if I could get a GUI running. I started up a virtual display and launched fluxbox using: Xvfb -screen 0 800x600x16 -ac & DISPLAY=:0 fluxbox & And from a linux VM, I created a SSH tunnel and started a VNC connection ssh -l root -L 5900:localhost:5900 192.168.222.90 'x11vnc -localhost -display :0' vncviewer localhost I was greeted with a desktop so I launched a terminal and executed the send program. Here is the result: So there you have it, LabVIEW executables running on a headless Intel Edison with remote desktop support. Oh, and once the VI is running from the remote desktop, you are free to disconnect and reconnect without terminating the running VI. As to resource usage, I show while running everything: root@ubilinux:~# free -h total used free shared buffers cached Mem: 960M 174M 786M 0B 9.0M 100M -/+ buffers/cache: 64M 896M Swap: 0B 0B 0B htop: 1 [##** 9.6%] Tasks: 35, 12 thr; 1 running 2 [##*** 12.7%] Load average: 0.15 0.20 0.11 Mem[|||#**** 65/960MB] Uptime: 00:07:25 Swp[ 0/0MB] PID USER PRI NI VIRT RES SHR S CPU% MEM% TIME+ Command 2018 root 20 0 16132 5428 2772 S 5.0 0.6 0:19.94 x11vnc -localhost 2047 root 20 0 4380 1580 1204 R 5.0 0.2 0:00.83 htop 2033 root 20 0 120M 39620 27756 S 5.0 4.0 0:16.89 ./send 1987 root 20 0 52136 14608 5016 S 3.0 1.5 0:17.00 Xvfb -screen 0 80 2016 root 20 0 12540 6300 2436 S 0.0 0.6 0:02.85 sshd: root@notty 1 root 20 0 2200 716 616 S 0.0 0.1 0:00.81 init [2] 202 root 20 0 2540 1108 716 S 0.0 0.1 0:00.28 udevd --daemon 360 root 20 0 2536 816 428 S 0.0 0.1 0:00.01 udevd --daemon 366 root 20 0 2536 820 428 S 0.0 0.1 0:00.00 udevd --daemon 1552 root 20 0 5760 1424 1040 S 0.0 0.1 0:00.14 /sbin/wpa_supplic 1752 root 20 0 27916 1680 1116 S 0.0 0.2 0:00.17 /usr/sbin/rsyslog 1754 root 20 0 27916 1680 1116 S 0.0 0.2 0:00.01 /usr/sbin/rsyslog 1755 root 20 0 27916 1680 1116 S 0.0 0.2 0:00.01 /usr/sbin/rsyslog 1747 root 20 0 27916 1680 1116 S 0.0 0.2 0:00.23 /usr/sbin/rsyslog 1801 root 20 0 2424 608 520 S 0.0 0.1 0:00.00 /usr/sbin/udhcpd 1837 ntp 20 0 5304 2020 1572 S 0.0 0.2 0:00.11 /usr/sbin/ntpd -p F1Help F2Setup F3SearchF4FilterF5Tree F6SortByF7Nice -F8Nice +F9Kill F10Quit The VI is using about 5% CPU as well as 5% on the the VNC server and 3% on the virtual framebuffer. Here is the disk usage: root@ubilinux:~# df -h Filesystem Size Used Avail Use% Mounted on rootfs 1.4G 1.3G 78M 95% / /dev/root 1.4G 1.3G 78M 95% / devtmpfs 480M 0 480M 0% /dev tmpfs 97M 300K 96M 1% /run tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 193M 0 193M 0% /run/shm tmpfs 481M 12K 481M 1% /tmp /dev/mmcblk0p7 32M 5.3M 27M 17% /boot /dev/mmcblk0p10 1.3G 125M 1.2G 10% /home It's pretty tight, you will definitely run out if you do not do the RTE installation from /home. As to IO, I have not played much with doing anything with the IO ports, that's next on my list. I wanted to share my progress so far and get people's feedback. Thanks Jon Edited November 4, 2015 by jdieringer 12 Quote Link to comment
VDB Posted November 4, 2015 Report Share Posted November 4, 2015 Great job! Guess I need to dust of my Edison as well... Quote Link to comment
venugopal Posted November 5, 2015 Report Share Posted November 5, 2015 great job, can you share the docs of the board so that ill plan to purchase Quote Link to comment
JoeWang2015 Posted December 29, 2015 Report Share Posted December 29, 2015 Hello : Could you explain more on that following session: At this point, I compiled the "UDP sender" from the examples using LabVIEW for Linux 2014 with my desktop hardcoded as the destination IP address. I copied the executable over to the Edison I did not catch up that session? Many thanks. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.