LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Stepper motor with module trinamic TMCM-310

Hello,
 
i have been programminging with Labview for 3 stepper motors, which are from Faulhaber. The module i use is a TMCM-310 by Trinamic. Now i have the problem, motor 0&1 works perfectly, but motor 2 not. Even though the motors are new and i copied&pasted the VIs for motor 2. The only difference is the number 0, 1 or 2, which is important for the hex number.
 
I also tried with the program TMCL by Trinamic, and all of the three motors worked well. So the problem must be the program i wrote. Does anyone have an idea?
 
Cheers
 
Yaou
0 Kudos
Message 1 of 5
(5,620 Views)
Yaou,

could you please provide some more detailed information? How do you communicate with the TMCM-310 (e. g. RS-232)? Could you please provide some example code?

Thanks,

Jochen Klier
National Instruments
0 Kudos
Message 2 of 5
(5,606 Views)
Hi Jochen,
 
First of all, i communicate the module with RS232.
 
Now more about the module:  
 
The module TMCM-310 can control the 3 motors simutaneously. The command is a byte-string, where a byte is a motor's number.
 
The main VI is called "Steuerung.vi", which contains the important VI "goto.vi". "Goto.vi" means "Go to absolute position". If i control the motors straight with "goto.vi" by choosing the motor number 1, 2 or 3 at the frontpanel, it works troublefree.
 
If i use "Steuerung.vi" to make movements (The motor numbers in "Steuerung.vi" are set by constants 0, 1, 2), then Motor number 2 wont work.
 
Another thing is the module recognizes the movement, even motor 2 doesn't move much, because the program tells the right actual position.
 
I also tried to set the number "5", which should make both motor 1 and 2 to move. It didn't work either.
 
As i said before, the VIs for motor 2 is written by copy&paste from motor 1. The only difference is the constant number in "Steuerung.vi".
 
I put both "Steuerung.vi" and "goto.vi" in the attachment. Please tell me if you need more information.
 
Thanks a lot for your help
 
Yaou
Download All
0 Kudos
Message 3 of 5
(5,595 Views)
Yaou,

I had a look at your vis, but as all the subvis within goto.vi are missing, I really don't get a good idea what's going on here, so I just can give you some hints for debugging:

  1. In Steuerung.vi the motor number is represented as I32. goto.vi uses a DBL input for this parameter. If you do a comparison (e. g. "if motor number = 2") somewhere later in your code, there is a chance that this comparison doesn't return TRUE, even if you pass a "2" to goto.vi (limited accurracy of DBL data type and rounding errors introduced by the type conversion).

  2. You should examine the strings that are passed to your device in both cases (entering the motor number on the front panel of goto.vi and running goto.vi as a subvi). I'm quite sure that you will find a difference and you should search for the reason.

  3. You also could use NI-Spy, that can be found in NI-MAX under "Werkzeuge" or in C:\Programme\National Instruments\NI Spy. Use NI-Spy to log the communication between your device and LabVIEW which should also help you to identify the root cause of your problem.
I hope this helps,

Jochen
0 Kudos
Message 4 of 5
(5,585 Views)
Are you using a "Wrapper DLL" from Trinamic? Or are you controlling the module via a RS232 port directly?

If you use their DLL, there might be a bug in it.

I have my own software. I call it TMCM-DLL. It is a whole development environment, as well as a DLL.
My DLL does not exhibit such wrong behaviour. You may use it.
I describe it here:
http://forums.ni.com/ni/board/message?board.id=240&thread.id=3365
And on Trinamic forum here:
http://trinamic.com/ttdg/viewtopic.php?t=30
Trinamic has blocked my profile on their Support Forum for no reason. So you cannot contact me there. See the comments below.

My software is for sale. It is not free. Please view my profile on this LabView forum for the price.
Previously I used to bundle the software with greater quantities of hardware.
Unfortunately, as soon as I finished development (in 2007), Trinamic has betrayed me. They have terminated my distributorship, without any reason. So I can't sell their hardware, and bundle my software any longer. I have to sell my software.
I still have some leftovers, so I still can bundle at least partially. But my leftovers of Trinamic products are very limited in quantity.
The good thing is that my price includes a subscription fee to my services. You pay once, and ask for various support, or custom programming many times (within reason, of course). No need to pay every time, when you ask for a small thing. You may even defer payment till the system works the way you want.
I am not rigid. I provide some support free... like I did extensively on Trinamic support forum. Other distributors, and users have thanked me by turning their backs on me after Trinamic abused me. If your gratitude is different than their's then I may oblige.

If you are using other makes of controllers, I can adapt my software to them, even if they are not related to motion. So you could have one interface for all.
Systems Integrator
Scientific, laboratory, occasionally industial
0 Kudos
Message 5 of 5
(5,393 Views)