LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Smartmotor uneven displacement

Hi,

 

I'm currently using a Smartmotor SM1720M version 4.15b with a linear actuator to compress tissue using a load cell to measure force.  I'm trying to create a program that does cyclic displacement.  Currently the way my program is set up it will go for the correct number of cycles, but there's a problem with the displacement.  Each cycle the down displacement is just 2 or 3 counts shorter than than the up displacement despite the fact that they're both being given the same command.  Any ideas as to why this is happening?  Any help would be greatly appreciated!  I have my VI attached.

0 Kudos
Message 1 of 5
(2,894 Views)

Does the motor have sufficient torque to provide the compresssion you want without slipping or losing position?  My first thought when I read your description was that the motor reached a limit before it reached the desired position.  The way your VI (mis)handles errors, you will never see any error which might be returned from the motor controller. 

 

The style guides recommend keeping the block diagram to the size of one screen.  Either you have a very large panaoramic screen or your diagram is too large.

 

You have a lot of duplicated code, unnecessary local variables, and a very awkward architecture.  The STOP functions will keep VISA Clear from ever executing and may cause other problems.  Read the warnings in the help files.

 

A Producer/Consumer architecture with two or three producer loops might be good for this project. One producer would have an event structure to respond to user inputs. The DAQ Read and VISA I/O would be in the producer(s). The consumer would handle displays, file I/O, and any force/positioning control requirements.

 

Lynn

0 Kudos
Message 2 of 5
(2,852 Views)

I know my code is far less than perfect.  It's my first attemt at programming anything.  Thanks for the tips.

 

And it was my first thought as well that the motor was slipping, but it does the same thing when it is not compressing anything.

0 Kudos
Message 3 of 5
(2,842 Views)

1. How do you know it is displacing by different amounts?  If you let it run for a long time does it "walk" out of the sytem?

 

2. Place error indicators on the VISA Read error out line inside the nested loops.  Do you see any errors? Does the value shown on the "read buffer" indicator ever show anything which does not look like a "normal" position response?

 

Lynn

0 Kudos
Message 4 of 5
(2,835 Views)

The RP stands for Report Position and reads to waveform chart 2 (The one next to Acutator Movement on the front panel).  It visibly shows the displacement problem.  I've attached a screenshot so you can clearly see it.  That's after 25 cycles.  I've let the program go up to 300 cycles and the problem never went away.  The whole system had shifted by almost 0.5 mm by the end.  

 

I've also tried placing error indicators on the VISA Read and there are no errors.  Nothing ever shows up that would indicate the program is working incorrectly.

0 Kudos
Message 5 of 5
(2,817 Views)