LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

LIFA Serial

Sure send it, I'll patch in a VI that will deliver the string as soon as it's received.  1 question, is the string you receive always 12 characters?

Edit: So I reviewed the device datasheet and it looks like what it sends is this:

0x02, 5 data bytes, 1 checksum byte, 0xDA, 0x03

OR in Ascii:

STX, 10 data characters, 2 checksum characters, \r, \n, ETX

Since it's well formatted, it'll be easy to recognize and return this the moment it's received.

0 Kudos
Message 21 of 35
(2,055 Views)

OK I put together a VI, give this a try. It's a blocking VI (meaning it will run until it gets a valid ID or an error with no timeout).  If you need a timeout or something let me know.

https://dl.dropboxusercontent.com/u/17275536/Read%20RFID%20Tag.vi

What it does is this:  Reads all available data as a byte array, looks for the 0x02 character that begins the device data, if found it takes 9 bytes total starting with the start character and passes them out where a subarray function pulls out bytes 1:6 (data and checksum) and turns them into a 12 character string,  It will continue to add to the array if it receives only half of the array so that you don't miss anything and it reads at maximum speed with no delays built in so it should return as soon as it gets an ID.

Hope this helps.

0 Kudos
Message 22 of 35
(2,055 Views)

I can't complie after add attach file.

How to add attach file to firmware? I'm beginner

Thakkkk!

0 Kudos
Message 23 of 35
(2,055 Views)

hello sir,

i want to use  LIFA_BASE and upload it in my arduino but i am getting

some compiling errors .

LIFA_Base.cpp.p: In function 'loop':

C:\Program Files (×86)/LIFA_Base.ino.......

Pls can u explain what all files should be opened in arduino.

All the files open except keywords, IRemote license and a folder named

LabVIEWInterface.

I even tried adding  LabVIEWInterface sketch . So I had LIFA_Base,AF

Motor,AF Motor.h, AccelStepper.cpp,AccelStepper.h,IRemote.cpp,

IRemote.h, LabVIEWInterface.

After compiling this I got:

LabVIEWInterface. Ino:In function ' int checkForCommand()':

LabVIEWInterface:97:'bufferBytes' was not declared in this scope.

Awaiting your reply in anticipation.

0 Kudos
Message 24 of 35
(2,055 Views)

gilda,

All that was included in the original post is the text of a command to add serial/UART interface functionaliity to LIFA_BASE.

I would suggest downloading a copy of LIFA and compiling.  Once you have that working, simply add the text included in the original post to the case statement within the processCommand function in LabVIEWInterface.  The included VIs provide interface functionality with the added serial function.  I have tested and utilized this code in the past.

If you are not able to get an unmodified version of the LIFA firmware compiled on your Arduino, I would encourage you to start there.

0 Kudos
Message 25 of 35
(2,055 Views)

Thank you sir ,

I am extremely sorry for reverting late but was unable to revert because of unavoidable circumstances.

I will try the method that u suggested .as of now I tried using FTDI cable to interface the rfid  reader  and used the VISA function.

Thanks once again.

0 Kudos
Message 26 of 35
(2,055 Views)

Thank you good sir for the upload! Its a huge help.  Any chance I could get a copy of the VIs for LV2010? Cheers

0 Kudos
Message 27 of 35
(2,055 Views)

Hi crlanglois,

     i want to ask , is that u modify command.ctl to send more 0x40, 0x41,0x42,0x43 to control init , send, read and end serial

? how can i modify command.ctl to add more such as 0x50,0x51... to control serial 2 in Mega ,

0 Kudos
Message 28 of 35
(2,055 Views)

LIFA is old and unsupported.  LINX, the new version of LIFA, actually has native support for Serial1, Serial2, and Serial3.

http://www.labviewmakerhub.com/linx

0 Kudos
Message 29 of 35
(2,055 Views)

don't use lifa but linx plz

0 Kudos
Message 30 of 35
(2,055 Views)