05-15-2013 09:52 PM
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.
05-15-2013 11:11 PM
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.
07-25-2013 07:43 AM
I can't complie after add attach file.
How to add attach file to firmware? I'm beginner
Thakkkk!
04-04-2014 02:52 AM
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.
04-07-2014 09:42 AM
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.
04-15-2014 12:41 PM
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.
05-17-2015 01:05 PM
Thank you good sir for the upload! Its a huge help. Any chance I could get a copy of the VIs for LV2010? Cheers
04-19-2016 09:25 PM
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 ,
04-19-2016 10:47 PM
LIFA is old and unsupported. LINX, the new version of LIFA, actually has native support for Serial1, Serial2, and Serial3.
04-20-2016 02:10 AM
don't use lifa but linx plz