04-12-2014 07:17 AM
As titled, I have problem to get reading in the labview from arduino. The block diagram is a shown in the attachment, can anyone please explain what have I done wrong?
From my serial monitor in arduino shows around 2.5v, I have checked with my multimeter as well, it showed 2.5v even when no load is connected. If there is a load connected, the voltage signal will be increased. Thus, the result I'm getting is always 0 as shown in the attachement below.
The baud rate I have changed from 9600 to 115200 to observe any changes to the result. Can anyone figure it out what might be the problem?
04-12-2014 01:04 PM
The hardcoded baudrate for the Arduino Uno is 115200 so this is thet only baudrate that you should use in LabVIEW. Also, what is the value of the orange wire coming from the Analog Read Pin VI?
04-12-2014 08:00 PM
You mean the value from the A0 pin of the arduino right? It should be 2.5v after conversion and raw value is 512.
04-12-2014 09:10 PM
No, I mean in your code, what is the value of the orange wire coming from the Analog Read Pin subVI. I'm proposing that there is something strange wrong with either the conversion to dynamic data or the express VI.
04-12-2014 09:17 PM
Erm, I'm quite new to labview actually, so, may i know how to check the value from the orange wire?
04-12-2014 10:37 PM
You can either add an indicator that you wire to or you can use a probe. Using a probe is probably the best way when you don't need/want an indicator normally. You can simply click on the wire while the VI is running to place the probe. You can find more information about probes in the LabVIEW help or online.
04-13-2014 12:03 AM
Arh, it shows expected result now, I just changed the baudrate in arduino programming code to 115200... hahaha.... However, the value drops to zero when i restart the data acquisition. It becomes normal if I restart the application and reconnect the usb to the computer, any idea on this?
04-13-2014 05:18 AM
What do you mean by "restart the data acquistion"?
04-13-2014 07:11 AM
Click "Stop" followed by "Run".
04-13-2014 03:24 PM
If you are using the abort button (the little stop sign icon near the run button) then that causes issues. When using LIFA (and in many other situations) you should avoid using that button as much as possible. If you do, it will prevent LIFA from shutting down correctly and therefore will prevent LIFA from working correctly the next time that you run your VI.
You should use the stop button that you have for your while loop only. If you do happen to use the abort button, you can open Close.vi, set the correct COM port and run it to release the resources that are being used by LIFA so that you can run your VI again.