Is there a solution,
how to detect in a variable, or … in the script code, weather the Robot run on virtual or real controller ?
Is there a solution,
how to detect in a variable, or … in the script code, weather the Robot run on virtual or real controller ?
I have never found that out through standard URSCript code.
But I have seen a difference while transfering files through the network, using the Linux terminal:
root@$IP_ADD:/programs
ur@$IP_ADD:/home/ur/ursim-current/programs.$UR_MODEL
So if you need to check whether a robot in a specific IP address is a real robot or URSIM, you could make a bash script, that tries to execute the cd
command to one of those directories and see if it fails/succeeds.
Hi cags,
Thanks for this info, but it is not the goal what we need.
We want to keep the the robot code similar if we run it on real or simulated.
At the moment we do so, see below at example code to set a bool variable b_virtRobot manualy at the robot.
def _3mvGrpOpen(grp_mm,grp_force,grp_speed):
i_grp_fc_out = grp_force
i_grp_spd_out = grp_speed
if b_virtRobot== True:
sleep(0.5)
i_grp_mm_out = grp_mm
else:
rq_set_force(grp_force)
rq_set_speed(grp_speed)
rq_move_and_wait_mm(grp_mm)
end
end
so the Robot should detect self, may be in a task weather real or simulated.
Thanks in foreward