Servo welding robot for EMZ program analysis

Publisher:小悟空111Latest update time:2023-09-01 Source: 机器人及PLC自动化应用Author: Lemontree Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Servo welding tongs for EMZ program analysis

$softp_end is set by the software when it is installed

Generate EMZ selection box and select welding tongs

DEFFCT INT SetDlgMsg()

DECL KrlMsg_T Msg

DECL KrlMsgPar_T Par[3]

DECL KrlMsgOpt_T Opt

DECL KrlMsgDlgSK_T SK[7]

INT nHandle, nAnswer

Execute EMZ in T2 mode

Msg = { Modul[] "vw_emz", Nr 10, Msg_txt[] "Antriebsschnittslle selekeren"} Prompt message "EMZ uses the tool number for measurement"

SK[1]={ Sk_Type #VALUE, Sk_txt[] "1"} Generated option button

SK[2]={ Sk_Type #VALUE, Sk_txt[] "2"}

SK[3]={ Sk_Type #VALUE, Sk_txt[] "3"}

SK[4]={ Sk_Type #VALUE, Sk_txt[] "4"}

SK[5]={ Sk_Type #VALUE, Sk_txt[] "5"}

SK[6]={ Sk_Type #VALUE, Sk_txt[] "6"}

SK[7]={ Sk_Type #VALUE, Sk_txt[] "7"}

Choose the welding tongs

Opt = { VL_Stop True, Clear_P_Reset True, Log_To_DB FALSE } Information property settings

nHandle = Set_KrlDlg (Msg, Par[],SK[], Opt) Activate message prompt

If (nHandle>0)Then

While (Exists_KrlDlg(nHandle, nAnswer)) Close the dialog window

Wt sec 0.1

Endwhile

Endif

Return(nAnswer) The value of the selected button is emitted

;

ENDFCT

///////////////////////////////////////////////////// ///////////

Declaration: 3 position variables, a real variable and an integer variable

E6AXIS GunPosAct, GunPosOpen, GunPosClose

REAL tPos

INT co

VerBootfile=$softint[22]

while VerBootfile << span=""> 420

VwEmzMessage(7,#QuitMsg)

halt

endwhile

Generation of alarm information

repeat

DiNum=SetDlgMsg() A prompt box appears and select the return value 1-7

EaxNum = $softplcint[DiNum] - 6 Calculation of welding clamp number: $softplcint[1]=7

if (($softplcint[DiNum] > 6) AND ($softplcint[DiNum]<< span=""> 13)) then

EaxNum = $softplcint[DiNum] - 6

else

VwEmzMessage(6,#NotifyMsg) If no selection is made, a message prompt will be issued

halt

endif

until EaxNum>0 with 1 welding clamp EaxNum=1

GunPosAct=$axis_act saves the current axis information to the current position variable

GunPosOpen=$axis_act saves the current axis information to the current welding gun opening position variable

GunPosClose=$axis_act Save the current axis information to the current welding gun closing position variable

SWITCH EaxNum Select the axis number corresponding to the clamp number.

CASE 0 If the clamp number entered is 0

HALT means stop

CASE 1 Clamp No. 1

GunPosOpen.E1=$softp_end[7]-20 Calculate the opening of the E1 axis at the opening position of the welding clamp $SOFTP_END[7]=120.0 -20

GunPosClose.E1=10 Calculate the closing degree of the E1 axis at the closed position of the welding gun 10 mm

CASE 2 Clamp No. 2

GunPosOpen.E2=$softp_end[8]-20 Get the maximum opening position

GunPosClose.E2=10 Close position

CASE 3 Clamp No. 3

GunPosOpen.E3=$softp_end[9]-20

GunPosClose.E3=10

CASE 4 Clamp No. 4

GunPosOpen.E4=$softp_end[10]-20

GunPosClose.E4=10

CASE 5 Clamp No. 5

GunPosOpen.E5=$softp_end[11]-20

GunPosClose.E5=10

CASE 6 Clamp No. 6

GunPosOpen.E6=$softp_end[12]-20

GunPosClose.E6=10

DEFAULT Stop the program after exceeding the input clamp number 6

HALT

ENDSWITCH End selection control

IF $MODE_OP==#T1 THEN When the robot's working mode changes to T1 mode

VwEmzMessage(3,#NotifyMsg) Prompt message: Wrong working mode, use T2 or external automatic

Repeat the loop prompt until the robot's working mode is not T1

wait sec 0.1

until ($mode_op<>#t1) until statement

ENDIF

IF $MODE_OP==#EX THEN External automatic mode

IF $OV_PRO<>100 THEN Robot is not at 100% speed

MerkOvPro = $OV_PRO

$OV_PRO=100 restores to 100% speed

ENDIF

ELSE is not an external automatic mode

IF $OV_PRO<>100 THEN Robot is not at 100% speed

VwEmzMessage(4,#NotifyMsg) prompt message: Robot speed must be 100%

repeat

wait sec 0.1

until ($ov_pro==100) until the robot speed reaches 100%

ENDIF

ENDIF

PTP $AXIS_ACT moves to the current position

PTP GunPosClose GunPosClose position

ActPos=GetActPos(DiNum) Get the current external axis position parameter

;------------------------------------------------- ----------

DEFFCT REAL GetActPos(di:in)

INT

REAL RetGunPos

REAL GunPos[7];

GunPos[1]=sig1_istpos Get the actual position of welding gun No. 1

GunPos[2]=sig2_istpos

GunPos[3]=sig3_istpos

GunPos[4]=sig4_istpos

GunPos[5]=sig5_istpos

GunPos[6]=sig6_istpos

GunPos[7]=sig7_istpos

SIGNAL sig1_sollpos $out[737] TO $out[751]

SIGNAL sig1_istpos $in[737] TO $in[751]

RetGunPos=GunPos[di] / 10 Expression of position feedback value

IF $IN[Sign[di]] THEN If there is E752, the expression of the position will be changed to another one.

RetGunPos=RetGunPos * (-1)

ENDIF

;

RETURN(RetGunPos)

ENDFCT

--------------------------ENDFCT---------------------- -

IF ABS(10-ActPos) > 1 THEN

The deviation range of the feedback value of the external axis shall not be less than 5 ABS takes the absolute value, so we can determine that the opening of the welding clamp is 10mm when closing, and the deviation between the theoretical value and the actual value cannot exceed 1mm.

VwEmzMessage(5,#QuitMsg,EaxNum) Prompt message: The external axis information is incorrect

WHILE (ABS(10-ActPos) > 1) The loop starts when the opening deviation value is greater than 1.

wait sec 0.2

ENDWHILE

ENDIF

$softplcint[20]=DiNum Example: $softplcint[20]=1

F co = 1 TO 10 Cycle 10 times and turn on the switch to the small port

PTP GunPosOpen------------Operating welding gun opening position

PTP GunPosClose C_PTP ---------operating welding gun closed position

ENDFOR

$softplcint[20]=-10 changes the value of $softplcint[20]

PTP GunPosAct Return to the starting position

WAIT SEC 0.2 Wait for 0.2 seconds

$softplcint[20]=0

TotzeitAlt = SysBusDelay[EaxNum] Save the last time value

TotzeitNeu = $softplcint[31] Get the time value of this calculation

SysBusDelay[EaxNum] = TotzeitNeu Save the current time value to SysBusDelay[]

$softplcint[EaxNum+7]=TotzeitNeu Save the current time value to the soft PLC

FOR co = 1 TO 20

IpoVerteilung[co]=$softplcint[99+co]

ENDFOR Assign to array

TraceTime.YEAR=$Date.YEAR records year, month, day, hour, minute, and second

TraceTime.MONTH=$Date.MONTH

TraceTime.DAY=$Date.DAY

TraceTime.HOUR=$Date.HOUR

TraceTime.MIN=$Date.MIN

TraceTime.SEC=$Date.SEC

RobSn=$KR_SERIALNO $KR_SERIALNO : The serial number of the robot is stored in the R card

TraceLength=$softplcint[34]

IF $mode_op <> #EX THEN The robot is not in external automatic mode

VwEmzMessage(1,#NotifyMsg,DiNum) Prompt message: The last debugging time is TotzeitAlt times 12 ms, etc.

VwEmzMessage(2,#NotifyMsg,DiNum) Prompt message: The debugging time is TotzeitNeu times 12 ms or so

ENDIF

Calculate the difference time and give it to the soft PLC

Pull overtravel fault:

GLOBAL REAL max_sf=15.0 Maximum deviation value

$softplcreal[20]=max_sf

sf_prog_status Delayed fault program status

$ASYNC_STATE Additional axis status

Therefore, we can conclude that one of the two control units of the pulling fault is the difference value max_sf=15.0, and the other difference time TotzeitNeu is given to the PLC. Therefore, the conditions for the pulling fault in the program are generated.

Other command functions in EMZ:

------------VwEmzMessage----------Volkswagen EMZ message-

DEF VwEmzMessage(msg_nr:IN, MsgTyp:IN, Pa:IN)

INT msg_nr, msgtypnr, Param

DECL _MsgType MsgTyp

DECL KrlMsg_T USER_MSG

DECL KrlMsgPar_T Par[3]

DECL KrlMsgOpt_T Opt

DECL State_T st_ausg

INT nHandle, Answer, offset

USER_MSG = { Modul[] "vw_emz", Nr -1, Msg_txt[] " "} prompt message format

Opt = { VL_Stop False, Clear_P_Reset False, Log_To_DB TRUE }

IF Varstate("Param")==#initialized then

Get the state of the input variable "Param" if it is initialized

SWITCH Param

CASE 1

Par[1] = { Par_type #Value, Par_int 1 }

CASE 2

Par[1] = { Par_type #Value, Par_int 2 }

CASE 3

Par[1] = { Par_type #Value, Par_int 3 }

CASE 4

Par[1] = { Par_type #Value, Par_int 4 }

CASE 5

Par[1] = { Par_type #Value, Par_int 5 }

CASE 6

Par[1] = { Par_type #Value, Par_int 6 }

CASE 7

Par[1] = { Par_type #Value, Par_int 7 }

DEFAULT

Par[1] = { Par_type #Value, Par_txt[] " " }

ENDSWITCH

ELSE

Par[1] = { Par_type #Value, Par_txt[] " " }

ENDIF

IF NOT MsgIsSet(msg_nr) THEN If the feedback value of the message category is not set by MsgIsSet

USER_MSG.Nr = msg_nr message number

SWITCH msg_nr

CASE 1 Information prompt number 1

OFFSET=0

SWRITE(USER_MSG.MSG_TXT[],ST_AUSG,OFFSET,"Totzeit Achse%d vor Testlauf= %d *12ms",(EaxNum+6), TotzeitAlt) Timeline before test run

CASE 2 Information prompt number 2

OFFSET=0

SWRITE(user_msg.msg_TXT[],ST_AUSG,OFFSET,"Totzeit Achse%d nach Testlauf= %d *12ms ",(EaxNum+6), TotzeitNeu) Timeline after the test run

CASE 3 Information prompt number 3

USER_MSG.MSG_TXT[]="false Betriebsart - T2 or EXT eorderlich" Wrong operating mode - T2 or EXT is required

CASE 4 Information prompt number 4

USER_MSG.MSG_TXT[]="Override auf 100% erforderlich" needs to be overwritten to 100%

CASE 5 Information prompt number 5

USER_MSG.MSG_TXT[]="Externe Achse%1 follow nht" External axis%1 does not follow

CASE 6 Information prompt number 6

USER_MSG.MSG_TXT[]="Unassigned additional axis - Additional axis"

CASE 7 Information prompt number 7

USER_MSG.MSG_TXT[]="Veion bootfile wird nicht unterstuetzt"

Unsupported version startup file

DEFAULT

USER_MSG.MSG_TXT[]="unknown message" unknown message

ENDSWITCH

SWITCH MsgTyp starts displaying messages

CASE #StateMsg

nMsgHandle[msg_nr] = Set_KrlMsg (#State, USER_MSG, Par[], Opt)

; Status message output

[1] [2]
Reference address:Servo welding robot for EMZ program analysis

Previous article:Steps to perform before the robot aligns the electrode arm
Next article:Ecovacs Commercial Cleaning Robot won the Veken Cup 2023 Artificial Intelligence Outstanding Innovation Product Award

Latest robot Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号