From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
01-31-2017 04:27 PM
Hi,
I am trying to adapt some LabView code so that I can input multiple points and let it follow that path continuously, but I'm running into the problem that either I have to delay the inputs by several seconds or the motors will receive new inputs before they finish moving. I tried to do this with a stacked sequence and just duplicating the frames, but the error outputs wouldn't wired together. Currently I just have a while loop that iterates through a 5x5 array for the 5 motor inputs after a couple seconds.
I would appreciate either a way to force it to wait until the motors stop or a cleaner way of inputing the position data.
Best,
Alicia
01-31-2017 09:33 PM
Holy canole, you need some subVIs up in there. Your code should not span across more than 1 montior.
Also, code like this is redundant.. these are all the same data, just wire them together. You can also drag down on an Index Array node to index at more indices.
The best way to do what you're trying to do is to be able to read in the positional status of your motors and act accordingly once they arrive at their desired destinations. Can you read in the current positional info? If you can't use feedback information, you will have to just add a large enough wait to account for the movement.
I would suggest you look in to a State Machine architecture. A state machine could give you a scaleable way of setting your motor states.
The Simple State Machine template that ships with LabVIEW is really the best way for new developers to get familiar with LabVIEW while utilizing a semi-scalable architecture.
Here's a broad example of how a state machine works:
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'