LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem while using LabVIEW for Trinamic TMCM 3110

Hello everyone,

This is my first query so pardon me if I make any mistake or miss any information.

 

I am using TMCM-3110 module (Firmware version 1.14) on serial port (RS-485).

Here is what I am doing in LabVIEW.

I am using a LabVIEW program to move the motor from position A to B and read the position while the motor is in motion. Whenever the axis crosses a pulse count of 655360 (10 x 2^16), it sends the same value for a while (~2 sec) and resumes the readings after that. Please find the attached readings for motion given from 10 mm to 15 mm (10th rotation to 15th rotation), i.e. from 512000 to 768000 pulses.
As you can see in the excel files, values from rows 48 to 68 are stuck at 655360 while the motor was still moving. I tried it in all 3 axes and am encountering the same problem.
I checked it in TMCL-IDE as well, where this issue does not happen.
Has any one else faced a similar problem or can you guys help?

I tried contacting Trinamic support but they have their hands tied when it comes to LabVIEW.

 

 

0 Kudos
Message 1 of 12
(1,979 Views)

Without seeing your code, and without better description of what the Trinamic device is supposed to output, it is difficult to make suggestions.  It is curious (to me) that you see 655360 -- that (to me) sounds like an "unlikely" number for hardware to output.  I also have no idea if you have linear or angular encoders -- linear encoders, of course, will have "boundaries", while angular might well use finite counts of a specific bit length (such as 16-bit, 0 .. 65535).  Hard to imagine mixing binary and decimal ...

 

Bob Schor

0 Kudos
Message 2 of 12
(1,942 Views)

Hello Bob,

Thank you for replying.

Well, I am not using any encoders. When I said I am "reading the motor position", I meant I am reading the pulses from the controller board (TMCM-3110). TMCM uses 32 bit registers so the valid motion range is from ([-2^31] to [+2^31-1]. I should have mentioned it in my original post. My bad.

So, hardware wise, all I have is a trinamic board over RS-485 interface with a motor (that is not connected to anything at the moment).

I am attaching the VI for your reference.  "TMCM-3110 Motion" is the main VI that calls "Single Instruction TMCM" Vi for fomatting.

 

 

Download All
0 Kudos
Message 3 of 12
(1,919 Views)

Hi Ankur,

 


@Ankur13 wrote:

When I said I am "reading the motor position", I meant I am reading the pulses from the controller board (TMCM-3110). TMCM uses 32 bit registers so the valid motion range is from ([-2^31] to [+2^31-1]. I should have mentioned it in my original post. My bad.

So, hardware wise, all I have is a trinamic board over RS-485 interface with a motor (that is not connected to anything at the moment).


Read the manual of your device!

Even though those values are provided as I32 value: does the device REALLY support the full numeric range for all those data items?

What does the Trinamic support say about this problem with their device?

 


@Ankur13 wrote:

I am attaching the VI for your reference.  "TMCM-3110 Motion" is the main VI that calls "Single Instruction TMCM" Vi for fomatting.


Those VIs should be improved!

All that string formatting/handling in the "Single Instruction TCMC" is kind of Rube-Goldberg…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 12
(1,913 Views)

Hello Gerd,

Thank you for your comments. 

 

1. Yes, I read the manual and they do support I32 representation. In fact, if you see the excel sheet attached, the values from row 69 onwards resume after getting stuck at 655360 for a while. Moreover, I am encountering this problem only on LabVIEW as their application TMCM-IDE works fine for the motion range in question. So, I doubt if the issue is related to the overflowing.

 

2. I tried contacting the Trinamic support team and here is what they replied: " In respect to Labview, we provide sample codes “as is”. Unfortunately, We extend sample files for Labview for reference only and we won’t be able to support for any errors in Labview codes." They did provide me with the link for their LabVIEW example code (https://www.trinamic.com/fileadmin/assets/Support/Software/TMCL_with_Labview.zip), but it is just for sending the command and does not contain any functionality of receiving and formatting the response from the controller board. So, that's that.

 

3. I understand the "Single Instruction TMCM VI" needs significant improvements but due to lack of support and me being a newbie, this is the best I could come up with to get the work done. 

 

Regards,

Ankur

 

 

 

0 Kudos
Message 5 of 12
(1,909 Views)

Hi Ankur,

 


@Ankur13 wrote:

3. I understand the "Single Instruction TMCM VI" needs significant improvements but due to lack of support and me being a newbie, this is the best I could come up with to get the work done. 


See this snippet:

(You don't need that Wait function once you get rid of that BytesAtPort property node!)

 


@Ankur13 wrote:

1. Yes, I read the manual and they do support I32 representation. In fact, if you see the excel sheet attached, the values from row 69 onwards resume after getting stuck at 655360 for a while. Moreover, I am encountering this problem only on LabVIEW as their application TMCM-IDE works fine for the motion range in question. So, I doubt if the issue is related to the overflowing.


When they "get stucked for a while" then I guess there is a problem in communication with Trinamic or inside the Trinamic firmware. You can check for communication problems using the error wires in your VI(s)…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 6 of 12
(1,905 Views)

Hey Gerd,

Thank you so much for your suggestions. I will make these changes in the subvi for formatting.

I have already checked the error wire and they see to report no problem/anamoly when it gets stuck as the board is still sending 655360.

 

If you see the excel sheet, the board stucks at 655360 (rows 48 to 68) and resumes at 722237 (row 69), here is what I did.

I moved the motor to 691,200 pulses (corresponding to 13.5 rotation) and read the position. The motor did move 13.5 rotation and stopped (I had to do it manually through stop button on the front pannel since the while look was not terminating on its own). Now,I tried to read the motor's position through another LabVIEW program as well as TMCL-IDE application. 

The motor's position at TMCL-IDE was 691200, while on the LabVIEW it was still showing 655360. 

 

So, even I feel that the issue could be in the Trinamic Firmware. Unfortunately, I am already using the latest firmware available for the module from TMCM.

0 Kudos
Message 7 of 12
(1,901 Views)

Hi Ankur,

 


@Ankur13 wrote:

The motor's position at TMCL-IDE was 691200, while on the LabVIEW it was still showing 655360. 

So, even I feel that the issue could be in the Trinamic Firmware.


When the Trinamic software shows the correct data, but your LabVIEW VI does not read the same data then the problem most probably is in the communication between the Trinamic board and LabVIEW. Do you check for error messages?

(When you still think the problem could be related to the Trinamic firmware then you need to contact the Trinamic support…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 12
(1,898 Views)

Hello Gerd,

Yes, I did check the communication between the Board and LabVIEW along with the error message but did not get anything unusual or alarming.

Last week I contacted the Trinamic support team and as they could not help me, I posted the query in this community to see if anyone else found the same issue and resolved it.

 

0 Kudos
Message 9 of 12
(1,895 Views)

Hey Ankur13,

 

thank you for your example VI, it helped a lot!

 

I am running into the same "freeze" at the same position...

 

Did you solve your problem?

 

Kind Regards

logipilot

0 Kudos
Message 10 of 12
(288 Views)