Now I tried it with a step response program. The program looks like:
_____________________________________________________________
; Setup and Definitions
; ################################################
CLOSE
P80=1000; ; step size in counts
M88->X3,18 ; Data gather prep bit
M89->X3,19 ; Data gather on bit
M0 ->X0,24 ; Servo cycle counter (=timer)
M85->X$07F0,24 ; Memory allocation for start time
M86->X$07F1,24 ; Memory allocation for elapsed time
M81->D$0028 ; #1 cmd position register
; Setup Gathering variables
; ###############################################
I19=1 ; gather each servo cycle
I20=3 ; gather two variables
I21=$800028 ; gather cmd position
I22=$80002B ; gather act position
I45=0
; ###############################################
OPEN PLC 2
CLEAR
CMD"DEL GAT"
CMD"DEF GAT 20000"
CMD"GAT" ; Start data gathering
P81=P80*I108*32 ; step time
P86=P85*8388608/I10 ; step time in servo cycles
M81=M81+P81 ; increment the commanded position
M85=M0 ; start of the timer
M86=M0-M85 ; time elapsed so far
While (M86 < P86)
M86=M0-M85
EndWhile
M81=M81-P81 ; now decrement commanded position again
M85=M0 ; Restart timer
M86=M0-M85 ; Time elapsed
While (M86 < P86)
M86=M0-M85
EndWhile
CMD"ENDGATHER"
DISABLE PLC 2 ;
CLOSE
; ###############################################
I5=3;
____________________________________________________________
Now typing LIST GATHER on the shell, there will be just 2 hex numbers.
Using the same settings be online command data gathering, following:
DELETE GATHER
DEFINE GATHER 20000
GATHER
ENDGATHER
LIST GATHER
I will get the values out. Now I can even export them by PMAC PLOT, what I found, by simply pressing on 'upload'. But then I don't have the step response.
Why won't that work for the PLC program? The step response is indeed carried out by the drive (a little click noise), but the data are not captured correctly.