From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

RFID Reader - Labview communication

Hello guys,

 

i am currently working on the RFID chafon 6m UHF reader/writer. I have all the documentation related to the reader like the .dll files, functions and demo software for the reader. I am using a serial to USB converter to connect to my PC, i have downloaded the necessary drivers for the converter, launched the reader's software and its working fine. However, i am having trouble communicating with the reader using Labview. I tried using call functions for the .dll files but didn't quite know how to work with it. I then switched to using NI-VISA. In MAX i can see the serial port and says " device working properly" so i went ahead and built a VI that configures the parameters of the reader such as baud rate, stop bit, number of bits, etc.. and i used VISA write vi to send a command such as 0x21 which calls the reader's information then wired that to the VISA read vi with a property node that gets the number of bits between both the write and read VIs and finally converted that to a string, but it returns 0 bits and an empty string.

Is there a way to tell the reader than i want to perform a specific action and read the output?

 

Thank you,

Fadi 

0 Kudos
Message 1 of 14
(5,963 Views)

it seems like the reader wants to be addressed, to distinguish between several readers when using the rs485 bus.

Maybe it will also do this on the rs232 bus.

Another possibility is adding CRLF to a command.

I only took a quick look at the demo software and could not immediately find an rs232 example written.

greetings from the Netherlands
0 Kudos
Message 2 of 14
(5,935 Views)

Hello Sir,

Sorry for not specifying, but i am actually using the RS232 bus to USB converter. Would you like me to attach the VI and the demo software i am using including its libraries?

I am not very familiar with this type of coding, this is why i am struggling to communicate with the reader.

 

0 Kudos
Message 3 of 14
(5,934 Views)

I already downloaded the .rar file with demo. But if you have already a vi, please attach it.

greetings from the Netherlands
0 Kudos
Message 4 of 14
(5,917 Views)

kindly find the attached VI. It is a fairly simple VI, for now i am just trying read and write before proceeding to more complex problems. I am also attaching the demo file just in case.

 

Thank you

Download All
0 Kudos
Message 5 of 14
(5,892 Views)

Hi

First of all, for a newbie a perfect readable vi. Mostly the wires are not aligned but either you found cleanup or are an organised programmer.

Second: The number of bytes to read is not equal to the number of bytes you did send.

So either know how much data to read from the format specification or from the number of bytes available.

move the write before the while and the close after the while.

and if no data is present just wait a few ms.

Just look at my edits

greetings from the Netherlands
0 Kudos
Message 6 of 14
(5,887 Views)

It didn't work as well.

apparently it has no problem writing but looks like its unable to access the reader. I attached a picture showing the flow of the code.

is it right to send the command in the form "0x21"?

 

0 Kudos
Message 7 of 14
(5,880 Views)

Hi

Sorry, I overlooked that. In LabVIEW you can select a displaystyle on a string.

Right mouse on the constant, select visible items display style.

There select hex and simply type 21

 

greetings from the Netherlands
0 Kudos
Message 8 of 14
(5,874 Views)

I tried that but still did not work. should i include the .dll file in labview to be able to send these commands? or is VISA serial enough

0 Kudos
Message 9 of 14
(5,873 Views)

Visa should be enough but maybe add cr lf or just one of them.

13 or 10 decimal so 0D and 0A in hex

 

greetings from the Netherlands
0 Kudos
Message 10 of 14
(5,865 Views)