LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview interface for Arduino: Why can't display two digital signal waveform once

Hello,

I try to read two digital signal, then, display two waveform chart at the same time.

But, only one waveform is displayed once, nothing displayed on another waveform chart.

I am very confused.

Download All
0 Kudos
Message 1 of 9
(5,776 Views)

Unfortunately, we can't help you without the VI.  Please attach the VI to your next post.

0 Kudos
Message 2 of 9
(4,352 Views)

Hello Nathan,

Thanks for your attention. I have attached my VI.

0 Kudos
Message 3 of 9
(4,352 Views)

Because you have every input as a control (as opposed to a constant), I can't tell what any of your settings are or what pins you are trying to read.  Also, even though all digital pins are supposed to default to inputs, you might try to set the pins' modes to input befor the while loop.

In addition to knowing what settings you are using, it would help if you state which Arduino you are using.

0 Kudos
Message 4 of 9
(4,352 Views)

I am using Arduino Mega2560.

Baud Rate: 115200

USB/Serial

Bytes Per Packet:15

Any two digital pins: for example: Pin2 & Pin3

And what I am doing is to use sensor reading high-speed continuous and periodical signal, then output digital signal,

displaying waveform by Labview.

0 Kudos
Message 5 of 9
(4,352 Views)

You must use a baudrate of 9600 with the Arduino Mega 2560.  Also, what is the frequency of your signal?  If it's too high of frequency, then it won't be possible to acquire the waveform accurately.

0 Kudos
Message 6 of 9
(4,352 Views)

I adjust my signal frequency to 550HZ, but I still can't get a accurate waveform.

And why is 9600? Is it setted in LIFA_base?

Thank you very much.

By the way, can you tell me the maximum frequency of signal can be acquired accurately using Mega 2560 theoretically?

0 Kudos
Message 7 of 9
(4,352 Views)

The default baud rate (and the only one that I've ever been able to get to work) for the Arduino Mega 2560 is 9600 (and is hard coded into the firmware).  So, you have to use 9600 for the baud rate of the Init.vi.

About the signal.  What is this signal for?  What physical phenomenon is the signal representing?  Are you needing it to be accurate?  How accurate?  The serial communication between LabVIEW and the Arduino will slow down the data acquisition rate.  So, if you add any other LIFA VIs, it will slow down even more.  It is also dependent on everything else running on  your computer.

0 Kudos
Message 8 of 9
(4,352 Views)

Generally speaking, I want to get the phase difference between two signal (the same frequency).

The sensor is hall effect sensor (magnet sensor). As you see, in the attached file-screenshot, the signal exists clearly delay even though I adjust to a low frequency(550HZ). Hence, it is difficult to get a accurate phase difference with the heavy delay. In addition, sometimes, the waveform has a distortion.

0 Kudos
Message 9 of 9
(4,352 Views)