TUS

Force Loop over Position Loop

Back

One (proven) technique for closing an analog feedback on top of a position feedback, is to use a phantom axis. The idea here is to use the analog input as feedback for the phantom axis. Then pipe the DAC output of the phantom axis into Ix05 (Master Following) of the axis that you are trying to control.

At first, I had a philosophical problem with this technique. The DAC output is basically voltage and the Master Position is encoder counts. How can apples and oranges come together and close a loop? Well, it worked in the field and that is what counts.

You will be better off placing the phantom axis in its own coordinate system. The reasoning here is that the analog input may not be available all the time. Hence, if the phantom axis ever goes into "open loop" mode, then your program will not abort. Also, then you can command the analog "position" using Jog commands as opposed to a motion control program.

Another note of caution. If the DAC output for the phantom axis exceeds the DAC limit (Ix69) then it will get clipped and you will not be able to "control" the analog signal. To get arround this issue, "open loop" the phantom axis before re-enabling it. Also, you may consider setting the following error large so that the axis does not go into "open loop".

Here are some code samples for a Turbo PMAC. In this example, I am using axis #7 as the phantom axis and axis #1 as the axis I am trying to control. I use the Offset mode for Master Following (Ix06=3). The analog input is coming from an ACC-28E channel 2 (setup for address: $78C01.) I found that the phantom axis needed both proportional gain and integral gain.

Subtle point. Ix05 must be an X register. Therefore, I used the free memory address X:$10FF as my DAC output for the phantom axis. Then pointed Ix05 to X:$10FF as well. It is helpful to monitor this DAC output during development and troubleshooting. To do so, configure your M variable as such:
M99->X:$10FF,8,16,S


;
; To set the force analog input as a position feedback on the
; phantom axis For ACC-28E onto axis #7 being used as the phantom
;
I8006 = $1F8C01 ;78C01 is the analog input for channel 2
I710 = $78C01 ;Power up initialization of the position
I795 = $310000 ;Format of Ixx10 is an unsigned A/D ACC-28

;
;*** Set the PID
;
I730=500 ;Proportional
I731=0 ;Derivative
I733=7000 ;Integral
I734=0 ;Integrate all the time
I732=0 ;Vff
I735=0 ;Aff
I768=0 ;Fff
I729=0 ;DAC Offset
I769=20480 ;DAC Limit max is 32767

&2

;
;PhantomAxis Setup
;
I700=1 ;Enable axis
I701=2 ;This signifies that Ix02 is an X register and not Y (as required by 1x05 for slave)
I702=$10FF ;Put DAC output for phantom axis to open register turbo manual page 8-13
FRAX %100 ;Set the feedrate to 100%
I5290=1000.0 ;Set the time units for coordinate system to seconds (Isx90) C.S.1 = 51, C.S.2 = 52...
I703=$3507 ;Set feedback to default location of encoder conversion table
I704=$3507 ;Set feedback to default location of encoder conversion table

;
; *** Monitor the pressure during press cyle and kick in force feedback
; THIS CODE WAS PLACED IN A PLC PROGRAM
;
if (P5000=1)
CMD "&2" ;Switch to coordinate system 2
CMD "#7o0" ;Openloop the phantom axis to clear DAC

I106=3 ;enable master following in offset mode.

M6007=3000 ;set the variable jog position to desired pressure
CMD "#7J=*" ;M6007->L:$0003D7

CMD "&1" ;go back to coordinate system 1
endif

;
; *** To disable master (analog) following
;
I106=0 ;Disable master following in offset mode



©1994-2023 TUS, Inc.   3434 Edwards Mill Rd. Suite 112-326   Raleigh, NC   27612 USA