SasiU Posted January 26, 2009 Report Share Posted January 26, 2009 Hi, My name is Sasi. I am a BME Grad student from Ohio. I am working to build a flexibility spine test machine towards my thesis topic which deals with evaluating implants using this machine. I have to write a LabVIEW code to control a brushless AC servo gearmotor using torque cell data as feedback. I have managed to get the hardware part right, i.e they r being identified and controlled. I have also written a very crude code to achieve the following. Step 1: Initialize the motor. Step 2: Start moving it at a uniform RPM to the right (This RPM value too user can enter). Step 3: While doin Step 2; simultaneously read torque cell data (Using DAQ asst.). DAQ o/p is from 0 V to 10 V; 0 V being -10 Nm n 10 V being +10 Nm Step 4: When Torque value reaches +10 Nm, i.e 10 V, the motor stops. Step 5: From the position where motor stopped (i.e no need to reset to initial position) Start moving in the opposite direction at the same uniform RPM as in Step 2 while reading torque cell data. Step 6: Once again when torque reaches -10 Nm, i.e. 0 V, the motor should stop. Step 7: Repeat 'Step 2' to 'Step 6' 3 times. Step 8: Reset motor postion. I have managed to get the forward n backward motion by loading +Vel n -Vel values to Read velocity.flx in trajectory settings, but I am having problem putting them in a case structure to do so when user clicks a toggle switch on front panel. Also Can anyone help me with a better logic, i.e including emergency stop, etc. cause it is having motor movement n etc. n u knw spine is usually very delicate, so if by mistake anyone enters huge values for vel, etc. it wud be bad. I really appreciate all you ppl's help. PFA initial code file for your ref. Thnks, Sasi. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.