LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

What driver do I use for an old Presario laptop running XP for labview and a arduino uno?

Solved!
Go to solution

The Analog Read Pin VI does not contain Arduino Init.

Generally, you shouldn't modify the basic VIs with a hardcoded COM port.  You simply need to add it to the terminal on the Arduino Init VI in your upper level VI.  Also, The place where you say to create a constant should be wired to a control already.

0 Kudos
Message 11 of 22
(1,287 Views)

Hello Nathan,

Are you looking at a different Analog Read Pin VI than I am?  The Analog Read Pin VI on my computer has an Arduino Init sub VI.   There is no control on the front panel of the Analog Read Pin VI for specifing the COM port. Further more the Analog Read Pin VI, Arduino Init sub VI does not have a Visa Resource input terminal.  It is  necessary to drop down to a second level sub VI to specify the VISA Resource.  Which for this application is a COM port.

I agree "Generally, you shouldn't modify the basic VIs with a hardcoded COM port."  But a small percentage of people have reported getting error message 5005.  This error message generally means that Labview can not find the Arduino board.  When this problem pops up Sammy_K recommends hard coding the COM port.  See message number 3 in the "Error 5005 and Windows 7" thread.

Howard

0 Kudos
Message 12 of 22
(1,287 Views)

C:\Program Files\National Instruments\LabVIEW 2011\vi.lib\LabVIEW Interface for Arduino\Low Level\Analog Read Pin.vi  (Version 2.2.078)

Analog Read Pin.png

Also, it baffles me why there would be "Arduino Init" in any function that is, itself, dependent on the Arduino already being initialized.  So, if "Arduino Init" is in any VI that is in a loop, it will try to initialize every iteration.  This can't happen unless it is either closed at the end of the subVI (making it extremely slow) or if "Arduino Init" is excluded if the Arduino is already initialized.

I would love it if you would post your Analog Read Pin.vi, I'm very curious what you have (I have LV2011).

EDIT:

I think you may be thinking about "Arduino Analog Read Pin.vi" which is an example of how to use the "Analog Read Pin.vi".  In that context, you can simply wire the COM port directly to Arduino Init in the block diagram of "Arduino Analog Read Pin.vi".  This statisfies your end goal without modifying the core of LIFA (which could create compatability issues).

If this is true, it explains my bafflement above .

0 Kudos
Message 13 of 22
(1,287 Views)

Yes, all of my references were to the Analog Read Pin VI.  I explicitly use the ttile Analog Read Pin VI in my istructions so readers would know exactly what I was referring to.   Where as I see you are referring to a Low Level Analog Read Pin VI.

I see you are working with Labview SE 2011.  Whereas I am working with Labview SE 2010. This may expalin why your observations are different than mine.

However, I repeat what I said in my previous message.  The Arduino Init sub VI in the Analog Read Pin VI does not have a VISA Resource input terminal. 

hrh1818

0 Kudos
Message 14 of 22
(1,287 Views)

Hi Nathen and Howard

Thanks for all the help!!  All I had to do is create the constant and tell it the (comx port) and every thing started working. I thought I had tryed that but when i did it this time it worked.  mine is running visa so all I had to do was creat the constant on the block VI arduino Int and it runs great.  I even checked the driver for the port and it has a rate of 9500.  I do not know why this workes when all the NIs say 115200. but I don't care as long as it workes. now i can move on and wright other features i need thanks again guys

Larry

redratliff@yahoo.com

0 Kudos
Message 15 of 22
(1,287 Views)

hrh1818 wrote:

Yes, all of my references were to the Analog Read Pin VI.  I explicitly use the ttile Analog Read Pin VI in my istructions so readers would know exactly what I was referring to.   Where as I see you are referring to a Low Level Analog Read Pin VI.

I see you are working with Labview SE 2011.  Whereas I am working with Labview SE 2010. This may expalin why your observations are different than mine.

However, I repeat what I said in my previous message.  The Arduino Init sub VI in the Analog Read Pin VI does not have a VISA Resource input terminal. 

hrh1818

My intentions for this post are to make sure that future readers are correctly informed on this topic.  Hopefully, after reading this post you will see where I'm coming from.

Replace "LabVIEW 2011" with "LabVIEW 2010" to find the files on your computer.  The filenames of the VIs are highlighted in bold.  If you don't see what I'm trying to say then I would appreciate if you could post the full file path of the VI to which you are referring (File > VI Properties OR Ctrl+I).

C:\Program Files\National Instruments\LabVIEW 2011\vi.lib\LabVIEW Interface for Arduino\Palette Examples\Analog Read Pin Example.vi

and

C:\Program Files\National Instruments\LabVIEW 2011\examples\LabVIEW Interface for Arduino\Arduino Analog Read Pin.vi

Analog Read Pin Example.png

Notice that Init.vi (labeled as 1 above) will always have a terminal for the VISA resource.  Wire "COMx" constant here.


C:\Program Files\National Instruments\LabVIEW 2011\vi.lib\LabVIEW Interface for Arduino\Low Level\Analog Read Pin.vi

Analog Read Pin.png

0 Kudos
Message 16 of 22
(1,287 Views)

Hello Nathan,

It is obvious now why we disagreed about how to fix a 5005 error.  National Instruments changed Arduino Init.VI when they releaseed the 2011 version of LIFA.   I uploaed a couple of screen shots of the context help dialog for the 2010 version of Aerduino Init.VI.  The screen shots are in the  Labview 2010 SE Arduino Init.VI Context Help

thread. 

Conclusion your method works for the 2011 veesion of LIFA and my method works for the 2010 version of LIFA.

hrh1818

0 Kudos
Message 17 of 22
(1,287 Views)

That is strange.  Now I'm really curious why your VI differs.  What version of LIFA are you using?  I use version 1.3.0.26 (which was released for LV 2009) and the current version is 2.2.0.78.

0 Kudos
Message 18 of 22
(1,287 Views)

VI package manager says Version 2.2.0.78.  This is what the VI package manager installed when I installed LIFA on this computer during the summer of 2012.

hrh1818

0 Kudos
Message 19 of 22
(1,287 Views)

Could you post your "Init.vi" and your "Auto Detect Arduino.vi"?

0 Kudos
Message 20 of 22
(1,287 Views)