02-15-2013 06:01 PM - edited 02-15-2013 06:18 PM
Dear NI's LabView Community,
I have a question connecting SmartMotor to LabView. I am trying to generate an ActiveX(Word,Excel,etc.) report from LabView after running SmartMotor and recording the data acquired from it. I read about using Call Library Function and connect the SMEngine.dll then create functions, which I don't know how to proceed. I need help creating this VI.
Summary of procedures:
SmartMotor > LabView > Excel, or Word.
Thank You.
02-16-2013 06:42 PM
So where are your problem ?
Getting the data from the motor to LabVIEW ?
Getting the data to a file that Excel can read ?
And for us who don't have the hardware to look at or knows about your project,
What is SmartMotor?
What model are you using?
Where did you find the dll?
Is there a manual?
What have you done so fare? Show us your code, and we can help you from there.
Take a look at the help before postin back.
http://zone.ni.com/reference/en-XX/help/371361J-01/glang/call_library_function/
02-17-2013 12:12 PM
Thanks for the reply dkfire. Let me explain smartmotor. Pulled from the website:
SmartMotor is a highly programmable, integrated servo motor system that is integrated with a motor, an encoder, an amplifier, a controller, RS232/RS485 communication, and IOs. (http://www.animatics.com/products/smartmotor.html) I I have connecting the motor to a my laptop through a USB Serial Adapter. I am able to program and run the motor using the SmartMotor Interface program that Animatics created. SmartMotor user guide http://www.animatics.com/download/legacy/Users_GuideV5.pdf
The communication link between my laptop to the smartmotor is through RS232. I am able to record velocity, torque,position, etc using the SmartMotor Interface. I am trying to connect the SmartMotor Interface with LabView so that I could run the SmartMotor on LabView and be able to output an Excel Graph of different variables (Velocity, Position, etc.) I pulled the .dll file from system32. the SMIEngine.dll is the SmartMotor Interface Engine. dll file. I am brand new to LabView so I have no clue how to start. I have the most difficulty in setting up the Call Library Function Node on LabView. I looked into from the NI summary page that you linked, but I am still unclear as to how to set it up. The main issue is setting up the parameters for me, because I don’t know what to do from there. I looked up videos and post on this topic, but none have help me to setup the LabView VI. Thanks for the reply dkfire, hope you and other members could help me out here.
02-17-2013 12:18 PM
If you are using the call library function node, you will need to call functions that are described by the vendor's documentation. You can search the forum for smartmotor or animatics to see if someone has done this before before but it possible you will have to create all of the code yourself. There won't be anything specific to non-NI hardware unless someone else has already done it. Each dll is different and there is only generic instructions on how to use one.
Your other option appears to use direct RS-232 communication. This you would use with the VISA read/write functions and again, use commands defined in the vendor's documentation.
02-25-2013 07:52 AM
SmartMotor probably publishes a set of programming commands and a summary of expected responses. If they will give you (or sell you) that documentation it would help.
If that's not available I've sometimes connected a second serial port to monitor communication beween PC software and another device. I wrote a simple program in LabVIEW to watch the command and response protocols. Usually it's not hard to duplicate them with VISA functions.