Is there any way to programmatically tell if a robot is simulated? Specifically via what the PMC can access? I am also interested in system variables that would indicate it as well.
Tell if a robot is simulated
- Nation
- Thread is marked as Resolved.
-
-
I don't know about PMC, but one way I can think of is by looking at the $MC_PATH system variable. Looks like this on my Roboguide controllers:
Code[*SYSTEM*]$MC_PATH Storage: CMOS Access: RW : STRING[127] = 'C:\path\to\your\workcell\Robot_1\MC'
I can't verify now (not near a physical robot), but I'm sure it has a different value on a real controller.
I seem to remember there were some other variables (like amplifier firmware versions or similar) that were '123456789' in Roboguide, and had proper values on real controllers. I'll see if I can find them.
-
Easiest way is to use MENU/System/config, there you can set up...
Set if INPUT SIMULATED DO[....]
then you could monitor that from PMC or TP if inclined.
-
I don't know about PMC, but one way I can think of is by looking at the $MC_PATH system variable. Looks like this on my Roboguide controllers:Code[*SYSTEM*]$MC_PATH Storage: CMOS Access: RW : STRING[127] = 'C:\path\to\your\workcell\Robot_1\MC'
I can't verify now (not near a physical robot), but I'm sure it has a different value on a real controller.
I seem to remember there were some other variables (like amplifier firmware versions or similar) that were '123456789' in Roboguide, and had proper values on real controllers. I'll see if I can find them.
That actually works out well, as that variable doesn't exist on a real robot. I can just check for the existence of that variable with a short Karel program.
-
I seem to remember there were some other variables (like amplifier firmware versions or similar) that were '123456789' in Roboguide, and had proper values on real controllers. I'll see if I can find them.Right, took a little longer, but this might also work. Real robot:
Simulated robot:
There are probably others, but this was the one I (vaguely) remembered.
Perhaps this is easier to check in TP. Afaik you cannot check for existence of a system variable in TP programs, can you?