Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Pass statements from NC file to robot program

#1
When generating nc toolpath files, I create tool on/off commands. The command is meant to trigger an Ethernet IP signal from the robot to the external tool. My robot is ABB, so I have the signal set up as:

SetGO doSIGNAL, 1;

Where the above command is written in RAPID to set the group output signal to a value of 1.

This line of my NC file is ignored by the RoboDK parser unless I make it:

PPRINT/  SetGO doSIGNAL, 1;

This results in the generated MOD file's corresponding output file trying to print my command to the pendent screen:

TPWrite "/ SetGO doPumpGroup, 2;";

How do I preface my RAPID code in my NC file such that the command is passed through to the MOD file
#2
changing my NC file to:
CALL SetGO doSIGNAL, 1;

results in:
SetGOdoSIGNAL;

That is, the space between the RAPID command SetGO and the signal name is stripped out, and only 13 characters are printed. If I change the signal name to be shorter, we see that only commas and spaces are stripped out.

I presume this is related to the use of FilterName()? Are there escape characters or can we use ASCII?
#3
You can use the CODE directive in your APT file. Example:
Code:
CALL SetGO doSIGNAL, 1;
You can find more examples here:
https://robodk.com/forum/Thread-Program-...59#pid3959
  




Users browsing this thread:
1 Guest(s)