07-05-2018 02:44 PM
Hi,
I am relatively new to LabView. I am designing a program to control a stepper motor. I have attached a copy of my VI below. Basically I am trying to send a set of pulses from the DAQ to the stepper motor driver (L298n) and then get the driver to move the stepper motor.
The pulses that I am trying to send are.
1000
0010
0100
0001
I have tried this with an Arduino and it works just fine, however the stepper seems to jam when i try it on the DAQ.
Any help would be greatly appreciated.
07-05-2018 03:06 PM
Please attach a VI Snippet/image of your code, not everyone has LV 18 yet.
07-06-2018 09:20 AM
Hi BertMcMahan,
I have attached a picture of the VI and a corresponding block diagram. It works for longet time delays but the moment I start to reduce the delays everything starts to go wrong.
07-06-2018 10:37 AM
What is the point of the multiple loops?
You are writing to all four DAQ assistant outputs randomly, with no synchronization between the two loops. Just use one loop - use dataflow to enforce the DAQ write timing.
07-06-2018 11:13 AM
Okay, will try that and see how it goes.
Thanks
07-09-2018 10:30 AM
I'd *strongly* recommend not using DAQ assistants and coding it directly. If you MUST use DAQ assistants, just use one, not four, as they can become desynchronized easily.
07-12-2018 02:14 PM
Thinking about it again... I bet your four assistants are the problem. With no way to enforce which one fires first, your step/direction pulse pattern won't generate properly. Use only one assistant and it'll probably work fine.