This turned out to be a python issue. Without setting:
"sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)"
I was getting roughly 12ms recv time which obviously wasn't cutting it. After setting that option Im down to about 8ms.
This turned out to be a python issue. Without setting:
"sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)"
I was getting roughly 12ms recv time which obviously wasn't cutting it. After setting that option Im down to about 8ms.
HI ,
I am using Kss 8.3.2 with Rsi version 3.3 on KRc4 controller
In Rsi distance control How gain Effects in the whole Process of correction.
Take an Example in the manual, there 5v from the analog module is equals to 10 cm(On the basis of scaling), How KR(Gain factor) can be calculated?
Any help here would be great, I am stuck at the point.
The Gain factors must generally be tuned empirically, by hand, using iterative testing.
The subject you want to Google is "PID tuning" -- the Gain objects in RSI are, in effect, the tuning values for PID algorithms.
note that in KRC analog signals are normalized to a range 0-1 (or 0-100%). so ANIN1 is 0-1 as well regardless if actual analog input is 4..20mA, 0..10V, 1..5V, 0..5V etc. if the signal is bidirectional (such as -10V..+10V) then analog value range is -1..1 (-100% to +100%).
authors of the manual seem to have worked with distance sensor with 200mm range but ... this is irrelevant, it is just an example:
if you have a distance sensor with 200mm range (such as laser), then 100mm will be 5V or 50% and ANIN1 will be 0.5
if you have a distance sensor with 10mm range (such as analog inductive proxy), then 5mm will be 5V or 50% and ANIN1 will be 0.5
etc.
if you are referring to Fig 8-6, ANIN1 values above 0.9 (or 90%) will trigger stop by STOP1. so those last 10% are used as reserve. and for 200mm range sensor, that happens to be 20mm as they mention.
P1 and SUM1 are chosen to produce maximum value of 100 for the RSI monitor. this has nothing to do with mm or cm, despite what manual tells.
then this value is massaged into range that POSCORR can use. so really you should be able to use this example as is, pick sensor of suitable range for your application, then only adjust K2.
even without adjustment, example could work since the corrections are relative though this may affect speed of response. too small and robot may not be able to catch up with the change. too large and it may keep overshooting.
Good day, dear specialists.
Does anyone have experience using the RSI object ST_VEL?
I need increase/decrease TCP speed from start to end point. I'm work with profinet between KRC2, KSS5.5 and Siemens S7-1200(CPU1214) in external mode.
My network and program work good. Additionaly, I using object ST_PATHCORR. It's OK. But when I trying use ST_VEL - system variable $OV_PRO remains unchanged when I send 1-100. But when I send 0 - $OV_PRO takes 66%.
What am I doing wrong?
My code:
&ACCESS RVO
&REL 63
&PARAM TEMPLATE = C:\KRC\Roboter\Template\vorgabe
&PARAM EDITMASK = *
DEF shl3( )
DECL RSIERR RET
DECL INT obj1,obj2,obj3,obj4,obj5
DECL REAL GAIN
;FOLD INI
;FOLD BASISTECH INI
GLOBAL INTERRUPT DECL 3 WHEN $STOPMESS==TRUE DO IR_STOPM ( )
INTERRUPT ON 3
BAS (#INITMOV,0 )
;ENDFOLD (BASISTECH INI)
;FOLD USER INI
;Make your modifications here
;ENDFOLD (USER INI)
;ENDFOLD (INI)
$ADVANCE=3
INTERRUPT DECL 91 WHEN contact DO GETPOS()
GAIN=0.00003
L6PosOk=FALSE
RsiStop=FALSE
EndPosition_X=REAL_TO_INT(XEndPosition.X)
EndPosition_Y=REAL_TO_INT(XEndPosition.Y)
EndPosition_Z=REAL_TO_INT(XEndPosition.Z)
RET=ST_DIGIN(obj1,0,250,5,RSIUNIT_No)
RET=ST_P(obj2,0,obj1,1,GAIN,RSIUNIT_M)
RET=ST_PATHCORR(obj3,0)
RET=ST_NEWLINK(obj2,1,obj3,3)
RET=ST_SETPARAM(obj3,3,-300) ;Min corr in Z:-300 mm
RET=ST_SETPARAM(obj3,9,300) ;Max corr in Z:+300 mm
RET=ST_DIGIN(obj4,0,266,5,RSIUNIT_No)
RET=ST_VEL(obj5,0,obj4,1)
;FOLD PTP HOME Vel=10 % DEFAULT;%{PE}%R 5.5.32,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:HOME, 3:, 5:10, 7:DEFAULT
$BWDSTART=FALSE
PDAT_ACT=PDEFAULT
FDAT_ACT=FHOME
BAS(#PTP_PARAMS,10)
$H_POS=XHOME
PTP XHOME
;ENDFOLD
;1st POINT before contact
;===================================
;FOLD LIN StartPosition Vel=0.05 m/s CPDAT1 Tool[1]:tool_1 Base[1]:base_1;%{PE}%R 5.5.32,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:StartPosition, 3:, 5:0.05, 7:CPDAT1
$BWDSTART=FALSE
LDAT_ACT=LCPDAT1
FDAT_ACT=FStartPosition
BAS(#CP_PARAMS,0.05)
LIN XStartPosition
;ENDFOLD
;===================================
INTERRUPT ON 91
SEARCH ()
$ADVANCE = 3
INTERRUPT OFF 91
;start RSI
RET=ST_ON1(#TTS,1)
;MAKE USER POINTS MODIFICATIONS HERE
;ANOTHER PONTS
;===================================
;FOLD LIN P30 CONT Vel=0.003 m/s CPDAT16 Tool[1]:tool_1 Base[1]:base_1;%{PE}%R 5.5.32,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P30, 3:C_DIS, 5:0.003, 7:CPDAT16
$BWDSTART=FALSE
LDAT_ACT=LCPDAT16
FDAT_ACT=FP30
BAS(#CP_PARAMS,0.003)
LIN XP30 C_DIS
;ENDFOLD
;FOLD LIN P29 CONT Vel=0.003 m/s CPDAT15 Tool[1]:tool_1 Base[1]:base_1;%{PE}%R 5.5.32,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P29, 3:C_DIS, 5:0.003, 7:CPDAT15
$BWDSTART=FALSE
LDAT_ACT=LCPDAT15
FDAT_ACT=FP29
BAS(#CP_PARAMS,0.003)
LIN XP29 C_DIS
;ENDFOLD
;FOLD LIN P31 CONT Vel=0.003 m/s CPDAT17 Tool[1]:tool_1 Base[1]:base_1;%{PE}%R 5.5.32,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:P31, 3:C_DIS, 5:0.003, 7:CPDAT17
$BWDSTART=FALSE
LDAT_ACT=LCPDAT17
FDAT_ACT=FP31
BAS(#CP_PARAMS,0.003)
LIN XP31 C_DIS
;ENDFOLD
;FOLD LIN EndPosition CONT Vel=0.003 m/s CPDAT11 Tool[1]:tool_1 Base[1]:base_1;%{PE}%R 5.5.32,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN, 2:EndPosition, 3:C_DIS, 5:0.003, 7:CPDAT11
$BWDSTART=FALSE
LDAT_ACT=LCPDAT11
FDAT_ACT=FEndPosition
BAS(#CP_PARAMS,0.003)
LIN XEndPosition C_DIS
;ENDFOLD
;==================================
;stop RSI
RET=ST_OFF()
PULSE(RsiStop, TRUE,0.1)
;FOLD PTP HOME Vel=10 % DEFAULT;%{PE}%R 5.5.32,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:HOME, 3:, 5:10, 7:DEFAULT
$BWDSTART=FALSE
PDAT_ACT=PDEFAULT
FDAT_ACT=FHOME
BAS(#PTP_PARAMS,10)
$H_POS=XHOME
PTP XHOME
;ENDFOLD
END
DEF GETPOS()
PULSE(L6PosOk, TRUE,0.1)
BRAKE
RESUME
END
DEF SEARCH()
$ADVANCE = 0
$VEL.CP=INT_TO_REAL(V9)
LIN_REL {X +300} #TOOL
END
Display More