wouldn;t need a pre calcualted 'scalefactor' as long as you know 2 things length of your cable model in quants and the distance you need the object scaled to:

distance_length / model_length = scale_factor

model.scale_z = scale_factor;

you don;t need a time calulation for this, you already have that by the movment of your lift/counterwieght. the distance_length will proportionatly be increased/decreased by TIME as the lift and counterweight move

you just need at any given frame the distance from X ->Y to calcualte the scaleing factor