SSI ABS Encoder

More
5 years 5 months ago #208134 by andypugh
Replied by andypugh on topic SSI ABS Encoder

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.

More
5 years 5 months ago - 5 years 5 months ago #208174 by nhanpham
Replied by nhanpham on topic SSI ABS Encoder

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.


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

thank you for your helping
Last edit: 5 years 5 months ago by nhanpham.

Please Log in or Create an account to join the conversation.

More
5 years 5 months ago #208182 by andypugh
Replied by andypugh on topic SSI ABS Encoder

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.

More
5 years 5 months ago #208189 by nhanpham
Replied by nhanpham on topic SSI ABS Encoder

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?


It's "./mesahal/mesamWork.hal:103: parameter or pin 'hm2_7i80.0.ssi.00.zencoder.scalemax' not found"

Please Log in or Create an account to join the conversation.

More
5 years 5 months ago - 5 years 5 months ago #208192 by andypugh
Replied by andypugh on topic SSI ABS Encoder
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* )
Last edit: 5 years 5 months ago by andypugh.

Please Log in or Create an account to join the conversation.

More
5 years 5 months ago - 5 years 5 months ago #208221 by nhanpham
Replied by nhanpham on topic SSI ABS Encoder

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* )


i got there pins.
It don't have a scalemax pin
Code:
halcmd show pin hm2_7i80.0.ssi.00 Component Pins: Owner Type Dir Value Name 29 bit OUT FALSE hm2_7i80.0.ssi.00.data-invalid 29 bit OUT FALSE hm2_7i80.0.ssi.00.steps 29 bit OUT TRUE hm2_7i80.0.ssi.00.steps-not 29 float OUT 0.01782662 hm2_7i80.0.ssi.00.zencoder ==> z-pos-fbss
Last edit: 5 years 5 months ago by nhanpham.

Please Log in or Create an account to join the conversation.

Time to create page: 0.073 seconds
Powered by Kunena Forum