04-08-2025, 04:28 AM
Hello, it's been a while since I've posted a question. Thank you all for your continuous support.
Today, I have a question about using c3bridge, and I believe Dmitry might have good insight into this topic. I would greatly appreciate your help.
Currently, I am studying the c3bridge documentation to create a Python client program. Specifically, I want to confirm whether it's possible to write system variables to $config.dat via a c3bridge client.
$config.dat:
Furthermore, I need to know if I can communicate with the c3bridge client program while running the RoboDKsync.src KRL program, thereby writing variables into $config.dat to control the robot through RoboDKsync.src.
RoboDKsync.src:
Thank you in advance for your help!
Today, I have a question about using c3bridge, and I believe Dmitry might have good insight into this topic. I would greatly appreciate your help.
Currently, I am studying the c3bridge documentation to create a Python client program. Specifically, I want to confirm whether it's possible to write system variables to $config.dat via a c3bridge client.
$config.dat:
Code:
&ACCESS RV
&PARAM DISKPATH =
&REL 5
DEFDAT $CONFIG
INT COM_ACTION=0
INT COM_ACTCNT=0
REAL COM_ROUNDM=0
REAL COM_VALUE1=0
REAL COM_VALUE2=0
REAL COM_VALUE3=0
REAL COM_VALUE4=0
DECL E6AXIS COM_E6AXIS
DECL POS COM_POS
DECL FRAME COM_FRAME
DECL E6POS COM_E6POS
ENDDAT
Furthermore, I need to know if I can communicate with the c3bridge client program while running the RoboDKsync.src KRL program, thereby writing variables into $config.dat to control the robot through RoboDKsync.src.
RoboDKsync.src:
Code:
&ACCESS RVP
&REL 1
DEF RoboDKsync562()
BAS(#INITMOV,0)
PTP $AXIS_ACT
; Define Digital Input linked to the probe
INTERRUPT DECL 5 WHEN $IN[1] DO OnProbeTriggered()
$ORI_TYPE = #VAR
$CIRC_TYPE = #BASE
$VEL.CP = 3
$ACC.CP = 10
$BASE = {FRAME: X 0, Y 0, Z 0, A 0, B 0, C 0}
$TOOL = {FRAME: X 0, Y 0, Z 0, A 0, B 0, C 0}
$ADVANCE = 3
$APO.CPTP = 50
$APO.CDIS = 0
COM_ROUNDM = 10
COM_ACTCNT = 0
WHILE TRUE
CONTINUE
ActionLoop()
ENDWHILE
END
DEF ActionLoop()
DECL INT io_id
DECL INT j_id
DECL INT program_id
COM_ACTION = 0
CONTINUE
WHILE COM_ACTION >= 0
SWITCH COM_ACTION
; Empty Action
CASE 1
COM_ACTCNT = COM_ACTCNT + 1
COM_ACTION = 0
; Move Joints
CASE 2
IF COM_ROUNDM >= 0 THEN
PTP COM_E6AXIS C_PTP
ELSE
PTP COM_E6AXIS
ENDIF
COM_ACTION = 0
; Move Linear
CASE 3
IF COM_ROUNDM >= 0 THEN
LIN COM_E6POS C_DIS
ELSE
LIN COM_E6POS
ENDIF
COM_ACTION = 0
; Move Circular
CASE 4
IF COM_ROUNDM >= 0 THEN
CIRC COM_POS,COM_E6POS C_DIS
ELSE
CIRC COM_POS,COM_E6POS
ENDIF
COM_ACTION = 0
; Pause
CASE 9
COM_ACTCNT = COM_ACTCNT + 1
WAIT SEC COM_VALUE1
COM_ACTION = 0
ENDSWITCH
ENDWHILE
END
DEF OnProbeTriggered()
INTERRUPT OFF 5
COM_VALUE1 = 1
BRAKE
RESUME
END
Thank you in advance for your help!