If anybody finds this in the future, I managed to do it like this: scalingValue := EncoderPulseCountPerRev / ABS(AxisName.fScaleFactor); No need to use MC_ReadParameter as I am able to read this value directly from the axis object. Using an absolute value of the fScaleFactor is there in case the axis is set as inverted, in which case it would be a negative value. I was not able to figure out how to get EncoderPulseCountPerRev programatically, but since all my servos use an encoder with pulse count...
If anybody finds this in the future, I managed to do it like this: scalingValue := EncoderPulseCountPerRev / ABS(AxisName.fScaleFactor); No need to use MC_ReadParameter as I am able to read this value directly from the axis object. Using an absolute value of the fScaleFactor is there in case the axis is set as inverted, in which case it would be a negative value. I was not able to figure out how to get EncoderPulseCountPerRev programatically, but since all my servos use an encoder with pulse count...
Is there a way to see what value is set as the "Work travel distance per motor rotation" that is set in the Scaling menu of the axis ? I am working on my own homing function block for sensorless (hardstop) homing and I want to make it be universal between different axes with different motor's scaling for distance per rev so I need to know this value from the axis itself. I know I could do it by just creating an input variable for the function block but I'm leaving that option as a last resort.
Thank you, but sadly I already tried this and it also doesn't work. It's not doing anything.
Does anybody know how to get a specific text from a text list within a program. Obviously it works in a visualization, but because I will have an HMI that has it's own system and I will have to send variables to this HMI via an OPC UA connection, I need to be able to get a text into a string. I tried using the VisuElems like this, but it only returns an empty "" and nothing else. IF trig THEN sText := VisuElems.cmpDynamictext.DynamicTextGetDefaultText(ADR(sTextList), ADR(sAlarmID))^; //sText := VisuElems.cmpDynamictext.DynamicTextGetText(ADR(sTextList),...