Hi and thanks in advance for reading this.
I have a setup with 4 stepper motors. 3 of them, which are working perfectly, are connected to Parker E-AC drives and controlled using a NI PXI-7334 motion controller. However, the 4th motor is a very high torque one that comes with a drive/analog speed controller already included, and the only way to control it is sinking the start/stop (0V=start 5V=stop) input. To do this I use a PCI-CTR05 DIO card from measurement computing. As it's easy to see the motor will move for the time the start/stop input is low and will stop as soon as it goes high again. A VI to do this is pretty much straightforward: send a TRUE command through one of the DIO card's outputs to activate a relay that will close the start switch
, wait for a desired time, and then send a FALSE command for the relay to open the circuit again. The problem I have is that, as I mentioned before, the motor has a very high torque, so we need to use limit switches to kill the motor in any case we reach the limits to avoid any damage. The switches are connected to 2 of the DIO card's digital inputs and we already have a simple VI that constantly polls these inputs to determine when a limit switch is active. However, I haven't been able to make both things, moving the motor and poll the limit switches status, to work together in a single VI. The main problem is that when the motor is engaged the VI won't execute anything else until the "wait for X ms" command had been executed, so it's impossible to run the while loop to poll the digital inputs. I've tried several options to make this work, but either the motor will move until the wait time has passed ignoring the limit switches, or it will move erratically as the CPU give priority to
either the while loop or the wait command. Please let me know if you have any suggestion on how to make both things to work together.
Thanks for you time.