Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronizing a NI motion controller with a DAQ

Staffan,

You should be seeing the exact same data in your VI that you see in MAX.  So if you open MAX, and highlight your 6120, and select test panels, you should be able to verify that you see the analog input that you expect on a given channel.  Then, if you switch to the VI front panel, and ensure that you are on the same device and channel in "physical channels," you can run the VI.  You should see the motor move, and you should see the same analog input waveform that you observed from MAX.  (You will need to make sure that you stop the test panel in MAX as they cannot run simultaneously.)

If you repeat these steps, what do you see from the test panel, and what do you see in the VI?  What does the signal that you are measuring look like?
Regards,
Brandon M.
Applications Engineer
National Instruments
0 Kudos
Message 11 of 18
(2,278 Views)

Brandon,

Using MAX, I started the motor, then switched to the 6120 to view the analog signal out.  As expected, the sine wave was clearly visible through MAX.  When I return to the VI, no signal present.  My setup is Axis 1, Source: Phase A 1, Physical Channels: Dev1/ai0.  I also changed the Waveform Chart from Dev1/ai1 to Dev1/ai0.  I do not see the analog signal I saw in MAX.  There is no signal at all, even with axis auto scaling on.  I was expecting to see Axis 1, Phase A 1, encoder pulses with this VI.  I would like to capture not only the anaolg signal but also the encoder signal.  Any suggestions?

Staffan
0 Kudos
Message 12 of 18
(2,268 Views)
Staffan,

I have a few suggestions.  First off, are you seeing a flat line or no signal at all?  If there is no signal, what happens when you run the VI in highlight execution mode?  You should also try probing the wires coming out of the DAQmx read and also the wires going into the Waveform Chart.  Another thing that might eliminate a possible source of error is to connect your analog inputs to a DC voltage and verify that you see the same results with a DC voltage.

Please try these steps and let me know what happens.
Regards,
Brandon M.
Applications Engineer
National Instruments
0 Kudos
Message 13 of 18
(2,261 Views)

Brandon,

I'm not seeing any line, not even a flat line.  There is no change when I add the 5 VDC to the analog input.  When I run in highlite execution mode, DAQmx reads "0", and Waveform Chart is again empty. 

Staffan
0 Kudos
Message 14 of 18
(2,250 Views)
Staffan,

What are all of the settings for your front panel controls?  Do you actually have a RTSI cable connected to the PCI cards?  Is the RTSI cable configured in MAX?

Can you try some of the other RTSI with DAQmx examples from that same library and see if they produce the same results?
Regards,
Brandon M.
Applications Engineer
National Instruments
0 Kudos
Message 15 of 18
(2,240 Views)

Brandon,

You're right.  MAX is not configured with a RTSI cable.  I'll have to get the RTSI cable.  If I have  any issues I'll start a new message item.

Thanks, for all your help.

Staffan
0 Kudos
Message 16 of 18
(2,233 Views)
Staffan,

Great!  Let me know if you run into any more problems on this.
Regards,
Brandon M.
Applications Engineer
National Instruments
0 Kudos
Message 17 of 18
(2,215 Views)

Brandon,

I've installed the RTSI cable and configured it in MAX.  I can now see a signal each time the motor runs but the signal looks like noise.  See attached file.  There is no change in signal when I select another axis or RTSI physical channel.

At one time I did get a very noisy, low voltage level, sine wave signal from one of the physical channels (Dev1/ai1) but I can't duplicate it again.  I was anticipating a clean encoder (step) signal from the "RTSI with DAQmx (encoder-external scan clock Continuous).vi".  Am I missing anything else?

Staffan
0 Kudos
Message 18 of 18
(2,031 Views)