Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Generating a 5v signal with PCI 6602

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

0 Kudos
Message 1 of 7
(5,242 Views)

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

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
Message 2 of 7
(5,239 Views)

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

 

 

0 Kudos
Message 3 of 7
(5,224 Views)

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

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 4 of 7
(5,215 Views)

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

0 Kudos
Message 5 of 7
(5,205 Views)

Anthony:

 

See image attachements.

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
Download All
0 Kudos
Message 6 of 7
(5,198 Views)

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.

0 Kudos
Message 7 of 7
(5,186 Views)