LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling SoftMotion axes via Python?

Hi,

 

I am working on my third-year university project and I am using LabVIEW to control a gantry system. I am not well versed in LabVIEW, but I have decent understanding of Python and so I wanted to know if I can control my SoftMotion axes within Python. I have tried looking at available documentation and resources online but I am unsure how to pass an Axis through to a Python node if that's even doable. 

 

 

Thank you

0 Kudos
Message 1 of 2
(1,908 Views)

Hi HeadieOne,

 

I'm not familiar with SoftMotion, so I can't address your question directly, but after looking at the manual for SoftMotion I'll suggest/guess the following: 

  • It doesn't seem likely you'll be able to pass an Axis to Python and do anything particularly useful with it. Others might be able to disprove this, but that would be my initial guess
  • If you're using LabVIEW 2018 or 2019, you can call Python code directly from LabVIEW if you want to use Python to carry out some calculations that you feel more comfortable with in Python than LabVIEW (although if you gain familiarity with LabVIEW, I'm sure it wouldn't be necessary - but it is possible)
  • The coding required to use SoftMotion itself doesn't seem too terrible, so hopefully by looking through examples and the manual you could make some quick progress
  • The manual does make mention of tools like FPGA. If this is part of your project requirements, the learning curve might be a little steeper, but I'd guess that either
    • A) it is not a requirement for you, or 
    • B) it will probably be easier to learn some LabVIEW and then use LabVIEW FPGA than learning some LabVIEW for the SoftMotion, then also having to use VHDL etc (unless you're already familiar with Verilog and VHDL.

 

Perhaps if you try getting started with SoftMotion in LabVIEW you'll find it easier than you expected, especially with the learning materials and forums available for LabVIEW help. If you post programs you're having problems with, people will probably be able to help you.

 

As I mentioned above, if you have complicated calculations you want to use Python for, you can also do that using the Python Node and some information about Integrating Python Code in LabVIEW (note a common issue is to try and return arrays (e.g. NumPy) from Python to LabVIEW - you must return a list in Python to have it as a LabVIEW array using the built-in Python Node).


GCentral
0 Kudos
Message 2 of 2
(1,847 Views)