LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

stepper motor with DAQ assist instead of write to digital port?

Hello, I have a L293 and a NI-usb-6009.  I have connected the L293 to the digital outputs of the 6009, and connected my stepper motor to the L293.  I then followed this tutorial as to how to make a vi that controls the stepper motor: http://etidweb.tamu.edu/projects/labview/stepper/vi.htm

However, at the end, the tutorial shows the use of "write to digital port" which I do not see as an available option on my labview 8.2.  I'm assuming that's because the tutorial was made with an older version of labview.  So my question is, how can I finish this tutorial?  Do I use the Daq Assist, and how would I fit that into the nearly finished vi that I have made from the tutorial?

 

Thanks

0 Kudos
Message 1 of 9
(3,845 Views)

Hey,

 

The "Write to digital Port" is a function from the traditional DAQ Driver.

In DAQmx you would have to create a Task for Digital Output and use DAQmx Write instead.

 

DAQ_write_DOline.png

 

 

Of course, you could also use the DAQmx Express VI.

 

 

Christian

Message 2 of 9
(3,793 Views)

uoprummel,

 

A comment and a question.

 

1. I learned something new yesterday from your post. I have been using the L293 and its improved pin for pin replacement the 754410 for a few years and never seen the device used to control a Stepper, I did not think it could, that is why in a previous topic you started, I tried to tell you how to use this chip to drive a standard DC motor. Sorry for confusing you. After seeing this post I did some research and found the device can indeed be used for driving (certain) steppers. Actually if you go this route the 754410 has internal clamping diodes and would be a better choice, it is a pin for pin replacement and it only costs a few bucks.

 

2. The link you inserted to this post talks about setting up the 8255 in the PCI card and since you are using a 6009 have you thought about the changes needed?

 

3.  Do you know how you are going to wire the L293/754410 to the stepper and the DAQ card? I would be interested in the details when you get it sorted.

 

Alan

Message 3 of 9
(3,779 Views)

Thanks Christian,

Another quick question about that link...

I'm confused as to what the input into the "index array" is.  Is the little blue box that is separated into two blue boxes, one has a zero and the other has "AA".  I'm assuming this is the array, but I'm not quite sure how to make/access this particular box.  And doesn't blue mean number, so how is it "AA"?

 

Thanks!

-Nick

0 Kudos
Message 4 of 9
(3,759 Views)

Alan-

No problem, I realize that I'm not using the ideal equipment for this to be the easiest of project... I looked at the data sheet for the 754410, and I'm confused as to how it's different from the L293.  I would love to be able to simplify my project by only spending a couple more bucks!  Anyway, I have pins 2, 7, 10 and 15 going into p0.0, p0.1, p0.2, and p0.3, pins 1 and 9 into p1.1 and p1.2, pin 8 to a 12V power supply (what my motor requires), pin 16 to +5V, pins 4, 5, 12, and 13 to ground, then pins 3, 6, 11, and 14 to the motor.

Also, I didn't see in the link a mention of the 8225 and PCI... I was just hoping that the set-up and vi described there would work for me.

 

Hope this helps!

 

-Nick

0 Kudos
Message 5 of 9
(3,755 Views)

Hi Nick,

 

You are correct in assuming that the input is an array. To make an array on your block diagram, place an array constant on your block diagram and then place a numeric constant into the array constant. The array constant is found in the array pallet and the numeric constant is found in the numeric pallet.

 

The reason why it shows "AA" in the array is because they are using hexadecimal format. To change the format to hexadecimal, right click on an element in the array and select Display Format. In the dialog box, select the Type as Hexadecimal. All the values in the array will now be represented as a hexadecimal number.

 

Paul

National Instruments

Applications Engineer

Message 6 of 9
(3,749 Views)

 


uoprummel wrote:

 

Also, I didn't see in the link a mention of the 8225 and PCI... I was just hoping that the set-up and vi described there would work for me.

 

Hope this helps!

 

-Nick

 


 

Nick,

 

Just goto the link in your post and read the page "Stepper Motor VI" It explains what the intention of the various parts of the Block Diagram are, including setting up the 8255, the 8255 is an IC inside the DAQ they are using. I looked again and they are just setting the port to zero, so I think you can just ignore that.

 

 

In my opinion this is going to be a HUGE task to pull off for someone with NO LabVIEW experience at all. At the very ,very least you should open the "show context help" window in the VI you are creating, hover over all the ICONS in the BD, use the detailed help in the window, and try to understand each step of the way. You should start by taking some of the LabVIEW tutorials though . Just my opinion.

 

Alan


 

0 Kudos
Message 7 of 9
(3,739 Views)

uoprummel wrote:

Alan-

No problem, I realize that I'm not using the ideal equipment for this to be the easiest of project... I looked at the data sheet for the 754410, and I'm confused as to how it's different from the L293.  I would love to be able to simplify my project by only spending a couple more bucks! 

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>.

 

Well with the L293 part you *should* use clamping diodes, 2 per leg. So add 8 diodes. This is so the inductive "kick"  from the motor coils doesn't  kill your L 293. The 754410 has built in clamping diodes.  You might get away with out the diodes for a while (or not) But it is recommended.

 

Oh, one more thing to consider, I looked at the motor specs from a previous post  of yours, the motor will consume about 300mills per phase, so in most cases this motor driver IC L293/754410 will be sinking about 600 mills. It will get really,really,really HOT. So heat sink it, and don't touch it!

 

Alan

 

 

Message 8 of 9
(3,720 Views)

In case anybody is interested, I posted a VI here that I think should be helpful for the original poster.

 

 

Best Regards,

John Passiak
Message 9 of 9
(3,684 Views)