SSI ABS Encoder
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.
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
Please Log in or Create an account to join the conversation.
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.
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.
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.
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
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
Please Log in or Create an account to join the conversation.
Which firmware are you using? I might need to load that to test.
As a workaround, you could use a HAL "scale" component to change the 0->1 value that you are currently getting to be the range that you require.
Please Log in or Create an account to join the conversation.
halcmd show param hm2_7i80.0.ssi*
Please Log in or Create an account to join the conversation.
hi, it don't have any para.Scale is not a pin but a parameter so try:
halcmd show param hm2_7i80.0.ssi*
linuxcnc:~ $ halcmd show param hm2_7i80.0.ssi*
Parameters:
Owner Type Dir Value Name
Please Log in or Create an account to join the conversation.
I don't know why there is no scalemax pin, I do think that there should be.
Which firmware are you using? I might need to load that to test.
As a workaround, you could use a HAL "scale" component to change the 0->1 value that you are currently getting to be the range that you require.
I'm using the s_kins brand. I built it from the source with V2.9.0 pre0.
it at github.com/mWorkVN/linuxcnc
thank you for your helping
Please Log in or Create an account to join the conversation.