Labview has the ability to communicate ASCII protocol via RS232 as a driver so the interface is compatible. The User can readily send down code strings in SmartMotor compatible commands.
Adding a basic VI will help to illustrate this... Can you please do it?
Thank you
Were you able to successfully operate the SmartMotor using Labview commands? Would you be willing to share your program?
Please help.
I do not have that code anymore. The way I made it work I simply coded what ever I needed in the SMI and then copied the text commands and placed it as input command to a Write. The SM was connected via USB to the laptop.
SMI:
http://www.animatics.com/products/smartmotor/animatics/host-software/smi-smartmotor-interface.html
User manual where you can find the various commands that the SM can take:
http://www.animatics.com/download/legacy/Users_GuideV5.pdf
My recommendation is to write the whole code first in the SMI and then just pass command snippets to LabView.
Good Luck
I was able to get commands to work using Labview, but all my requests for data such as current motor position do not work. I can use Visa Write to set the velocity and acceleration etc, and then move the motor to a specified position, but when I use the command RPA and use Visa Read to retrieve the reported value, there is nothing in the buffer. I assume I am just using Visa Read incorrectly. Any suggestions on how to make it work?
Well, as I have said before, I do not have the code anymore, and cannot tell you how I made it work. But I did get the right information out.
I do remember placing delay/wait with X ms in order to make it work. Also, I set the read to flush the entire butter out each read (I donot remember the right setup).
Also, you might just try to use a different function to read data out. I remember parsing some output because it gave readings for few things at a time.
I know its not much, but I hope it helps
I also want to read the current motor position and similar values into LabView. If anyone figures it out, myself included, we should post and share the knowledge
I got it to work. First make sure you have ECHO_OFF, or every command you send will go into the buffer. The solution was that I have a legacy model motor so it has different commands. RP is the report position command for my model, not RPA. Also make sure you add at least a few milliseconds delay between writing the command and using VISA Read to read it. Hope that helps.
Can you provide your VI? I also have an older model that responds to RP instead of RPA. But even when I command ECHO_OFF I have no luck.
Thanks for your help
I have it sort of working with Labview, but now it is finicky with certain commands. Labview does not execute TWAIT as the SMI engine does. Did you run into this sort of problem with any commands?
The TWAIT command and WHILE LOOPS can't work over the serial interface. They only work in a program downloaded to the motor. You can do RBt commands to check if the motor is moving... or you can write subroutines in the motor and just call the routine with GOSUBx (with x being 0-999).
Here is at least a start to getting Labview and Smart Motor talking. I haven't yet figured out how to use the SMIEngine to its full extent, but this is part way there.
http://forums.ni.com/t5/LabVIEW/Animatics-dll-calls/m-p/2090944/highlight/false#M682591
how to use smi engine what are the step to be followed .
Help for the SMIEngine is installed in your Program Files... Animatics... directory when you install SMI2.
You should follow the link from dries for what to do in Labview.
http://forums.ni.com/t5/LabVIEW/Animatics-dll-calls/m-p/2090944/highlight/false#M682591
I have the same problem with a Class 5 motor. I can send velocity and position to the motor, but cannot read the position.
Are you using a class 4 or class 5 motor?
I have a VI that works for class 4 motors, but not the class 5.
Bill