Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help with torque feedback control of servomotor

Hi,

 

I am trying to implement a logic using State-machine architecture, just to make it more modular for improvements in the future.

 

However, I am having trouble with the logic. Can anyone please help me? I am attaching the vi for reference. 

 

I want my motor to toggle between the upper and lower voltage limits. This voltage comes from a TEDS torque cell. The problem is that it is not going through the complete cycle. I mean the motor starts moving in the clockwise direction untill it hits lower limit, then changes direction, but doesn't go till upper limit; instead comes back again. I feel there is something wrong in the Compare DAQmx state.

 

Thanks.


Sasidhar.

Download All
0 Kudos
Message 1 of 6
(4,304 Views)

Hi Sasidar,

 

I see you have a control there for X values and don't have the reading wired up. Presumeably that is for testing, yes?

Jeff | LabVIEW Software Engineer
0 Kudos
Message 2 of 6
(4,282 Views)

Yes Jeff. That is for testing. I actually have my test setup with specimen, so did not want to connect n remove everything eachtime. I am sending u a picture of my picture of my project, maybe it might give u a better picture of wht I am trying to achieve. The clockwise n counterclockwise motion of the motor is to simulate the flexion n extesion of a spine specimen.

 

Thanks a lot. Hope you can help me with clearing the logic part. 

 

Thanks.

 

Sasi.

0 Kudos
Message 3 of 6
(4,280 Views)
What might be a good idea is to change up your state machine to have a state for motor running forward and one for motor running backward. It would be more intuitive and a more correct representation of the state machine. It would make it far easier to debug than the code is now.
Jeff | LabVIEW Software Engineer
0 Kudos
Message 4 of 6
(4,265 Views)

Hi Jeff,

 

Tried simplifying the code by doing a compare and run fwd rev according to the torque value.

 

But, still cannot figure out the correctly how the data flow needs to occur. 

 

Can you help clarifying to me step by step.

 

Sorry for the trouble.

 

Thanks.

0 Kudos
Message 5 of 6
(4,263 Views)

I would probably break it down into states like this:

 

Initialize

Read DAQ

Turn Motor Forward

Turn Motor Backward

Stop Motor

 

It would start with Initialize then go to Read DAQ. Read DAQ would decide which direction the motor should turn based off the readings and pass it into that state (pass the velocity in as well). The motor states will decide either to go to Stop Motor by a user override or by the loading cycles, or return to Read DAQ.

 

Jeff | LabVIEW Software Engineer
0 Kudos
Message 6 of 6
(4,249 Views)