RobotStudio event

Semantic errors in RAPID program!

Hi,

Hi, I've been looking trough the forum and haven't seen any threads that could solve my issues, so I've opened this one. In the event that there is another thread on this open I do apologize and I'll remove this thread ASAP. I've been trying to create a station in RS. (I've got the latest RS installed, the painting powerpack, and the last three RobotWare editions as well). The station I'm trying to create is a simple cell for a painting apliaction, (the robot I'm using is an IRB52) I have also created an external axis with a support for parts attached to it (parts which need to be processed/painted by the robot). 
This thread has two questions attached to it. 

1) Upon creating the targets for the robot to follow, the simulation (move along path) worked like a charm the first day. When trying to repeat the process the following day, (and every time since) this error would come up in the output window: "IRB52_12_475_1005_3: Move Along Path: The task T_ROB1 has semantic errors in its RAPID program.". At first I taught that maybe there's something that creates a conflict in the program. So I ran the station on another computer with the exact same software installed on, and the error repeated itself. The errors also appears when I try a different approach (creating other targets in the path to follow). Some feedback on this issue, would be greatly appreciated.

2) Can anybody tell me how to sync an external axis to a robot?, what I need it to do is: move the parts support from point A to B, [wait while at point B for a few seconds, (let the robot do it's job during that time)] and then move from point B to C. ( it's supposed to act like a conveyor, but a conveyor just simply won't do the job). (I don't have a great deal of time spent on RS. And also my coding skills are pretty close to terible.

Thank you in advance,

GBG 

Comments

  • Hi,
    Semantic error means that you have an error in your rapid program, for example a procedure call to a procedure that's not exist.
    To find the problem, open the Rapid editor and click on "Check Program". Now there should be a message in the output window about the semantic error. 
    On the line above the error will be explained in detail. If you double click on that line, the cursor will be placed at the error in the rapid code.

    Regards,
    Anders
    Best regards,
    Anders Spaak
    ABB Robotics
  • SecretHanae
    edited August 2014
    Hi,

    For the syncronization you could use command WaitSyncTask (meaning wait for the other mechanism to get to the same WaitSyncTask instruction). But for it to work you'll need to have two tasks - one for the robot and the other for the external axis mechanism. For that you'll need additional option in the virtual controller - multimove or multitasking (dunno which one will actually work). When you have the tasks ready you just have to put the action instruction WaitSyncTask in the proper places. In ArcWelding PowerPac, which I use, there is no practical need to look into the Rapid code, because every command concerning welding, syncronization and so on, is automatically generated using the prepared interface, don't know if the same is possible in the Paint PowerPac (I doubt that RS without any Add-Ins can generate any other things than just paths). If not below is a short description on how the code should look like, for the WaitSyncTask to work.

    How to make it work/what you need:
    - declaration of the sync point sync1
    VAR syncident sync1;

    - declaration of the tasks connection taskR1P1 (T_ROB1 and T_POS1 being the names of the tasks)
    PERS tasks taskR1P1{2}:=[["T_ROB1"],["T_POS1"]];

    - and finally declaration of syncronization point
    WaitSyncTask sync1,taskR1P1;

    in the code for the external axis it would look like this:
    MODULE module_name

    VAR syncident sync1;
    VAR syncident sync2;
    PERS tasks taskR1P1{2}:=[["T_ROB1"],["T_POS1"]];

    PROC proc_name
    !go from point A to B
    WaitSyncTask sync1,taskR1P1;
    WaitSyncTask sync2,taskR1P1;
    !go from point B to C
    ENDMODULE

    Note that, if we are using multiple tasks, each of them has its own modules with codes. So you'll need to do the same for the robot:

    MODULE module_name_same_as_the_external_axis_module

    VAR syncident sync1;
    VAR syncident sync2;
    PERS tasks taskR1P1{2}:=[["T_ROB1"],["T_POS1"]];

    PROC proc_name_same_as_the_external_axis_procedure
    WaitSyncTask sync1,taskR1P1;
    !painting code
    WaitSyncTask sync2,taskR1P1;
    ENDMODULE


  • Hi Andres S,

    Thank you for your feedback. I've looked into the error and this is what I currently have: 
    Error: Checked: IRB52_12_475_1005_3/RAPID/T_ROB1: 1 semantic errors.

    The line above it: IRB52_12_475_1005_3/RAPID/T_ROB1/MainModule(2,2): Name error(42): Global routine  name main ambiguous.

    The lines of code in the rapid program: 

    1   MODULE MainModule
    2    PROC main()
    3    <SMT>
    4     ENDPROC
    5   ENDMODULE

    The thing is I don't know what to do about it... (can you assist?)

    (here you can find a screenshot of what I see)

    Thanks,

    Kind regards,
    GBG
  • Based on your screenshot I would say delete the main PROC. The error is basically telling you you have 2 procedures called main. ( I dont know if this also looks at variable names but ambiguous means the controller cant determine which of two or more procedures to run. 

    Delete the main with no instructions and see if that solves the problem. 

    JMR