Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling 3 Stepper motors with Step/Direction over Daq 9184 and 9401

Hello,

 

 

I am new to LabView and very gratfull for help.

For a project I need to controll 3 Stepper motor independently over an Step/Direction Interface. For this interface I need to generate digital impulses where every impuls will be interpretet by the motor as a stepp and on the second channel a constatnt 0 or 1 value for the direction interface. I need to contoll for every stepper independently: The frequency = speed, Direction = 0 or 1, Samples = Continuous or finit and get the written sample count for position calculation.

In short Generating 3 indepentend frequencys and 3x independent Boolean values for output.

I am using a Daq 9184 Chassi and a 9401 for digital IO with Trinamic stepper motors.


The biggest problem at the moment is: Contolling more than one motor (the ctrX output seems to go to every pin or none), to count the samples, the generall conception.

I attached my first not so ideal working try for just one motor.
Thank you very much for help in advance.

 

0 Kudos
Message 1 of 8
(5,799 Views)

Hello,

 

my name is Alex, I am an applications engineer working for NI Germany.

 

You can select the output terminal that you want to use for your step signal using the CO.Pulse.Term property. In the constant which is wired to it you can select one of the PFI lines of your 9401 module. Digital IO lines are called PFI if they are used for counter input or output.

 

I hope this information is helpful for you.

 

Best regards

Alex

Applications Engineering Intern, NI Germany
Certified LabVIEW Developer
0 Kudos
Message 2 of 8
(5,770 Views)

Respected Sir,

                          I am Sujit, using PXI 6361 to generate multiple digital output channel using Daqmx where each channel can be controlled separately (especially in time i.e. when this channel will be off or on or for how long they will be on). I have attached my VI where I have written for two channel lets say port 0 channel 0 and port 0 channel 1 of PXI 6361 that means for two channel. I am facing two problems here,

1) I am not getting output  from the two channel only channel 0 is giving the output whereas the program is running without any error showing.

2) I habe attach the error output of channel 1 after finishing it then add it to the next channel for that the 2nd channel can only be on after the first channel. But i need both of the channel simultaneously.

Can you please sort this out or guide me to correct these problems.

Thank you

0 Kudos
Message 3 of 8
(3,208 Views)

Your device has only 1 timing engine available for DO tasks (and this is pretty typical among NI DAQ devices).  So for starters, the only way to control 2 different digital output lines with hardware timing is to put them both into the same task.

 

That puts more burden on your software for figuring out how to deliver data that controls them (at least somewhat) independently.

 

This old thread you joined was about stepper control though, and for such applications it's *extremely likely* that you should be oriented around counter pulse train tasks rather than digital output.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy coming to an end (finally!). Permanent license pricing remains WIP. Tread carefully.
0 Kudos
Message 4 of 8
(3,206 Views)

Thank you for your prompt reply. If I do the both task in a single line can I control them independently? Or is there any other possible way to do this ? I need two independent digital output pulse with PXI 6361 that is only my requirement where I can independently control any of them in time. I am not expert in this programing so if you help me then it will be very good.

0 Kudos
Message 5 of 8
(3,202 Views)

From the very limited info you've given, I suspect your best path forward is 2 distinct counter output tasks.  A basic distinction between approaching this via Digital vs. Counter task(s) is:

- Digital outputs will need to part of the same task.  Making the output values independent will be difficult, but after that,  coordinating or correlating them in time will be relatively easy.

- Counter outputs will need to be distinct tasks.  Making the outputs independent will be easy, but coordinating or correlating them will be more difficult.

 

Yet one more confirmation of one of my favorite prof quotes from undergrad: "The fundamental law of Engineering is the 'Conservation of Misery'.  You never get something for nothing, there will *always* be tradeoffs."

 

 

-Kevin P

quote: Prof Andrew Mook, SUNY Buffalo, circa 1985.

ALERT! LabVIEW's subscription-only policy coming to an end (finally!). Permanent license pricing remains WIP. Tread carefully.
0 Kudos
Message 6 of 8
(3,194 Views)

Thank you sir. But as I said, I am a beginner in this software so it will be understandable if you can give two example of this two kind, some example VIs. Please provide some example VIs. Thank you

0 Kudos
Message 7 of 8
(3,180 Views)

Start from a couple shipping examples at Help->Find Examples->Hardware->DAQmx->Counter Output.  There are several examples to look at there including finite or continuous output, as well as buffered or not.  Start by checking those.  You can run 2 at the same time if you specify distinct counters for each.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy coming to an end (finally!). Permanent license pricing remains WIP. Tread carefully.
0 Kudos
Message 8 of 8
(3,170 Views)