LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

LIFA Data Monitoring with LCD Screen

Hey guys, I'm currently using LIFA firmware to build a data monitoring system, I having 3 sensors used on pin A0, A1, A2 on my arduino and two digital output 3 & 11(PWM) to control my relay and motor. All these pins didn't interfere with the LCD keypad sheild I bought as it only uses pin 4,5,6,7,8,9 and 10 of the digital i/o pins. I was planning to display the frequency value of my DC motor on my LCD keypad shield using LIFA. But somehow when I tried to run the software the system seems to overlaps with my analogue pins and encounter an error.

Does anyone have the configuration of LIFA for data monitoring on LCD screen? will be much appreciated.

#image below was the LCD shield i use to intergrate with my arduino

http://www.vetco.net/catalog/images/VUPN5787-1.jpg

0 Kudos
Message 1 of 10
(5,463 Views)

Does reading the analog sensors alone work?  Does writing to the LCD alone work?  What do you mean by "the system seems to overlaps with my analogue pins and encounter an error"?  What is the error?  Could you please attach your VI?

0 Kudos
Message 2 of 10
(3,896 Views)

overlaps means that, whatever words or numbers of string I key into the LCD display box, the analogue read value will increase to like 60, 200, 360 or so..i tried on all analogue pins..it act the same..

0 Kudos
Message 3 of 10
(3,896 Views)

anyway, did anyone here uses lcd screen shield and analogue pin for sensor reading on any LIFA project? Would like to refer if you guys got it work...

0 Kudos
Message 4 of 10
(3,896 Views)

You cannot branch the Arduino Resource wire (the pink wire).  All LIFA VIs must be inline and there must only be a single Close VI.

Also realize that when you have an event structure without a timeout value, it will not allow the loop to execute.  It will block the code from running until a registered event happens.  This means that the analog value will only retrieved once, each time that the event stucture executes.  So, if you put a timeout value of like 5 ms, the loop will run every 5 ms while you are not changing the LCD text.

0 Kudos
Message 5 of 10
(3,896 Views)

I still dont quite get it.. How do i add timeout for this lcd display? I tried to run the lcd only once in my vi, just to display the starting words, but it still interrupt my analogue reading input for all the analogue pins..

I attached my VI file here, hopefully you can check for me what's the problem..

0 Kudos
Message 6 of 10
(3,896 Views)

In this version of the VI, the LCD code has no effect on the analog reading code.

What is the expected frequency of your analog signals?

0 Kudos
Message 7 of 10
(3,896 Views)

But my analogue value tends to go up to 60V ~ 200V when I run the VI with LCD screen mode. Eventhought the reading value on my A0~A2 was less than 5V...

0 Kudos
Message 8 of 10
(3,896 Views)

I think there might be a bug in the LCD VIs.  If LINX had support for the LCD, I would recommend that but unfortunately, it doesn't.

I think I've seen someone try to flush the serial buffer after doing the LCD stuff.  If that doesn't work then I don't know what to say.

You didn't answer my question before about if you were able to get all the analog input stuff working (alone; without any LCD stuff).  I would check that to see if there isn't something more fundamental causing the strange behavior.

0 Kudos
Message 9 of 10
(3,896 Views)

Yup, my analogue reading working well without the implementation of LCD Screen, once i attach lcd module into my vi the analogue read become overlaps.

0 Kudos
Message 10 of 10
(3,896 Views)