07-05-2021 07:14 AM
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.
07-05-2021 09:35 AM
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
07-05-2021 11:05 PM
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.
07-06-2021 01:56 AM
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…
07-06-2021 02:11 AM
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
07-06-2021 03:00 AM - edited 07-06-2021 03:01 AM
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)…
07-06-2021 03:59 AM
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.
07-06-2021 04:06 AM
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…)
07-06-2021 04:24 AM
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.
02-14-2024 07:26 AM
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