Machsupport Forum

Mach Discussion => VB and the development of wizards => Topic started by: RedBlob on June 26, 2015, 04:32:05 AM

Title: SetParam() strange behaviour
Post by: RedBlob on June 26, 2015, 04:32:05 AM
Hello,

I want change the XRefPer parameter by VB script and I use SetParam("XRefPer",10).

When I execute the macro the value in the "Homing/Limits" table change to target value but the real axis speed don't change.

The speed change only if I load the "Homing/Limits" window, I press OK and from now the value is operative.

In other words the SetParam function change the value in the Homing table but the value became operative only if I call the windows and press OK button.

What can I do to have the speed changing operative directly from VB macro ?

Thanks for help.

Title: Re: SetParam() strange behaviour
Post by: TPS on June 26, 2015, 06:30:31 AM
Hi,

this

SetParam ("YRefPer",100)
DoOEMButton (1023) 'home at 100%
While IsMoving()
Wend
Code "G53 Y5" 'move off switch 5mm
While IsMoving()
Wend
SetParam ("YRefPer",5)
Sleep 200
DoOEMButton (1023) 'home at 5%
While IsMoving()
Wend
SetParam ("YRefPer",100)


is working here.

Thomas
Title: Re: SetParam() strange behaviour
Post by: RedBlob on June 26, 2015, 06:46:46 AM
Hello Thomas,

That function not working correctly here.

The cycle work always with the same speed ...... the speed change only if I go manualy on the Homing Table and press OK (  in the Homing table there is the speed I have set in the macro !!! but is not operative if I not press the OK button ).

What can I do ?


Title: Re: SetParam() strange behaviour
Post by: TPS on June 26, 2015, 06:56:12 AM
Hello,

i think it is a CSMIO issue, tested it on my PP testmachine in office.
try to contact CSMIO support.

Thomas