torayeff / fanucpy

Python Interface for FANUC robots
Apache License 2.0
109 stars 29 forks source link

Issues while building fanuc driver #14

Closed qboticslabs closed 1 year ago

qboticslabs commented 1 year ago

Hello

I have tried to build the Fanuc driver with Roboguide 9.4 and Ktrans version v9.4. I am not able to build 3 Karel files in the driver, please have a look, I am pasting the error below

1. File mappdk_cmd.kl

----------------------------------------------------------------------
Translating C:\Users\NITRO\Desktop\fanuc-driver\mappdk_cmd.kl

KTRANS Version V9.40 (Build 22   9/23/2022)
Copyright (C) FANUC America Corporation, 1985 through 2022.
All Rights Reserved.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_cmd.kl(10)
  10 ROUTINE GET_CURPOS(cmd: STRING): STRING
     ^ ERROR
"PROGRAM" expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_cmd.kl(10)
  10 ROUTINE GET_CURPOS(cmd: STRING): STRING
     ^ ERROR
Id expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_cmd.kl(10)
  10 ROUTINE GET_CURPOS(cmd: STRING): STRING
             ^ ERROR
";" or new line expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_cmd.kl(10)
  10 ROUTINE GET_CURPOS(cmd: STRING): STRING
                       ^ ERROR
"BEGIN" expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_cmd.kl(10)
  10 ROUTINE GET_CURPOS(cmd: STRING): STRING
                        ^ ERROR
";" or new line expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_cmd.kl(10)
  10 ROUTINE GET_CURPOS(cmd: STRING): STRING
                           ^ ERROR
Invalid statement or "ENDxxx" or "UNTIL" expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_cmd.kl(10)
  10 ROUTINE GET_CURPOS(cmd: STRING): STRING
                             ^ ERROR
Invalid statement. ";" or new line expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_cmd.kl(10)
  10 ROUTINE GET_CURPOS(cmd: STRING): STRING
                                   ^ ERROR
Invalid statement. ";" or new line expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_cmd.kl(10)
  10 ROUTINE GET_CURPOS(cmd: STRING): STRING
                                    ^ ERROR
Invalid statement. ";" or new line expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_cmd.kl(10)
  10 ROUTINE GET_CURPOS(cmd: STRING): STRING
                                      ^ ERROR
Invalid statement. ";" or new line expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_cmd.kl(19)
  19 VAR
     ^ ERROR
Invalid statement or "ENDxxx" or "UNTIL" expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_cmd.kl(19)
  19 VAR
     ^ ERROR
Invalid statement. ";" or new line expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_cmd.kl(20)
  20     resp:           STRING[254]
             ^ ERROR
Invalid statement. ";" or new line expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_cmd.kl(20)
  20     resp:           STRING[254]
                         ^ ERROR
Invalid statement. ";" or new line expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_cmd.kl(20)
  20     resp:           STRING[254]
                               ^ ERROR
Invalid statement. ";" or new line expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_cmd.kl(20)
  20     resp:           STRING[254]
                                ^ ERROR
Invalid statement. ";" or new line expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_cmd.kl(20)
  20     resp:           STRING[254]
                                   ^ ERROR
Invalid statement. ";" or new line expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_cmd.kl(21)
  21     out:            STRING[254]
            ^ ERROR
Invalid statement. ";" or new line expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_cmd.kl(21)
  21     out:            STRING[254]
                         ^ ERROR
Invalid statement. ";" or new line expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_cmd.kl(21)
  21     out:            STRING[254]
                               ^ ERROR
Invalid statement. ";" or new line expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_cmd.kl(21)
  21     out:            STRING[254]
                                ^ ERROR
Invalid statement. ";" or new line expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_cmd.kl(21)
  21     out:            STRING[254]
                                   ^ ERROR
Invalid statement. ";" or new line expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_cmd.kl(22)
  22     cpos:           XYZWPR
             ^ ERROR
Invalid statement. ";" or new line expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_cmd.kl(22)
  22     cpos:           XYZWPR
                         ^ ERROR
Invalid statement. ";" or new line expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_cmd.kl(23)
  23 BEGIN
     ^ ERROR
Invalid statement or "ENDxxx" or "UNTIL" expected.

===============Translation not successful===============
Build Failed: Error translating program: Code: 0xFFFFFFFF:  

2. File: mappdk_comm.kl


Translating C:\Users\NITRO\Desktop\fanuc-driver\mappdk_comm.kl

KTRANS Version V9.40 (Build 22   9/23/2022)
Copyright (C) FANUC America Corporation, 1985 through 2022.
All Rights Reserved.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_comm.kl(11)
  11 ROUTINE OPEN_COMM(comm_file: FILE;
     ^ ERROR
"PROGRAM" expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_comm.kl(11)
  11 ROUTINE OPEN_COMM(comm_file: FILE;
     ^ ERROR
Id expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_comm.kl(11)
  11 ROUTINE OPEN_COMM(comm_file: FILE;
             ^ ERROR
";" or new line expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_comm.kl(11)
  11 ROUTINE OPEN_COMM(comm_file: FILE;
                      ^ ERROR
"BEGIN" expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_comm.kl(11)
  11 ROUTINE OPEN_COMM(comm_file: FILE;
                       ^ ERROR
";" or new line expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_comm.kl(11)
  11 ROUTINE OPEN_COMM(comm_file: FILE;
                                ^ ERROR
Invalid statement or "ENDxxx" or "UNTIL" expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_comm.kl(11)
  11 ROUTINE OPEN_COMM(comm_file: FILE;
                                  ^ ERROR
Invalid statement. ";" or new line expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_comm.kl(12)
  12                   server_num: INTEGER;
                                 ^ ERROR
Invalid statement. ";" or new line expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_comm.kl(12)
  12                   server_num: INTEGER;
                                 ^ ERROR
Invalid statement. ";" or new line expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_comm.kl(12)
  12                   server_num: INTEGER;
                                   ^ ERROR
Invalid statement. ";" or new line expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_comm.kl(13)
  13                   port_number: INTEGER)
                                  ^ ERROR
Invalid statement. ";" or new line expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_comm.kl(13)
  13                   port_number: INTEGER)
                                  ^ ERROR
Invalid statement. ";" or new line expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_comm.kl(13)
  13                   port_number: INTEGER)
                                    ^ ERROR
Invalid statement. ";" or new line expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_comm.kl(13)
  13                   port_number: INTEGER)
                                           ^ ERROR
Invalid statement. ";" or new line expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_comm.kl(24)
  24 VAR
     ^ ERROR
Invalid statement or "ENDxxx" or "UNTIL" expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_comm.kl(24)
  24 VAR
     ^ ERROR
Invalid statement. ";" or new line expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_comm.kl(25)
  25     entry:              INTEGER
              ^ ERROR
Invalid statement. ";" or new line expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_comm.kl(25)
  25     entry:              INTEGER
                             ^ ERROR
Invalid statement. ";" or new line expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_comm.kl(26)
  26     status:             INTEGER
               ^ ERROR
Invalid statement. ";" or new line expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_comm.kl(26)
  26     status:             INTEGER
                             ^ ERROR
Invalid statement. ";" or new line expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_comm.kl(27)
  27     resp:               STRING[254]
             ^ ERROR
Invalid statement. ";" or new line expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_comm.kl(27)
  27     resp:               STRING[254]
                             ^ ERROR
Invalid statement. ";" or new line expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_comm.kl(27)
  27     resp:               STRING[254]
                                   ^ ERROR
Invalid statement. ";" or new line expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_comm.kl(27)
  27     resp:               STRING[254]
                                    ^ ERROR
Invalid statement. ";" or new line expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_comm.kl(27)
  27     resp:               STRING[254]
                                       ^ ERROR
Invalid statement. ";" or new line expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_comm.kl(28)
  28     server_str:         STRING[2]
                   ^ ERROR
Invalid statement. ";" or new line expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_comm.kl(28)
  28     server_str:         STRING[2]
                             ^ ERROR
Too many syntax errors encountered.

===============Translation not successful===============
Build Failed: Error translating program: Code: 0xFFFFFFFF:  
----------------------------------------------------------------------

3. File mappdk_utils.kl


KTRANS Version V9.40 (Build 22   9/23/2022)
Copyright (C) FANUC America Corporation, 1985 through 2022.
All Rights Reserved.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_utils.kl(9)
   9 ROUTINE TP_CLS
     ^ ERROR
"PROGRAM" expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_utils.kl(9)
   9 ROUTINE TP_CLS
     ^ ERROR
Id expected.

C:\Users\NITRO\Desktop\fanuc-driver\mappdk_utils.kl(9)
   9 ROUTINE TP_CLS
             ^ ERROR
";" or new line expected.

===============Translation not successful===============
Build Failed: Error translating program: Code: 0xFFFFFFFF:  
----------------------------------------------------------------------
torayeff commented 1 year ago

Hi! You need two build only these files:

mappdk_server.kl
mappdk_logger.kl

Other files will be included automatically.

qboticslabs commented 1 year ago

@torayeff It worked for me. Thanks :)

qboticslabs commented 1 year ago

@torayeff The driver working fine with the Python code. Nice work :)

torayeff commented 1 year ago

I am happy that you enjoy it 😊