DQMH Consortium Toolkits Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with Raspberry Pi

Solved!
Go to solution

Hello,

 

I have a project where I want to use a raspberry pi which seems to not support event structures. Making it an issue for me to use DQMH. 

I was wondering if anyone knows if it’s possible to use DQMH at all? Since I believe the raspberry pi can be thought of as a real time device and from a forum I read real time devices should support event cases. 

Thanks for the help and sorry about the question if this is covered elsewhere, I couldn’t really find a clear answer. 

0 Kudos
Message 1 of 11
(1,757 Views)

I don't know the answer to your question but I would start looking here : https://forums.ni.com/t5/Hobbyist-Toolkit/bd-p/linx-toolkit?profile.language=en


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 2 of 11
(1,720 Views)
Solution
Accepted by topic author VInoob

Some NI Real time devices support user events.  This article helps to understand which ones: Which NI Real-Time Targets Support Embedded UI? - NI

 

Raspberry Pi does not support user interface events.  That is because there is no user interface to a LabVIEW application running on a Raspberry Pi.

 

However DQMH runs fine on RT devices that don't support user interface events.  We have written an application on a Rasp Pi using DQMH.

 

It works fine.  You just can't create user interface events.   Instead, you can create a Windows application that communicates to the Raspberry Pi using TCP or other network interface.  Or you could use G Web Development to create a webpage to communicate with the Raspberry Pi using the Systemlink (Skyline) API.  We have done this with success.

Christopher Farmer

Certified LabVIEW Architect and LabVIEW Champion
DQMH Trusted Advisor
https://wiredinsoftware.com.au

Message 3 of 11
(1,685 Views)

How do you connect to the pi using TCP remote? I am using the Linx toolkit and can control it with local IO option. Whenever I try to do the TCP remote from my pc it gives me an error.

0 Kudos
Message 4 of 11
(1,668 Views)

Use the TCP/IP VIs to create a client server arrangement.  You'd have the Rasp PI running code acting as the TCP/IP server, and then your windows LabVIEW application would be running as the TCP client.  Then you can have the two applications talking to each other.

Christopher Farmer

Certified LabVIEW Architect and LabVIEW Champion
DQMH Trusted Advisor
https://wiredinsoftware.com.au

Message 5 of 11
(1,663 Views)

Thank you for the suggestions. At the time I didn’t understand it, but after thinking about it for a while. I was eventually able to get this to work.

 

On the topic of using DQMH on RPi, can you share a simple project with this in use? 

0 Kudos
Message 6 of 11
(977 Views)

I don't have any free code to share at this time sorry.

 

Have you checked here - there are examples:

Getting Started with Raspberry Pi and LabVIEW Community Edition

 

Also, this post is asking similar questions to yours (but not DQMH related):

Run LabVIEW executable on Raspberry Pi as a GUI/HMI - NI Community

Christopher Farmer

Certified LabVIEW Architect and LabVIEW Champion
DQMH Trusted Advisor
https://wiredinsoftware.com.au

Message 7 of 11
(967 Views)

Chris,

 

When you say DQMH runs fine on RT devices are you using Dynamic Events? or did you replace the events altogether? I know typical RT Devices will work with Event Structures and Dynamic events. But I am not sure there was a definitive answer in this thread for RPi and Dynamic events.

 

I am currently working on a RPi project with a serial touch screen. When working in the IDE and running Debug mode on the RPi, the Dynamic events fire, everything works. once I build and deploy the RTEXE it is basically dead, nothing works. The code is DQMH with Event Structures, the previous code was not DQMH and did not use Events Structures, if the Pi truly does not  support events (specifically dynamic) I will need to step back find the best way to approach a solution. The current solution in place and running has its issues I need to address as well. 

 

 

Jeff D.

Certified Architect LabVIEW Champion DQMH Framework

0 Kudos
Message 8 of 11
(123 Views)

Hi Jeff. 

 

Dynamic events are supported, as in using the Generate User Event.vi works.

 

User interface events (not to be mistaken with the poorly name user events or more accurately dynamic events) are not supported.  As in, you can't press buttons on the front panel and expect an event structure to detect this.  Instead you need to handle user interface events the old fashioned way: Poll for changes on the user interface, ie. wire all buttons up into a boolean array and convert to an integer.  1 = first button pushed. 2 = second button pushed. 4 = third button pushed, etc.

Christopher Farmer

Certified LabVIEW Architect and LabVIEW Champion
DQMH Trusted Advisor
https://wiredinsoftware.com.au

0 Kudos
Message 9 of 11
(119 Views)

Cool, that is what I thought.. next step break down my code and try pieces until I find where it is not working when I build an EXE

 

Yeah, No front panel buttons as events will work, I have removed those form my code, but like I said, it just doesn't run once built so more searching for me.. yay.. LOL

Jeff D.

Certified Architect LabVIEW Champion DQMH Framework

0 Kudos
Message 10 of 11
(114 Views)