08-03-2022 09:16 AM
Hello,
I have written a LV code, which has to run 2 stepper motors in synchronous or in simultaneous mode(any of them is fine), but when I execute my code I see 2nd motor is performing it's actions after the 1st motor has completed it's action. I have 2 different boards for controlling 2 different motors.
Help is much appreciated on how to approach this problem.
Thank you.
08-03-2022 09:31 AM
Hi Mak,
are those subVIs reentrant?
Does the motor driver allow controlling several motors in parallel?
Mind to share more information about your motor and that driver and maybe even attach real code instead of an image of parts of your code?
08-03-2022 09:31 AM
If you need true synchronous, it has to be supported by your stepper motor controller or driver. Software is not true-synchronous.
08-03-2022 09:47 AM
Hi,
I have attached a zip file with the code, I am not sure if the subVIs is reentrant or not.
Yes the motor controller allows controlling two different motors in parallel.
08-03-2022 01:33 PM - edited 08-03-2022 01:34 PM
Hi Mak,
@Mak_2496 wrote:
I have attached a zip file with the code,
Please use real ZIP format next time, not everybody has 7zip available - "default" ZIP is already supported by Windows (and any other recent OS)…
Next time you should also include all those driver VIs as right now all we see are a lot of missing subVIs!
Btw. why do you place that driver that deep in a totally wrong folder inside instr.lib?
See this:
Why did you install your VistaMotorsLib inside the Public\Utility folder of the Agilent34401 driver???
@Mak_2496 wrote:
I am not sure if the subVIs is reentrant or not.
As long as you don't attach all the subVIs we don't know either!
08-03-2022 01:45 PM
Hi GerdW,
Ok, I'll use default zip.
Sorry, I sent a wrong file. Please take a look at this file.
Thank you.
08-03-2022 02:29 PM
Hi Mak,
@Mak_2496 wrote:Sorry, I sent a wrong file.
Getting those subVIs doesn't make it better - they are really ugly!
Who wrote them?
Example: non of the subVIs I looked at did provide an entry in the context help window…
As they use a lot of global variables I don't think they allow to control independent axes/motors in parallel!
And no, those subVIs are not reentrant. So they don't allow to execute several instances in parallel…