Home
Help
Search
Login
Register
AdvancedHMI Software
»
General Category
»
Support Questions
»
Raspberry Pi
« previous
next »
Print
Pages: [
1
]
2
Author
Topic: Raspberry Pi (Read 6529 times)
reveal
Newbie
Posts: 7
Raspberry Pi
«
on:
September 08, 2015, 08:21:35 PM »
Hello everyone,
This is the first time playing with a RPi and AHMI and so far I am enjoying it but am a little hung up. Is there any way to use AHMI and the Pi without having a PLC? As in only using the GPIO? I am only playing with a couple SSR's and temp sensors so a PLC seems a little extreme. Be easy guys I'm brand new.
Thanks in advance.
Logged
Archie
Administrator
Hero Member
Posts: 5322
Re: Raspberry Pi
«
Reply #1 on:
September 08, 2015, 08:54:37 PM »
See this thread, it may be the same thing you are looking for:
http://advancedhmi.com/forum/index.php?topic=932.0
Logged
reveal
Newbie
Posts: 7
Re: Raspberry Pi
«
Reply #2 on:
September 08, 2015, 09:02:58 PM »
Thanks for the fast reply Archie,
I have read through that already, it is different than I want. I would like to control the Pi using only a touchscreen and AHMI and have the Pi do the functions of a PLC as well as a computer, not tied to any other computer.
I have a feeling Im using the wrong terminology.
Logged
Godra
Hero Member
Posts: 1447
Re: Raspberry Pi
«
Reply #3 on:
September 08, 2015, 09:24:10 PM »
I don't own a Pi but see it as just another computer and will use common sense for the following suggestions:
For AHMI project you need to put a driver on the form but you don't have to use it (this should allow the project to build properly and the driver be used as a default driver for any AHMI control that you might place on the form afterwards).
For any AHMI control that you place on the form you don't have to populate its PLCAddress fields but can always call its Value property, or some other PLCAddress bound property, from within a code and assign some value to it (see the attached picture for examples underlined in red).
Instead of using some AHMI controls you can just choose equivalent VisualStudio control, examples would be VS Label control instead of AHMI's BasicLabel or VS Button control instead of AHMI's BasicButton, etc.
Once the project is finished then just load it onto the Pi.
All together, you don't need a PLC at all in order to use AHMI project but will need to know of how to code certain events.
Any suggestions/corrections from other forum users are definitely welcome.
Logged
Archie
Administrator
Hero Member
Posts: 5322
Re: Raspberry Pi
«
Reply #4 on:
September 08, 2015, 09:34:40 PM »
This won't be easy by any means, but you could modify the SimulatorCom driver and attempt to integrate the PiSharp library into it.
Logged
reveal
Newbie
Posts: 7
Re: Raspberry Pi
«
Reply #5 on:
September 08, 2015, 09:49:29 PM »
you guys are great. I just think that my pants are way too small and too new for this job haha
Logged
Godra
Hero Member
Posts: 1447
Re: Raspberry Pi
«
Reply #6 on:
September 09, 2015, 01:16:36 AM »
Don't give up yet.
Which physical pins are you using for inputs and which for output?
I have managed to run the simulator and demo programs provided on Pi# page.
Might be able to create a small test program in AHMI that you could try on your Pi (no promises here).
Logged
reveal
Newbie
Posts: 7
Re: Raspberry Pi
«
Reply #7 on:
September 09, 2015, 11:39:20 AM »
I was planning on using physical pins 11 , 13 ,15 ,and 16 for the outputs and 18, and 22 for the input signals. That I believe is GPIO 0 ,2 ,3 ,4 ,5 ,and 6 respectfully. This is my first project so I am just stuck all around.
Logged
Godra
Hero Member
Posts: 1447
Re: Raspberry Pi
«
Reply #8 on:
September 09, 2015, 12:46:42 PM »
Since I don't own a Pi, will have to rely on the Internet. Here is the pinout that I 'm looking at:
https://superpiboy.files.wordpress.com/2014/07/raspberry-pi-rev2-gpio-pinout.jpg
Will you be able to control the state of the input pins and also see the state of the output pins?
Maybe setup similar to this:
http://computers.tutsplus.com/tutorials/learn-how-to-use-raspberry-pi-gpio-pins-with-scratch--mac-59941
Hopefully by the end of today I might have a small program that you could try.
Logged
reveal
Newbie
Posts: 7
Re: Raspberry Pi
«
Reply #9 on:
September 09, 2015, 12:59:24 PM »
Thanks a bunch Godra.
That is the GPIO pinout for the old raspberry pi. The raspberry pi 2 has this pinout.
http://www.raspberry-pi-geek.com/var/rpi/storage/images/media/images/raspib-gpio/12356-1-eng-US/RasPiB-GPIO_lightbox.png
Logged
Godra
Hero Member
Posts: 1447
Re: Raspberry Pi
«
Reply #10 on:
September 09, 2015, 05:59:56 PM »
The PiSharp seems to be designed for old raspberry Pi but I don't see a reason why it shouldn't work with Pi 2.
Here is the link for a complete solution to test Pi pins (see the attached picture for what the program looks like):
https://www.dropbox.com/s/93o2vaafj9uzep0/AdvancedHMIBetaV399%20-%20RPi%20Test.zip?dl=0
You should just take the Debug folder and try it on your Pi.
If you don't get any errors then when the screen shows up press the button to start the test (press it again to stop the test).
If input pins are currently "low" then all the output pins should be "high" and indicator lights on AHMI screen should change the color to red (if you don't have LEDs connected to outputs then just get a voltmeter and measure the voltage).
If either input pin gets "high" the corresponding pair of outputs should go "low".
«
Last Edit: September 10, 2015, 03:52:44 PM by Godra
»
Logged
Godra
Hero Member
Posts: 1447
Re: Raspberry Pi
«
Reply #11 on:
September 10, 2015, 03:54:47 PM »
The solution has been changed since it was originally posted yesterday (re-download it if necessary).
This time it is using a timer instead of a background thread and it shows to be stable when I test it with the Pi simulator.
Logged
reveal
Newbie
Posts: 7
Re: Raspberry Pi
«
Reply #12 on:
September 15, 2015, 01:14:21 PM »
Godra thanks you for the replies I have been a bit tied up. I am working on it right now and I will get back to guys when I have some updates.
Logged
Godra
Hero Member
Posts: 1447
Re: Raspberry Pi
«
Reply #13 on:
September 15, 2015, 03:00:22 PM »
You should also check this topic
http://advancedhmi.com/forum/index.php?topic=932.0
since Aviraj has been trying to test the solution as well.
Logged
reveal
Newbie
Posts: 7
Re: Raspberry Pi
«
Reply #14 on:
September 15, 2015, 03:03:49 PM »
I have been following that as well. I cant even get the test stuff to open on any machine. Im not giving up though
Logged
Print
Pages: [
1
]
2
« previous
next »
AdvancedHMI Software
»
General Category
»
Support Questions
»
Raspberry Pi