11-29-2019 04:18 AM
Hello everyone,
I have an absolute encoder RLS with E201 USB encoder interface, it uses Biss protocol, 24 bits.
From the small software that the company provided the position can be read very fast but when I try to read the data in Labview the While loop execution getting
slower than normal and shows the counts with a delay of 3 to 4 seconds. The code is simple and just has the I/O for Write and Read. Would you please advise if there is any way to get the data in a real-time or increase the reading response time?
Thanks in advance
11-29-2019 04:25 AM - edited 11-29-2019 04:25 AM
Hi Samamiri,
because of those controls/indicators missing their labels LabVIEW doesn't know how to handle the data from your sensor… (Just joking!)
What kind of protocol does your device use?
Why don't you use VISASerialPortConfig to set all needed parameters for the serial communication, including the TermChar?
Does your device use any TermChars? If yes: which one?
Do you need to send that "?" command in each iteration?
Do you need to bang the serial bus as fast as possible?
(And last, but not least: Why don't you use AutoCleanup before posting your code?)
11-29-2019 04:26 AM
Are you sure the nr of bytes to read is correct? If you read more than is returned, the read will time out. You're clearing the error, so that is a bit suspicious.
Other than that, everything should be in the manual. Perhaps you need to send "?\n"? If so, you can configure visa to use end termination characters.
You'd usually know the exact nr of bytes to read, OR have a end termination character. If you don't have one of the two options, you get problems you're running into.
Alternative (if you don't have a termination character or know the nr of bytes) is to read bytes one by one until the result matches your expectations. This usually gets ugly...
11-29-2019 05:03 AM
Thanks GerdW,
Your questions help me to solve the problem.
I used VISASerialPortConfig and just set the timeout option!!
Cheers
11-29-2019 06:07 AM
Thanks for your notes, I will consider them.
In the user manual mentioned no need any end termination characters! and simple "?" works correctly.
11-29-2019 06:25 AM
A shortened timeout is just a hack, it doesn't fix the real problem. You want the TO as sort as possible, making the read as fast as possible, but long enough to not cause any problems. What is a short enough timeout? Are you sure that it's never too short? What if windows or the device has a hiccup?
I'd dig into it a bit deeper. At least try to solve the problem without timeouts (or even worse: a Wait (ms) ). I like my drivers really good, as they are the building blocks of my application.
12-23-2020 01:23 PM - edited 12-23-2020 01:35 PM
I know this is a year old, but I'm writing this for myself when I forget and search for this again in a few years. This doesn't want a termchar on writes (that'll mess stuff up) but *does* want a termchar on reads. \r specifically.
Also, "?" doesn't work on BiSS, just the SSI. on BiSS, you have to use the command "4" and parse the return as per page 2 of the attached document. Pay attention to the number of bits that you expect (word width) or you accidentally turn your status and or CRC bits into multipliers. you can check the word width with "b".
03-11-2021 06:08 PM - edited 03-11-2021 06:55 PM
Hi, Samamiri,
I faced same problem as you.
Other than RLS E201 USB Encoder interface, what else did you use to connect it to Labview ?
Alternatively, can you post you latest Labview layout that used to solve your problem.
Anybody know what interface need to use for link up RLS E201 USB Encoder interface and Labview ?
best regards.
03-12-2021 12:30 AM
Hi Jeffrey,
@Jeffrey_Oon wrote:
Anybody know what interface need to use for link up RLS E201 USB Encoder interface and Labview ?
Did you read the PDF in the previous message?
Just the first sentence says it all:
The E201-9S interrogates a BiSS-C encoder and allows the data to be read by a PC using simple ASCII commands over a USB connection and a virtual COM port.
03-12-2021 01:21 AM
Hi GerdW,
My encoder is currently the same kind of encoder but it comes with a USB connection.
I was wondering how do I connect it up to LabView to read the data that is produced?
As for sending the commands to the encoder, how do I go about doing it?
Thanks!