Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Generate Digital Pulses BNC 2120

Hello,

 

I am new to LabView and I am trying to use a DAQ Assistant to generate a discrete number of digital square pulses to be fed to a stepper motor driver via BNC 2120.  But I don't know how to go about doing this.

 

I had an idea that I would use a Timed Sequence with 2 frames, the first frame would have a DAQ in it, and there would be a 1-D array of Boolean (TRUE) input in to the "'data" field of the DAQ. 
Then the second frame would have a DAQ in it, and there would be a 1-D array of Boolean (FALSE) input in to the "'data" field of the DAQ. 

 

 

 

But like I said I am very new to LabView and so I don't know if this approach makes sense. Please offer some suggestions!

0 Kudos
Message 1 of 7
(4,977 Views)

Hi Millec311,

 

You could use a Counter output to generate a finite Pulse Train, depending on the DAQ card you have installed.  What DAQ device are you coupling to your 2120?  Also, if you would like to just use the digital lines, you would want to pass an array of 1010101... to the digital line.  This would toggle the digital HI/LO accordingly, and thus create the square wave pattern you desire.

 

Here is an example that use the low level DAQmx API instead of the DAQ Assistant:

https://forums.ni.com/t5/NI-DAQmx-Examples/Generate-Finite-Digital-Pulse-Train/td-p/3512197

 

Best,

Adam
Academic Product Manager
National Intruments
0 Kudos
Message 2 of 7
(4,960 Views)

Hello again,

 

The Counter Output functionality is what I would ideally want.  But the BNC-2120 only has 2 ports for Counter Output and I am going to eventually need to supply more than 2 stepper motors.  So I want to create a finite Pulse Train with Digital Outputs because that has 8 ports or so.

 

The array of 101010... sounds good. I will see if I can get that to work

 

Sorry, I am not sure what you mean by "what DAQ device are you coupling to your 2120?"

0 Kudos
Message 3 of 7
(4,952 Views)

The 2120 is a terminal block. It does not do data acquisition/digital generation/etc. It has to connected to an actual data acquisition device. If you don't have it connected to something, then your first step is to get a piece of hardware that will do what you want.

0 Kudos
Message 4 of 7
(4,942 Views)

Hello,

 

Please I have a 6 leads bipolar stepper. I'm trying to connect on a BNC 2120 using LabView. Also, when I bought the stepper, I also bought a driver carrier (A4983 from pololu.com). I connected the stepper with the driver using the manual sheet on pololu.com. My stepper is not working.

Also, I'm new with LabView program and I using helps from my classmate. Please can you help me to achieve this project?

here is the wiring purpose by pololu.com, on this hypertext (http://www.pololu.com/catalog/product/1201)

Instead of using their microcontroller, I wired base on the output configuration of the driver carrier to the NI BNC 2120 digital I/O.

0 Kudos
Message 5 of 7
(4,546 Views)

Herz,

 

We will definitely need some more information before helping you on this issue, how are you connecting the BNC 2120 to your LabVIEW code to generate the stepper signals?  If you can posting your LabVIEW code may help us debug your issue further.  

 

A quick search for an example resulted in this VI which may be able to help you:

 

https://forums.ni.com/t5/Example-Code/Using-SW-Timed-Digital-I-O-to-Control-a-Stepper-Motor-with-DAQ...

 

Also as this question is posted in an old topic you may want to create a new topic so your question receives more visibility and a solution is found quicker.

 

Regards,

 

J-Newkirk

Applications Engineer

National Instruments

 

J Newk
Systems Engineer
National Instruments
0 Kudos
Message 6 of 7
(4,529 Views)

Hi all.

I am currently doing a final year project to run six stepper motors using labview. 

I was using an arduino mega to control the motors. When I had wrote the program to control the motors realized I only had enough outputs to control one motor.

Now I intend on using the BNC 2120 to generate the pulses to run the motors but I have no idea where to start. 

Any help would go along way. 

I am using 6 Digital inputs for each motor. i have attached the VI i am using

 

thanks in advance

 

 

0 Kudos
Message 7 of 7
(4,252 Views)