Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronizing a NI motion controller with a DAQ

Hello,

 

I'm new to NI Motion control VI instruments and I'm amazed at the wealth of NI support and information that is available.  I'm finally ready for some real on-line help.

I’ve been trying to synchronize a Motion Controller PCI-7433 with a PCI-6120-S DAQ (with NI BNC-2110 h/w I/O box) device.  I found a few examples on the NI web site that seemed to suit my needs nicely.  However, when I executed the vi's I had some issues.  

 

1.  I also ran 25114.vi-Motion synchronization with DAQ via RTSI (encoder-External scan clock).  The motor runs fine, then the DAQ times out (red light comes on), no encoder pulses apear, and program stops.   I change number of scans, target position, and source with no change.  What's am I missing? 

2.  I also down loaded file 202925.vi-RTSI with DAQmx (breakpoint-external sample clock).  The motor moves, breakpoint indicator comes on, then after 10 seconds I get the error shown by attached file.  I have made several adjustments to sample clock parameters and brakpoint position with no success.  The encoder position pulse train never appears in the Waveform Chart?

 

I prefer to use the RTSI to synch activities in example 1 above, but I am at a loss why neither synch option works? 

I look forward to learning and working with you in this forum. 

 

Staffan

 

 

Staffan
0 Kudos
Message 1 of 18
(5,606 Views)

Hi Steffan,

Could you link me the examples you are refering to.  That way I know I am looking at the exact ones you are refering to.  Also I would first try the examples that are int eh example finder to see if they work.  I found some good ones by going to the example finder (with the browser tab selected), and going to the folder Hardware Input and Output->Motion Control->RTSI Synchronization.

I found one called "RTSI with DAQmx (encoder-external scan clock Continuous).vi" which looks to be exactly what you are looking for.

You may also want to start by testing just the DAQ board first with some of the built in examples.  That way we are able to tell if it is the DAQ card or the DAQ card with the Motion control.

Brian K.
0 Kudos
Message 2 of 18
(5,577 Views)
 
 
 
Staffan
0 Kudos
Message 3 of 18
(5,564 Views)

Hi Brian,

I ran the VI that you proposed above and encountered the attached error message.  I had reinitialized the motion controler and reset the DAQmx card prior to runing the VI.  In addition, when I loaded the VI none of the sub-vi's for the DAQmx were recognized.  I had to manually add them form the functions palet.  Please advise.

 

Staffan
0 Kudos
Message 4 of 18
(5,522 Views)
Hi Staffan,

The error message usually means that a DAQmx task is being started while another task is in progress on the same board.  Are you running any other VIs while this is running?  Is MAX open?  If either another VI or MAX is using the resource, you will get this error.  If you were using a traditional DAQ VI before using a DAQmx VI, you will have to select "reset driver for Traditional NI-DAQ" from MAX, but it sounds like you already did this.

Also, the example has incorrectly linked DAQmx subVIs.  This is a known issue.  The workaround is to load the DAQmx Craete Channel, DAQmx Timing, and DAQmx Read, either beforehand in another VI, or just place them on the example program's block diagram and then delete them.  Once they are loaded into memory, LabVIEW will recognize them and update the links.

Please let me know if you are still seeing this error after checking these items.
Regards,
Brandon M.
Applications Engineer
National Instruments
0 Kudos
Message 5 of 18
(5,509 Views)

Hi Brandon,

With a little experimentation I discovered your trick, and it worked well.  The error is now gone.  However, when I run the VI, the motor runs, but I do not get a waveform signal (from the DAQ) on the screen.  I reviewed all my NI software and deremined that I needed to upgrade many drivers including move to LabView 8.2.1.  In the process, I discovered that my PCI-6120 DAQmx card was NOT registered with NI.  Could this be part of the problem?

Staffan
0 Kudos
Message 6 of 18
(5,505 Views)
Hi Staffan,

When you say not registered with NI, what do you mean?  It is not showing up in Measurement and Automation Explorer or is there another error that I am not understanding?  What version of DAQmx are you using?  8.5? 8.6?

Let me know, thanks!

Justin
0 Kudos
Message 7 of 18
(5,497 Views)

Justin,

I'm using DAQmx 8.5,  Yes, 6120 DAQ is present (and fuctioning) in MAX 4.2.

When I updated the drivers for DAQ and Motion Controler, upon PC restart, I was notified that the PCI-6120 was not registered.  I skipped the step, thinking I would do this later, using the 14 day delay option.

Staffan
0 Kudos
Message 8 of 18
(5,490 Views)
Hi Staffan,

Registering the hardware will not affect its performance.  As long as you see the 6120 in MAX under Devices and Interfaces » NI-DAQmx Devices, there is no error message, and the device passes the self-test, then it should work fine.

Can you verify that the PCI-6120 performs properly from the Test Panels in MAX?
Regards,
Brandon M.
Applications Engineer
National Instruments
0 Kudos
Message 9 of 18
(5,463 Views)

Brandon,

Everything with the 6120 is working OK, under MAX.  However, I'm not getting the waveform on the "RTSI with DAQmx (encoder-external scan clock Continuous).vi".  No errors, and motor runs like it should.  Not clear why not?

Staffan
0 Kudos
Message 10 of 18
(5,457 Views)