LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview with Raspi and Analog-Digital MCP 3008

Guten Tag

Ich bin Student an der HF Technik Schweiz und muss ein LabVIEW-Projekt auf dem Raspberry PI 4 umsetzen. Dabei muss ich mit einem Analogmodul MCP 3008 arbeiten. Jedoch erreiche ich den Punkt nicht, dass ich im LabVIEW den benötigten Analogwert lesen und auswerten kann. Ich bitte sie um eine Hilfestellung, damit ich meine Projekt erfolgreich abschliessen kann.

Anbei den Link zur verwendeten Analog-Digital Wandler:
Bodenfeuchtigkeit mit dem Raspberry Pi messen (tutorials-raspberrypi.de)

Besten Dank im Voraus
Freundliche Grüsse
Raphael Kessler

 

Hello everybody

I am a student at HF Technik Schweiz and have to implement a LabVIEW project on the Raspberry PI 4. I have to work with an analog module MCP 3008. However, I do not reach the point that I can read and evaluate the required analog value in LabVIEW. I ask for help so that I can successfully complete my project.

Here is the link tho the mentioned module:

Bodenfeuchtigkeit mit dem Raspberry Pi messen (tutorials-raspberrypi.de)

 

Thank you in advance
Kind regards
Raphael Kessler

0 Kudos
Message 1 of 8
(1,293 Views)

What have you tried so far? Where are you stuck? Did you get the python example to work?

0 Kudos
Message 2 of 8
(1,261 Views)

I tried do read the analog input by using the spi ports. But i don‘t know how to connect all the inputs and outputs in labview. I always get an Error 54 on my error cluster, cause not all pins are connected in labview. Maybe someone got an example for me ? 

the python script works well.

0 Kudos
Message 3 of 8
(1,256 Views)

@Raphi123456789 wrote:

I tried do read the analog input by using the spi ports. But i don‘t know how to connect all the inputs and outputs in labview. I always get an Error 54 on my error cluster, cause not all pins are connected in labview. Maybe someone got an example for me ? 

the python script works well.


It's good to hear that you have a reference test case that works. I am a bit confused by what you mean by "pins", "inputs" and "outputs", these seem ambiguous in this context. I also have little experience with SPI and LabVIEW on the RPI. Looking at your module https://github.com/doceme/py-spidev seems to indicate that there is some tweaking and fiddling involved to get SPI working.

 

As a fallback, you could also just call your python scripts from LabVIEW: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019WHGSA2

 

I you want to share some code, consider a snippet: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000x2PkCAI

 

0 Kudos
Message 4 of 8
(1,239 Views)

I mean the „pins“ at the SPI block in labview called „data“, „baudrate“ and more.

It would be pretty helpfull if you share an example of a program in labview. 
I can send a snipped of my program, but i dont know if this would help.

thanks 

0 Kudos
Message 5 of 8
(1,231 Views)

@Raphi123456789 wrote:

I mean the „pins“ at the SPI block in labview called „data“, „baudrate“ and more.

It would be pretty helpfull if you share an example of a program in labview. 
I can send a snipped of my program, but i dont know if this would help.

thanks 


You can use the Help menu to get example programs. You can also try opening the context help menu (Ctrl+H), hover over an element and click the link for extended help in the help window. If you want to try the route where you call a python script, try the System Exec VI https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000YGivCAG

 

I also entered "SPI" and "raspberry" in the forum search bar and came up with a few results, maybe these can help you? Maybe you are using LabVIEW FPGA?

0 Kudos
Message 6 of 8
(1,219 Views)

Im totally at my limits. cant read an analog value.

i tried so much but i always get an error.

 

0 Kudos
Message 7 of 8
(1,189 Views)

That looks like the LINX toolkit. I cannot help you with that, but there is documentation at https://www.labviewmakerhub.com/doku.php?id=learn:tutorials:libraries:linx:start and a forum at https://forums.ni.com/t5/Hobbyist-Toolkit/bd-p/linx-toolkit?profile.language=en

 

If you don't get it to work in native LabVIEW, using the system call vi might still be an option.

0 Kudos
Message 8 of 8
(1,156 Views)