annuler
Affichage des résultats de 
Rechercher plutôt 
Vouliez-vous dire : 

combine Arduino and sound card in Labview

Hi,

I have a project that needs me to acquire signals by Arduino Uno and PC sound card. I have tested them and both of them work well separately. But when I want to put the two programs into one program, an error happens. It shows 

1.png

 

I don't know what's wrong and can't solve it. Can anybody help me?

Here is my file.

0 Compliments
Message 1 sur 5
2 963 Visites

LIFA has long since been deprecated and replaced with LINX

 

Since I do not have LIFA (or LINX) installed in LV2018 I disabled that part of your code and the ran the sound card capture section of your code by itself, and it runs fine for me.

 

Try replacing your LIFA code with LINX and see if it makes a difference.

========================
=== Engineer Ambiguously ===
========================
0 Compliments
Message 2 sur 5
2 936 Visites

Thank you for your advice, but my supervisor asked me to use LIFA instead of LINX. So I have to do it only using LIFA.

0 Compliments
Message 3 sur 5
2 930 Visites

Try separating the Arduino code and the audio code into two separate loops. You mentioned both bits of code work on their own, so my best guess is that the sound card isn't being read fast enough, probably because the Arduino portion of code is running too slowly for the sound input read VI.

 

You could also try increasing the number of samples/ch when setting up the sound device (say 10k, 50k, or 100k), but I'd start with the separate loops first.




Certified LabVIEW Architect
Unless otherwise stated, all code snippets and examples provided
by me are "as is", and are free to use and modify without attribution.
0 Compliments
Message 4 sur 5
2 911 Visites

Thank you for your advice! I have tried your method and found only if using the sampling frequency for both Arduino and sound card can work.

0 Compliments
Message 5 sur 5
2 870 Visites