12-10-2018 04:20 PM - edited 12-10-2018 04:21 PM
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
12-11-2018 02:34 PM
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?
12-12-2018 07:15 AM
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.