02-27-2017 10:08 AM
Hello Labview community,
I am building software with Labview to control a motor with following specs.
Motor: Maxon DC motor 118751
Ecoder: HEDM-5500 B02
Controller: EPOS2 24/5
Communication line: RS232 VISA
The motor is started with the standard Maxon flow, in position profile mode as follows
Next I tried to put the motor in a looping cycle to go back and forth to a specific location for a number of loops
Maxon has a Immediate setting for its motor control. It states that if put on 0 it will wait for the previous move to complete and then execute the next move.
There is the problem however. Within the loop there is no problem, the motor moves from A to B without any issue. The commands seem to skip when a new loop is started (Rotation excecution + 1), if the motor has not finished its first move. So lets say the loop is set at 5x, the loop will only act 2 times because it was still moving the motor during the previous move. Now I could just change the wait to fit perfectly with the loop but I feel like I am missing something here for it to wait on the motor. Setting the immediate to 1 will move the motor whenever the wait is finished, whatever the motor status. So that is working.
Please ask me more if I was unclear in explaining my issue
John
02-27-2017 10:39 AM
02-28-2017 03:24 AM
I'll give that a try.
Sounds good to do, look if the motor has reached the position.
I'll check the Get Axis Info structure on how they pull this off. My main issue is that I do not want to spend a lot of time in the for loop. I want to send the motor commands and get out. The application is rather time critical and I can't spend time waiting for a confirmation that the motor has moved. This code is inside a QSM consumer and there are plenty of other things to do while the motor moves.
John
02-28-2017 04:07 AM
Could you provide a link to the GetAxisInfo.vi ? Or show a picture of the code.
I can't seem to find it anywhere.
I am interested in the way it is done. I found the VCS Get Movement State. Now I am wondering on how to implement this check.
To return on the immediate setting
Do you have an idea on why the immediate setting is not functioning out of the for loop? Am I overwriting the operation pointer inside the motor? Is it a labview related issue with the shift registers?
02-28-2017 07:40 AM
johndoe773 a écrit :
Could you provide a link to the GetAxisInfo.vi ? Or show a picture of the code.
I can't seem to find it anywhere.
I am interested in the way it is done. I found the VCS Get Movement State. Now I am wondering on how to implement this check.
To return on the immediate setting
Do you have an idea on why the immediate setting is not functioning out of the for loop? Am I overwriting the operation pointer inside the motor? Is it a labview related issue with the shift registers?
I don't have the EPOS driver installed on this computer but basically the GetAxis Info vi is a wrap up of lower level function like VCS Get Movement State and Get Actual Position.
I think the immediate setting is not working for you because the EPOS cannot piled up input commands, if it is already waiting for a move to end before starting another one other command move will be discarded.
If your application cannot wait for a confirmation that the motor has moved in the actual architecture then the commands should be queued in this state and dequeued in a parallel loop where the timing is not as critical.
Ben64
03-08-2017 09:28 AM
I tried to devise a way to achieve this polling of hardware but I failed to make a solid solution where I am happy with. I posted another question recently on the forum to ask for help. The link is here.
http://forums.ni.com/t5/LabVIEW/Polling-hardware-without-holding-back-QSM/td-p/3593907