Axis velocity value after initialising

Moderators: TomKerekes, dynomotion

Post Reply
georgep
Posts: 6
Joined: Sat Apr 08, 2023 11:39 pm

Axis velocity value after initialising

Post by georgep » Sun Apr 09, 2023 12:03 am

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!

User avatar
TomKerekes
Posts: 2546
Joined: Mon Dec 04, 2017 1:49 am

Re: Axis velocity value after initialising

Post by TomKerekes » Sun Apr 09, 2023 8:04 pm

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
Regards,

Tom Kerekes
Dynomotion, Inc.

georgep
Posts: 6
Joined: Sat Apr 08, 2023 11:39 pm

Re: Axis velocity value after initialising

Post by georgep » Tue Apr 11, 2023 10:04 am

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!

Post Reply