From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I use LabView to switch a motor on/ off?

Sorry I forgot to put the attachments. Here are the TWO files.
0 Kudos
Message 11 of 18
(2,280 Views)
I do not know how to sent TWO files. Here is the file in PDF format.
0 Kudos
Message 12 of 18
(2,280 Views)
Hi,
unfortunately, the person who wrote the paper hasn't said the daq card connections, however, it looks from the diagram to have been done through AI channel 1 and AO channel 0
So for your DAQ card that would be the AO 0 to the output circuit drive (pin 20 AO0 to the resistor attached to the base of the transistor, pin 23 AO Gnd to ground), and the AI to the reference voltage (depending on how you've got the daq card setup in Measurement and Automation explorer = Diff = Ref voltage goes to 3 ai0, the ground side going to pin 4 ai8. If set for RSE, then pin 3 and pin 1, nrse then pin 3 and pin 19)

The code you've attached uses the digital port however, so I've no idea what you are trying to aceive with this code.
Also, since you seem to be asking about a setup that requires a certain level of timing to it, then the digital lines (which are static) are not going to be ideal, since you're using software timing to drive them.
I can only assume that the code you attached doesn't run through the board you made from the pdf.
In which case, I'd suggest you talk to the person who made that code, and find out what they were aiming at.

Thanks

Sacha Emery
National Instruments (UK)
// it takes almost no time to rate an answer Smiley Wink
0 Kudos
Message 13 of 18
(2,270 Views)
Sorry I sent the wrong VI. I am now sending the correct VI. One part deals with controlling a stepper, the other a DC motor.
0 Kudos
Message 14 of 18
(2,252 Views)
Hi,
you've not attached the actual pwm .vi, where I assume the actual analog input and output is done.
I strongly suggest you talk to the person who wrote the vi for you to work out what to wire where,
as they're the most likely to know. Anything I suggest is based on looking at sections of your code
and may or may not be totally correct. (See previous note)

Thanks
Sacha Emery
National Instruments (UK)
// it takes almost no time to rate an answer Smiley Wink
0 Kudos
Message 15 of 18
(2,240 Views)
I am now attaching the actual PWM. The next file I will attach a file regarding 6025E PINS.
0 Kudos
Message 16 of 18
(2,224 Views)
Now I am sending the 6025E card 50 PINS.
0 Kudos
Message 17 of 18
(2,223 Views)

How can I use LabView to switch a motor on/ off?

0 Kudos
Message 18 of 18
(752 Views)