KMS read estimator module outputs from code

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

KMS read estimator module outputs from code

753件の閲覧回数
akobyl
Contributor I

Hello,

I am trying to access the sensorless estimator's output speed from my main loop but I could not easily find how to do this since the est data structure is static inside drv.c.

I added a simple function inside drv.c which returns the speed estimation variable but is there a preferred method to accomplish this?  

Thanks

ラベル(1)
0 件の賞賛
返信
1 返信

608件の閲覧回数
linestream-adam
Senior Contributor I

Andy,

There isn't a preferred method of accessing those variables. Your method will work just fine. The alternative would be to remove the static from the EST_t est declaration and extern access the variable.

It will depend on how you want to setup the data accesses in your project.

That being said, I think it is better to use functions similar to what you did instead of allowing extern access to the motor control structures.