Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help with Softmotion module. I want to move my motor forward and backwards

I have a cRIO connected to an Elmo servo drive. 

I been programming using the Express VIs from SDI plugin for NI Softmotion. 

I have two booleans buttons. When one on the right is pressed the motor has to move forward and when the button on the left is press the motor has to move backward. When both are press or none are pressed the motor has to be stationary.  This boolean table can be easily created but when it comes to Softmotion I don't know what VI I need to use. At the moment I have a case structure that changes due to the boolean buttons. Does anyone have any experience doing a project like this using Softmotion? 

 

 

Thank you 

0 Kudos
Message 1 of 3
(2,390 Views)

Hey Jonas, 

 

     I was looking at your image and overall I don't see any problem with the approach you are taking. Overall, you should just have LabVIEW code that allows to check for the buttons that you have (either case structures or events structures) and then depending on that do a different straight line move 

 

   Are you having any errors while doing that?

   Are you currently able to move the motor in one direction?

0 Kudos
Message 2 of 3
(2,355 Views)

The top-left VIs you are using are the best approach (SoftMotion Express VIs to Clear Faults and enable via Power). There is a Straight-Line Move Express VI that I would encourage you to use, as the current approach uses Function Blocks. These are a deprecated interface that should not be combined in the same application as Express VIs.

 

Express VIs are blocking by default (meaning they will not finish executing until the move or action is complete). However, the Express VI for a Velocity Move should only block until the move is started, unlike a position move where it will block until the move is complete.

 

From there, you can command a new velocity move (to change directions) or a stop move as needed.

0 Kudos
Message 3 of 3
(2,350 Views)