01-28-2015 07:42 AM
Thanks for the answer, but I just fixed that problem 🙂
So now I am able to send simple command to the encoder, and to get back its answer.
Only problem now is that sometimes I get a timeout error, even though the command is well executed and I got the right answer.
Any tips on how to fix that?
01-28-2015 07:47 AM
01-28-2015 08:00 AM
Are you using the correct termination character when you configure the serial port?
Lynn said it looked like responses were terminated with a carriage return. If you don't set that in the Serial configure, it will use the default of line feed. Then you'd issue a command, and read some large number of bytes. You'd get a complete message, but it will timeout because it won't get the linefeed character. If you configure for carriage return, it won't timeout because the VISA read will return as soon as it sees the carriage return.
05-01-2015 03:25 AM
Hi Schindfj! You removed the standard program E201?
05-01-2015 06:04 PM
You're not, by any chance, using "Bytes at port" AND termination enabled at the same time, are you? It's one or the other (and in this case, termination is the way to go).
Of course everything is a guess because you are too shy to share your code. 😉
10-30-2019 01:52 AM
I have the same problem, can you share your code? Thank you!
02-12-2024 11:24 AM - edited 02-12-2024 11:31 AM
Can you explain this further? Using the NI example serial communication VI I was able to send and receive basic commands but I do get errors between the response messages in addition to experiencing those time out errors.
The hex data I get from the current location command does not update as I move the encoder, it just has the same hex value regardless of the location. For example for command !, it always returns 1074006152: 3674488226 regardless of location.
Looking at the datasheet for the encoder it says that the termination character is CR which is 0xd as opposed to 0xA, as it is in LabVIEW.
02-12-2024 11:31 AM
Hi Meta,
@MetaMgmt wrote:
Can you explain this further?
You know you are asking in an old thread with several messages: who is "you"?
@MetaMgmt wrote:
Using the NI example serial communication VI I was able to send and receive basic commands but I do get errors between the response messages in addition to experiencing those time out errors.
Those "ERROR" responses are just that: responses of your device. Read its manual to learn how to prevent such responses!
@MetaMgmt wrote:
Looking at the datasheet for the encoder it says that the termination character is CR which is 0xd as opposed to 0xA, as it is in LabVIEW.
You forgot to mention the type of your encoder and to attach the datasheet…
How should we help when you don't provide minimal information?
02-12-2024 11:48 AM
Hello GerdW,
Thank you for your quick reply. Noted! I have attached the datasheet.
02-12-2024 12:47 PM
Hi Meta,
the command "n" is used to turn ON the encoder. How often do you want to turn the encoder on?
As I didn't see any mentioning of this "ERROR" response you should call the Renishaw support and ask for more information or a better programming manual. (As far as I know Renishaw support is quite good.)