Welcome, Guest. Please login or register.
Did you miss your activation email?
May 22, 2012, 05:24:12 AM
Home Help Login Register
News: Any Problems or Experience with Industrial Robots ?
Register and place your Question / Answer to worldwide Robotexperts right here !

+  Robotforum | Support for Robotprogrammer and Users
|-+  Industrial Robot Help and Discussion Center
| |-+  ABB Robot Forum (Moderators: Werner Hampel, Sven Weyer, Jim Tyrer, Napierian)
| | |-+  Re: Program error 40705 "syntax error"-s4 controller
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: Re: Program error 40705 "syntax error"-s4 controller  (Read 366 times)
JesseH
Newbie
*
Offline Offline

Posts: 21


« on: November 16, 2011, 04:35:22 AM »

I also have error 40705!
expected 'TRAP'.

can anyone help?


%%%
  VERSION:1
  LANGUAGE:ENGLISH
%%%
 
MODULE T
  !GENERATED BY ROBOTMASTER
  TASK PERS wobjdata wob0:=[FALSE,TRUE,"",[[0.00,0.00,0.00],[1,0,0,0]],[[0,0,0],[1,0,0,0]]];
  PERS tooldata tl_:=[TRUE,[[367.71,-0.25,435.92],[0,0.5,0,0.8660254]],[20,[0,0,220],[1,0,0,0],0,0,0]];
  LOCAL VAR string stPath := "HOME:";
  LOCAL VAR string stModule1 := "MODULE1.MOD";
  LOCAL VAR string stModule2 := "MODULE2.MOD";
   
  PROC MAIN()
    AccSet 10, 10;
    ConfL\On;
    SingArea\Wrist;
    Load stPath \File:=stModule1;
    %"T1_1"%;
    UnLoad stPath \File:=stModule1;
    Load stPath \File:=stModule2;
    %"T1_2"%;
    UnLoad stPath \File:=stModule2;
    ConfL\Off;
  ENDPROC
ENDMODULE
Logged
prnuk2003
Sr. Member
****
Offline Offline

Gender: Male
Posts: 339


Customer Service Engineer


« Reply #1 on: November 16, 2011, 06:21:39 PM »

Any more text to the error (for example the task)?

I can open your module 'T'  in RobotStudio without any error and run it (although I do get error 40702 file not found) so maybe the error exists in one of the home directory modules.

Have you tried manually loading  module1.mod or module2.mod from the home directory?
Logged

BR
prnuk2003
JesseH
Newbie
*
Offline Offline

Posts: 21


« Reply #2 on: November 17, 2011, 03:41:19 AM »

Thinking more about this! Do I need to create a "HOME" file on USB drive?
Logged
prnuk2003
Sr. Member
****
Offline Offline

Gender: Male
Posts: 339


Customer Service Engineer


« Reply #3 on: November 17, 2011, 10:11:36 AM »

The rror doesn't really point to the home: directory but what controller do you have?

When you say USB do you mean you have the floppy to usb conversion drive?
Logged

BR
prnuk2003
JesseH
Newbie
*
Offline Offline

Posts: 21


« Reply #4 on: November 17, 2011, 09:51:30 PM »

Yes I have USB /floppy. I am running s4c m98 control.Do I need to create a directory "HOME" on USB/floppy?
Logged
JesseH
Newbie
*
Offline Offline

Posts: 21


« Reply #5 on: November 18, 2011, 02:46:11 AM »

@prunk error, expected 'trap' line 14 col. 3, can you explain the trap statement in further detail? You are very helpful thanks!
Logged
prnuk2003
Sr. Member
****
Offline Offline

Gender: Male
Posts: 339


Customer Service Engineer


« Reply #6 on: November 18, 2011, 02:11:03 PM »

Hell JesseH,
For reference, Line 14 column 3 is the character P in 'PROC Main()' but the problem usually is before the line/column number.

I am not 100% sure but with M98 systems we could only use flp1 or ramdisk.

for example
Load flp1\File:="MODULE1.MOD";
or
Load ram1disk\File:="MODULE1.MOD";

The home directory only started with m2000 (it refers to the directory of the serial number of the robot).

In M98 and before you have this declared in BASE:
  ! Instruction Open parameter Object
  CONST string flp1:="flp1:";
  CONST string ram1disk:="ram1disk:";



In M2000 and later in the BASE system module you will find this declaration:

! Only for old program from S4C system
 CONST string ram1disk := "HOME:";




A Trap routine could look something like this:

    TRAP tOn_Off
      Incr nCycOn_Off;
      Incr nTotOn_Off;
    ENDTRAP

I still do not see a syntax error when loading the module as you listed it below (into an IRC5 system).
One thing I have noticed is that wob0 is declared as TASK type data - I am not sure if that was only available in IRC5 systems (making the data only available to only one of the robots).

Worth trying changing it to:
PERS wobjdata wob0:=[FALSE,TRUE,"",[[0.00,0.00,0.00],[1,0,0,0]],[[0,0,0],[1,0,0,0]]];
(be careful with the name wob0 as it is very close to wobj0 defined in base and not be adjusted!)


If you do a 'file 7. Check program' in the programming window do you get any error with module T loaded or do you get the syntax error only when trying to load the module from floppy or ramdisk?

From experience, when you offline edit a module but make a mistake with the syntax, you will get the syntax error when you try to load the module but the system will not load it into program memory (you cannot view 6. and see the module). The module you will see is the original module because the cotroller checks the module 'in the background, finds that there is a syntax error, keeps the original module loaded and kicks out the 'faulty' one. Hope that makes sense!
Logged

BR
prnuk2003
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!