04-01-2014 07:05 AM
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.
04-01-2014 10:32 AM
Unfortunately, we can't help you without the VI. Please attach the VI to your next post.
04-01-2014 10:47 AM
Hello Nathan,
Thanks for your attention. I have attached my VI.
04-01-2014 11:17 AM
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.
04-01-2014 01:41 PM
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.
04-01-2014 01:56 PM
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.
04-01-2014 02:29 PM
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?
04-01-2014 02:35 PM
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.
04-01-2014 03:04 PM
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.