- Posts: 19311
- Thank you received: 4655
annhandt09 wrote: i tried this. The encoder data returned : 0->2047 - 2047 -2046 ...->-1 for 0->4096 datas
Is it correct?
Please Log in or Create an account to join the conversation.
andypugh wrote:
annhandt09 wrote: i tried this. The encoder data returned : 0->2047 - 2047 -2046 ...->-1 for 0->4096 datas
Is it correct?
I think it assumes that the data is signed, which is a problem in this case.
I have just realised that the answer is to simply not configure it as an encoder at all...
Use %12U and it should be fine.
Please Log in or Create an account to join the conversation.
annhandt09 wrote: Hi, i used %12U , then the returning data is 0->1
I can't config "setp hm2_7i80.0.ssi.00.zencoder.scalemax 0.5" para. It's error
Please Log in or Create an account to join the conversation.
andypugh wrote:
annhandt09 wrote: Hi, i used %12U , then the returning data is 0->1
That's a start, at least.
I can't config "setp hm2_7i80.0.ssi.00.zencoder.scalemax 0.5" para. It's error
What error? Does the parameter exist?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
andypugh wrote: I think that the underlying problem here is that the SSI driver re-uses the smart-serial driver code, so makes assumptions that the input data is like the smart-serial data. In smart-serial the encoders are always signed-int, for example, and that is why %12e is not working with your unsigned encoder.
However, looking at the source
github.com/LinuxCNC/linuxcnc/blob/master...mot2/sserial.c#L1212
It looks like there should be a "scalemax" pin for your zencoder if is is defined as unsigned with %12U
Can you get a pin listing for hm2_7i80.0.ssi* ?
(halcmd show pin hm2_7i80.0.ssi* )
Please Log in or Create an account to join the conversation.