Author Topic: AdvancedHMI on a Raspberry Pi  (Read 148194 times)

mdhill

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: AdvancedHMI on a Raspberry Pi
« Reply #105 on: June 22, 2022, 02:03:16 PM »
Afternoon.  I have my Advanced HMI project working on my raspberry Pi using Mono, but I have a question.  On my project,  I have modbus data coming from an Arduino Mega 2560 to the to the raspberry Pi via a single USB cable and using the ModbusRTUCom library to pass the data (/dev/ttyACM0).  I have two displays, but each has a different application on the screen and shares several registers from the modbus data.  Can both programs use the same ModbusRTUCom library to use on the different displays?

Bad Sector

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: AdvancedHMI on a Raspberry Pi
« Reply #106 on: December 25, 2024, 05:39:04 PM »
I wanted to get this working on the Raspberry Debain 12 and had issues with mono-vbnc as it is deperciated and they said to use mono-vbc now, but i'm not sure of interaction between Mono/AdvanceHMI/Debain.
But I was able to get this working using the Raspberry Pi OS (32-Bit) version.
I'll add in the extra step I had to take using example below:
sudo su
ln -s /usr/share/keyrings/raspbian-archive-keyring.gpg /etc/apt/trusted.gpg.d/raspbian-archive-keyring.gpg
rm /etc/apt/trusted.gpg
apt-get update
apt-get install mono-complete
apt-get install mono-vbnc

The extra two steps allow using the mono-vbnc in Debain 12 - likely another way to do this but this got me working.  I'm going to include the links I used to help be able to install this headless and reasoning for extra steps. 
Please let me know if need additional information or I've done something completely wrong, please ;)

https://www.tomshardware.com/reviews/raspberry-pi-headless-setup-how-to,6028.html for headless example, they use different OS but the setup example starting at #9 is good.

https://github.com/RPi-Distro/repo/issues/348 This shows my reasoning and how they suggested to fix for using additional code.

The ML1000 example is in the Sample Programs here.

Thanks,
Bad Sector



Here is how to run an AdvancedHMI application on a Raspberry Pi

1) Download the Debian Wheezy image
http://www.raspberrypi.org/downloads/

2) Copy the image to the MicroSD card using Win32DiskImager
3) Install the card and boot up the Pi
4) When it gets to the configuration screen, set it to expand the image and also to boot to a Graphical User Interface
5) Select Finish in the configuration and Reboot
6) Once booted into the GUI, open a Command Prompt
7) Type these series of commands:

sudo su
apt-get update
apt-get install mono-complete
apt-get install mono-vbnc

8 ) Put in a memory stick with an AdvancedHMI application on it
9) In the command prompt, use the "cd" command to browse to the memory stick to the directory /bin/debug
10) mono AdvancedHMI.exe

In a few seconds the application should start.

There are a few things you may run into.

- You cannot use an OPC server because it is not a .NET application
- The MessageDisplayByValue may stop the application because it uses a speech library. There is a work around. Find System.Speech.DLL on your Windows PC and copy the file into the /bin/debug directory

Bad Sector

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: AdvancedHMI on a Raspberry Pi
« Reply #107 on: December 25, 2024, 08:54:29 PM »
Afternoon.  I have my Advanced HMI project working on my raspberry Pi using Mono, but I have a question.  On my project,  I have modbus data coming from an Arduino Mega 2560 to the to the raspberry Pi via a single USB cable and using the ModbusRTUCom library to pass the data (/dev/ttyACM0).  I have two displays, but each has a different application on the screen and shares several registers from the modbus data.  Can both programs use the same ModbusRTUCom library to use on the different displays?
Try using this post to make it into E/IP Tunnel.  I have a few apps i'm using Micro820 w/ Modbus to 8port I/O Master that I'll test this out over.
https://www.advancedhmi.com/forum/index.php?topic=899.msg19138#new

Bad Sector