LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Computmotor 6K Motion Controller LabView program

 


@arthur51189 wrote:

But how come after the track moves, it goes back to the original home position 


I can't understand your question.  Your code tells it to find the home position.  It does some initialization, sends motion commands in a loop (the nested for loops) and at the end it runs HOM, which causes it to search for the home sensor.  Homing runs in the negative direction until either it reaches the home sensor, or it reaches the end of travel and runs in the reverse direction until it finds the home sensor (or the other end of travel limit).  Once it finds the home sensor it stops.  If you run the code again without doing anything, of course you are starting from the home position, so it will find that same home position again.  However, it doesn't know that that's the home position.  If you simply want to go back to the starting location at the end of the program, you should use an absolute move to get back to that position instead of using HOM.

 

0 Kudos
Message 21 of 43
(2,097 Views)

Is absolute move MA? 

0 Kudos
Message 22 of 43
(2,095 Views)

MA 1 sets the mode to absolute moves (assuming continuous movement, MC, is off).  You can set the starting position as 0 by using "PSET 0" and then return to that location by setting MA 1 and then D 0.  If you do it this way, it will always attempt to return to the starting position.  If a move gets interrupted or doesn't complete and it never makes it back to the starting location, then you will need to home it to return to the original location.

 

What did you expect the HOM command to do?

0 Kudos
Message 23 of 43
(2,093 Views)

I thought the HOME postion was basically where the movement started and its where it was going to end thats what i thought it was for 

0 Kudos
Message 24 of 43
(2,083 Views)

So on my last block where i have "Back to HOME" i should do the absolute move?

0 Kudos
Message 25 of 43
(2,081 Views)

 


@arthur51189 wrote:

So on my last block where i have "Back to HOME" i should do the absolute move?


Yes.  Also, at the beginning, before you start any moves, you should establish the reference position - either set it using PSET, or retrieve it and store it in a variable.

 

0 Kudos
Message 26 of 43
(2,089 Views)

So before i get into my outer loop i set PSET 0, and then after my loop is completed i have: MA 11 D 0,0 GO 11? Does that look like it should work? 

0 Kudos
Message 27 of 43
(2,083 Views)

Try it out!  It's faster than waiting for a forum reply.

 

Make sure you PSET 0,0 so that you get both axes.

0 Kudos
Message 28 of 43
(2,081 Views)

I gave it a try and for some reason one of the tracks doesn't go back to the original starting point

0 Kudos
Message 29 of 43
(2,071 Views)

 


@arthur51189 wrote:

I gave it a try and for some reason one of the tracks doesn't go back to the original starting point


Sorry, but that's not enough information for me to provide a helpful suggestion.  You might try running the same series of commands directly through the Motion Wizard and see if it's returning an error or other useful information about why the moved failed.  Alternatively you could read from the serial port occasionally and display the result, which would provide the same information.

 

0 Kudos
Message 30 of 43
(2,045 Views)