08-18-2009 11:57 AM
Hi Im trying to drive a stepper motor using the PCI 6602.
At present I can control the speed of the motor by changing the frequency of the puls I generate.
What I want to do now is to be able to reverse the motor. For this to happen a pin on the stepper motor controller needs to be taken high 5V.
I hence need to generate a constant 5v signal when I need it. This sounds trivial but I havent been able to do it and I cant find it in the example finder.
Can anyone point me in the right direction?
Thank you
08-18-2009 12:32 PM
The 6602 has 32 lines of digital I/O available, you can use one of those. For a vi, Help/Find Examples/Hardware Input and Output/Daq mx/Digital Generation/Write Dig Channel.vi would be a good starting point.
-AK2DM
08-19-2009 05:24 AM
Hi AK2DM thanks for the reply.
I looked at the example yousugested and I managed to get the voltage when presing the button.
I don fully undertand how it works yet but I think I will get there in the end.
Now I will try to incorporate it into the other program I have so that it recognises when it needs to swich on automatically. this will probably use the fact that a value goes negative as a slider bar is moved to the left.
will it be possible to replace the user array with one that takes signals from the program? how can I set up the array for this Im guessing I will have to ypue the build array tool but then Imnot quite sure what to do.
Thanks again for your help
Anthony
08-19-2009 10:54 AM
Good progress, see attached modified example. I deleted the array, created a boolean control which you can replace with the T/F condition in your program. Compare this to the original program, refer to the comments I put near changes.
-AK2DM
08-20-2009 03:27 AM
Hi AK2DM,
thanks for the code but I cant open it. Im running LabVIew 8. I s there a way to save it so that I can open it?
Failing that an image will have to do I guess.
Thanks again,
Anthony
08-20-2009 11:03 AM
Anthony:
See image attachements.
-AK2DM
08-21-2009 07:14 AM
Thanks AK2DM,
I'v got that working now and I have put a sider bar as well. now when the slider goes negative I get a signal.
I trinig to incorprate it into the other part of the program. Ill let you know if I have any difficulties.