09-13-2016 03:45 PM
I'm unsure what exactly you want to do with the true value, but could you not just set the bWait input of the move function to True? That way execution will wait until the move is completed.
09-13-2016 03:48 PM
Once the move is completed, I want to stop my vi by sending true to the loop condition.
I believe wiring the bwait function would make the motor wait prior to moving, not wait after it has completed. My understanding of that may be wrong however.
Thanks,
Paige
09-13-2016 03:54 PM
The bWait waits until the move the True is wired to has finished. I also avoided using the MoveJog Methods and instead only used MoveAbsoluteEx/MoveRelativeEx. This worked for me anyway.
09-13-2016 04:09 PM
I guess when I saw that you were using MoveJog I assumed it was a stage that couldn't use the MoveAbsolute function (for instance, this one).
If you can use one of the functions than has a bWait input, then by far the simplest option is to do that. You only need to get more complex than that if you want to have multiple stages moving at the same time or if you want your program to do other things while it's moving.
Learning about callback VIs is a good thing to know in general but it may be a bit early in your learning experience to do so. Just so you know, callback VIs can never return values directly like normal VIs; they can only send some sort of asynchronous message. Since LabVIEW never knows when or how often they will need to run them, it can't ever treat an "event callback" VI just like a normal subVI.
09-13-2016 06:41 PM
Okay I see. I am using MoveJog because it allows me to set velocity parameters for the move. I attempted to use move absolute in combination with the SetVelocityParameters, but they did not work in combination together.
I need something that moves a specified distance in a specified direction with specified velocity parameters. Then once the specified distance has been moved (move completed), I need the vi to stop.
Sorry, I should have included more information in the original description.
09-13-2016 07:08 PM
I think I got this to work!
09-13-2016 07:09 PM - edited 09-13-2016 07:17 PM
Thats strange! I can use SetVelParams for setting the values in MoveAbsoluteEx. The problem you're facing now is exactly what drove me from Kinesis back to APT.
09-28-2016 05:34 PM
Hey!
So i think the relative position method is going to be better for me. What can I do here to assign the direction that the motor goes in? A method with an IChanDir usually allows this, but none of the moving methods except moveJog and MoveVelocity have it.
Thanks for the help
09-29-2016 12:07 AM
Positive values move one way, negative values move the other way...
10-26-2016 10:49 AM