LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

LIFA - Ethernet

Hey all,

I recently got LIFA working over ethernet and I'm super excited about it.  I want to get the code out to the community but I am not sure how...  I tried zipping up my LIFA VI's but it is ~110 MB, and the limit is 75MB.  So I was wondering, what would be the best way to get my code to the community?

Also, I've added a custom VI's to set analog pins as digital outputs and to write to them.

As of right now, I have servos, digital read and write, and analog read and write working.  I believe the rest of the functions should work.  I've just looked into the communications side of things. 

Matt

Message 1 of 56
(30,974 Views)

Perhaps DropBox might be an option until a better solution can be found.

Sounds like a very interesting setup you have.  I look forward to taking a look at the code.

Todd

0 Kudos
Message 2 of 56
(9,594 Views)

Can I access drop box from here?  Ideally I'd like to upload everything in 1 solid chunk and give the ethernet a new name, like LIFA-Ethernet. 

I got rid of serial communications to labview and made ethernet only.  There are still serial communications that occur between the arduino and its envornment for debugging purposes.

Matt

0 Kudos
Message 3 of 56
(9,594 Views)

I think you should be able to upload your file(s) to a directory on a free DropBox account, and then share that directory ( careful - ONLY that directory ) publically, and post a link here.  That should work.

0 Kudos
Message 4 of 56
(9,594 Views)

Hello all!

I've been busy, but I finally got my code up on drop box.  You can find it here: http://dl.dropbox.com/u/60210515/LIFA_Ethernet.zip

Inside there will be 4 folders. 

"Arduino Servo Folder" and "examples" - basic examples from the original LIFA

"LIFA_BASE_Ethernet" - the Arduino code

"vi.lib" - contains all the support vi's for LIFA.

NOTE.  This is ethernet ONLY!  I modified all the serial LIFA code in order to get ethernet communications working. 

I believe these are the steps that will be needed to get ethernet working, but I am not 100% sure.  I'm not too good with LV, so I'm assuming overwriting the old vi.lib SHOULD do the trick.

1) back up the current LIFA vi.lib folder found in NI's path (so you can still have serial communications)

2) copy and paste the LIFA - ethernet vi.lib folder from the zip file to the NI's LIFA

3) upload the LIFA_BASE_Matt.ino file to your Arduino (This will set your arduino to 192.168.0.231)

4) run examples.

The Init file should find anything that starts with "192.168.0"

I add two features to the LV code.  They are set analog pin and write analog pin.   You can set an analog pin to a digital output if need be.  A0 is actually D14.

I currently have a program which runs 2 servos, has 4 digital output, 2 analog output, and 3 analog input. I've worked on my code and it takes ~5msec to turn on and then off a digital pin.  (digital write high -> digital write low).

If you recieve an error, restart the Arduino before loading up Labview code.  Sometimes LV times out and the Arduino still thinks there is a client connected to it after an error occurs. 

If you can't get the Init block to work, use MAX to create a raw socketed Ethernet connection with the socket being set to 80.  Then, feed that VISA into the Init block. 

That sums up things.  I hope you guys can get it working.

Matt

0 Kudos
Message 5 of 56
(9,594 Views)
  • You should create your own LabVIEW Library (.lvlib) for this so that you don't have to change LIFA at all.
  • Save all your files for LabVIEW 2009 so that they will be available to more people.
  • The folder that contains the Arduino file must have the same name as the base .ino file (according to my Arduino IDE).  So, you should change LIFA_Base_Matt.ino to LIFA_Base_Ethernet.ino.
0 Kudos
Message 6 of 56
(9,594 Views)

https://dl.dropboxusercontent.com/u/60210515/LabVIEW%20Interface%20for%20Arduino%20-%20Ethernet%20Fo...

I believe I updated everything correctly to Nathan_B's suggestions.

Matt

Message 7 of 56
(9,594 Views)

Hello

I´m working in a student project, we are starting with LV and arduino. I'm very interested in Ethernet possibilities, but, I'm afraid I'm using 2009 LV version. Could you help me?

Thank you

Carlos

0 Kudos
Message 8 of 56
(9,594 Views)

Carpi,

I forgot to get back to you a while ago, but I've tried to get the code to 2009 LV, and I received a message stating that it can't be create in 2009 LV.  I believe some of the code I wrote is not backwards compatable for LV 2009.  If someone else has gotten it to work with LV 2009 and would post the link, that would be awsome.

Thanks,

Matt

0 Kudos
Message 9 of 56
(9,594 Views)

Hello Uke88,

I can't find library "Copy of LabVIEW Interface for Arduino - Ethernet.lvlib" from your folder.zip. Can you share it.

Thanks,

Martas

0 Kudos
Message 10 of 56
(9,594 Views)