Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading relative position on multiple axis

Hi all,
 
I need to read the relative position on two axis via the encoders. I have open loop steppers with encoders. I can read the encoder position on one axis easy enough be we need to read the encoder position of two axis simultaniously. I have looked at high speed capture but this only supports one axis. We have the top end motion card 7358. Taking two reads of the encoders a different times is not good enough for our application - any ideas? I guess I could write a DSP program, if this is the answer does anyone know of any examples? I was hoping there would be an easier way to solve this challenge.
 
TIA
 
-Martin
Certified LabVIEW Architect
0 Kudos
Message 1 of 18
(5,934 Views)

Martin,

if your axes don't run independently you could assign them to a single vector space and read the vector space position with a single command.
If this is not possible I think the only way to capture the positions exactly at the same time would be to use a counter device like the PCI-6602 or the counters of an M-Series board like the PCI-6220.

Both, the motion board and the measurement device provide an RTSI connector that you could use to route the encoder signals from the motion board to the measurement device. This allows you to read the axes' positions with the measurement device without the need of external cabling.

I hope that helps,

Jochen Klier
National Instruments Germany

 
0 Kudos
Message 2 of 18
(5,920 Views)

Thanks for the advice,

We will probably use counters as you suggest. I will have a look at using vectors but the application is complicated. We have a stepper in velocity mode with another axis geared off that, we then superimpose point to point moves on the slave. Not sure how compatible all this is with vectors, I'll give it half an hour or so.

Thanks again

-Martin

Certified LabVIEW Architect
0 Kudos
Message 3 of 18
(5,916 Views)

Hi,

Can anyone point me to a LabVIEW 8 compatible example that would serve as a good starting place for continuously measuring the position of 2 encoders simultaneously? As previously mentioned I should be able to do this using RTSI between the PCI-7358 and the PCI-6602 (no external cables). I need to accurately calculate the relative angle between 2 open-loop servos that act as steppers. As far as the NI configuration is concerned the motors are steppers.

The encoders are emulated from the servo amplifiers and are set to 4000 counts/rev and include an index pulse.

I have found the following: "Measure Angular Position.vi" that almost does exactly what I need but I think this does not work over RTSI, correct?

Any advice would be appreciated.

TIA

-Martin

Message Edited by Martin.D on 06-05-2007 11:19 AM

Certified LabVIEW Architect
0 Kudos
Message 4 of 18
(5,729 Views)
why?a vector space is supported by the buffer high speed capture to read multiple axises synchronously which can konw from the help,but when I try to do this,it is not as help says.Why?error -70006 ocurred.the error.JPG
0 Kudos
Message 5 of 18
(5,124 Views)

Dear Martin.D

 

To effectively measure and monitor the position of the encoders, use the DAQmx functions. And use a digital trigger with the source as the encoder channel that starts recording data as soon as the encoder is initialised. Look at the Cont Acq & chart samples Int-Clk-Dig Start VI in the examples or from NI.com examples and use this for your two lines. Set the sample clock for both lines as the same so that both are synchronised. The VI is an adaptation on the example using the two lines. Set your relevant sources and what outputs you desire. Please let me know how you get on with this.

 

untitled.PNG

 

Xiaofengliu, your -70006 error code typically corresponds to an error on the axis input. If you receive this error code when using a Load DAC function, it is most likely due to an improper 'DAC' input. This error is common when using the flex_load_dac function in a text based programming language. The DAC input requires a resource identifier for the DAC to be used. This identifier is not just a simple number, but rather a hex id number unique to each axis. 

Many thanks for using the NI forums and I look forward to your reply.

Kind regards

David

Applications Engineer
National Instruments UK
0 Kudos
Message 6 of 18
(5,099 Views)

Hi David:

I want to capture the position of multi-axises at the same time at the rising edge of the trigger sigals(the signals of all triggers are the same).How can I modify my procedure according to your advise?How should I configure the

vector space?I have ask some engineers in Shanghai,but until now ,the question is not reslove.


0 Kudos
Message 7 of 18
(5,088 Views)

Hi xiaofengliu

 

Thanks for your quick reply. Simply conenct both trigger sources to each other in the VI. As for the vector space, what do you mean by this? You should not need to configure this. Also your attached VI does not work. Are you using the DAQmx VI's?

Many thanks for using the NI forums and I look forward to your reply.

Kind regards

David

Applications Engineer
National Instruments UK
0 Kudos
Message 8 of 18
(5,083 Views)

Hi David,

Thanks very much for your kind reply.

My vi refers to motion control.I want to read the positons of each axis at the edge of the triggers.I used the example which is called buffer high speed capture.This vi is said to can capture the postions at the edge of the triggers.The trigger signal connect with the trigger input in UMI-7774,in which each axis has a corresponding trigger input.The vi should be applied in multi-axises.But one axis is ok,if multi-axises don,t work.I apply this vi to mulit-axises through configuring vecotr space.If this way does't work,how should I do?Can you give me some advise?

I have find some correlative problems in this forum, http://forums.ni.com/ni/board/message?board.id=240&thread.id=5883&view=by_date_ascending&page=2.But I download this late motion software,the problem is still not solved.

Look forward for your reply.

0 Kudos
Message 9 of 18
(5,070 Views)

Dear xiaofengliu

 

Many thanks for your reply. Have you looked at the example VI named: Meas Anglular Position Buffered Cont Ext Clk.Vi? This example demonstrates how to measure angular position using a quadrature encoder on a Counter Input Channel.  The Decoding Type, Pulses Per Revolution, Z Index Enable, Z Index Phase, Z Index Value, and Sample Clock Source are all configurable.
Position is measured on the counter's default A, B, and Z input terminals.

 

Are you usingthe NI-Motion control toolkit with LabVIEW as this is the toolkit that is designed for what you want?

 

There is also a related forum that should point you in the right direction:

 

https://forums.ni.com/t5/ARCHIVE-NI-Applications/blend-motion-and-breakpoint-code-does-not-work-as-e...

 

Please see the attached buffered example breakpoint.vi on this forum

 

Please let me know if this helps and I can see what direction you want to go in.

 

 

 

Many thanks for using the NI forums and I look forward to your reply.

Kind regards

David

Applications Engineer
National Instruments UK
0 Kudos
Message 10 of 18
(5,059 Views)