Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Using ResetPosition.flx to reset encoder causes offset on ADC feedback also

G'day all,
 
I am using labview 8 & a PCI7354 in a servo configuration using both encoder and analog feedback (I switch between the two types of feedback as required at runtime depending on weather I want displacement control or load control - via a load cell).  My problem is that when I reset the encoder position to zero (using ResetPosition.flx), the ADC feedback value is also reset (actually offset) to zero.  This offset is not apparent when reading the ADC value but can be seen in analog feedback mode as an offset between the requested value and the achieved value.  I only want to reset the encoder without affecting the analog feedback, but can't find a way to do it.  There is another VI called ResetEncPos, but this does not appear to do anything when executed.  Apparently it is only for "unmapped encoders".
Any help on this problem would be much appreciated.
 
Note: As a temporary workaround for this problem, I read the ADC and supply this value as the secondary reset parameter to ResetPosition.flx.  By doing this the analog feedback is only offset by a maximum value equal to the peak to peak noise on the ADC channel - but an offset (may) still exist which can be significant.
 
Thanks in advance,
Shane.
0 Kudos
Message 1 of 6
(3,779 Views)

Shane,

There should be a way around your problem.  I am a bit confused regarding what is actually going on.  I have a few questions...

Are you switching your feedback on the fly or are you killing your axis before switching your feedback?

You said...
"By doing this the analog feedback is only offset by a maximum value equal to the peak to peak noise on the ADC channel - but an offset (may) still exist which can be significant."

Can you clarify what you mean... What is causing the offset?  the noise?  Isn't the noise always effecting the system?

Below is what I think I undestand about your problem...

You have two types of feedback (position/encoder and force/analog/strain gauge), you use the position feedback and occasionally reset the position of the encoder.  This changes the primary feedback position to 0.  Then you switch over to the analog feedback and your primary feedback position remains at 0, you would like the primary feedback position to not change and rather always be referenced to the no load voltage of the strain gauge.

Tell me if I understand you correctly.

One thing I don't understand, I would think that reading the ADC channel before doing a reset and then making sure you reset the position to the desired position would fix the problem (this sounds like your current workaround).  I guess I don't understand what is not working when you do this?

I need some clarity.

Lorne Hengst
Application Engineer
National Instruments

0 Kudos
Message 2 of 6
(3,764 Views)
Hi Lorne, (thanks for responding!)
 
The process of switching feedback is done by disabling (not killing) the axis, loading new PID params, switching the primary feedback source, switching the move position source and then re-enabling the axis.  This process works very smoothly, no problems at all.  When I switch between feedback sources, I match the move position value to the current actual position to avoid and bumps -  I don't reset anything at this point.  I only need to reset the encoder occasionally in order to set its origin, so I can read a relative displacement.
Of course when I use analog feedback (the strain gauge), I am reading an absolute load value, so I don't want any offset applied.  This is where my problem is... I can't just reset the encoder on its own, I must supply the current ADC value as well so that the analog feedback is not offset to zero.  Because I have +/- 5 bits of noise on the strain gauge signal, when I read the ADC value (without oversampling/averaging) I end up with a value which could be anywhere within +/- 5 bits and thus an offset of the same amount on the analog feedback - and of course this offset varies every time I reset the encoder!  This is my current workaround, but its not really satisfactory.
I need a method to reset the encoder only, or a way to write zero to the analog feedback offset register on the card so that I can be sure its always reading an absolute value... or even if I could read the analog feedback offset value, I could apply this to my demand signal in order to compensate.
I hope thats a clear enough explanation... not too much rambling!  Any ideas?
 
Cheers,
Shane.
 
0 Kudos
Message 3 of 6
(3,760 Views)

Shane,

Bad news.  I talked to our R&D department about your issue.  Basically, there is no way to directly set the reset position and that your only solution is to reduce the noise on the strain gauge.  Can you implement an external lowpass filter to reduce the noise you are experiencing?

I wish I had better news.  Sorry,

Lorne Hengst
Application Engineer
National Instruments

0 Kudos
Message 4 of 6
(3,745 Views)
Hi Lorne, I agree - that is bad news.  Its hard to believe such basic functionality is not available on this card (and presumably others). In my application it is not possible to set the analog feedback precisely because the machine is in motion when switching feedback sources.  The "noise" on the load cell is mainly related to mechanical movement and is part of the useful data gathered from the experiment - and therefore can't just be filtered out.
Thanks anyway for your help - if you hear of any fix or better workaround for this problem please don't hesitate to let me know!
Cheers,
Shane.
0 Kudos
Message 5 of 6
(3,726 Views)

HI

I am facing some issues after upgrading to LabView 15 , i am using Pxi-8840 and motion controller 7350.

some of the VI's as stated below are missing.

1) Motion error handler.flx 

2) reset position.flx 

3) Initialize controller.flx 

I had installed NI-Motion 14 ,18 and 8.1 can you suggest how can install missing VI's. 

0 Kudos
Message 6 of 6
(2,072 Views)