Page 1 of 1

Axis velocity value after initialising

Posted: Sun Apr 09, 2023 12:03 am
by georgep
I have a machine which is intended to move with a particular velocity. If possible, I would like to set this velocity during initialisation.

I have entered this value into the init file, which was generated in the usual way from the KMotion config+flash window:

ch1->Vel=100;

However, when I execute the initialisation program from my .NET application, the axis velocity property value for the axis is Zero.
In order to move the axis, I need to then set the velocity property to a finite number.
Other properties such as Acceleration do have the values specified in the init file - so I'm confident the file is executing correctly.

What is the purpose of the chX->Vel line in the init file, if not to set the Velocity property for the axis?

Thanks!

Re: Axis velocity value after initialising

Posted: Sun Apr 09, 2023 8:04 pm
by TomKerekes
Hi George,

The Controller Axis class assumes you may want to set the MoveTo velocity in User Units without affecting The KFLOP Parameters. If you want to read the value from KFLOP you can do that with:

Code: Select all

_Controller.GetCommandValue<double>(String.Format("Vel{0}", _ID), true);
HTH

Re: Axis velocity value after initialising

Posted: Tue Apr 11, 2023 10:04 am
by georgep
I can't see the method GetCommandValue, perhaps because I'm using an older version 433q (for 64 bit libs). But I can see KMotion_dotNet_KM_Controller_WriteLineReadLine and I can get the velocity this way. It's very handy to have a way to have a way o interact with the console.

Thanks!