kobbled / kl-paths

path functions for FANUC Karel
MIT License
6 stars 3 forks source link

ERROR: ROUTINE argument data type does not match the parameter definition. | Building "pathmotion" tests #2

Closed kevinAlfsen closed 1 year ago

kevinAlfsen commented 1 year ago

I got this error when building the tests in the pathmotion library (test_pth_mtn.kl and test_pth_rot.kl):

`C:\Users\Kevin Alfsen\EffeeDevelopment\Fanuc Plugins\Karel Environment\Ka-Boost\lib\paths\pathmotion\test\tstrot.kl(1207) 1207 tsplrt_impp(filename) ^ ERROR ROUTINE argument data type does not match the parameter definition.

===============Translation not successful=============== Error executing KTrans: Error translating program: Code: 0xFFFFFFFF:

KTRANS Version V9.40 (Build 83 4/22/2021) Copyright (C) FANUC America Corporation, 1985 through 2019. All Rights Reserved.

C:\Users\Kevin Alfsen\EffeeDevelopment\Fanuc Plugins\Karel Environment\Ka-Boost\lib\paths\pathmotion\test\tstrot.kl(1207) 1207 tsplrt_impp(filename) ^ ERROR ROUTINE argument data type does not match the parameter definition.

===============Translation not successful=============== Error executing KTrans: Error translating program: Code: 0xFFFFFFFF:

KTRANS Version V9.40 (Build 83 4/22/2021) Copyright (C) FANUC America Corporation, 1985 through 2019. All Rights Reserved.

C:\Users\Kevin Alfsen\EffeeDevelopment\Fanuc Plugins\Karel Environment\Ka-Boost\lib\paths\pathmotion\test\tstrot.kl(1207) 1207 tsplrt_impp(filename) ^ ERROR ROUTINE argument data type does not match the parameter definition.

===============Translation not successful=============== Error executing KTrans: Error translating program: Code: 0xFFFFFFFF:

KTRANS Version V9.40 (Build 83 4/22/2021) Copyright (C) FANUC America Corporation, 1985 through 2019. All Rights Reserved.

C:\Users\Kevin Alfsen\EffeeDevelopment\Fanuc Plugins\Karel Environment\Ka-Boost\lib\paths\pathmotion\test\test_pth_rot.kl(1027) 1027 tstrot_pthpl(lines, contours, 4, 1, FALSE, FALSE) ^ ERROR ROUTINE called has more arguments than ROUTINE definition.

C:\Users\Kevin Alfsen\EffeeDevelopment\Fanuc Plugins\Karel Environment\Ka-Boost\lib\paths\pathmotion\test\test_pth_rot.kl(1085) 1085 tstrot_pthpl(lines, contours, 4, 1, FALSE, FALSE) ^ ERROR ROUTINE called has more arguments than ROUTINE definition.

C:\Users\Kevin Alfsen\EffeeDevelopment\Fanuc Plugins\Karel Environment\Ka-Boost\lib\paths\pathmotion\test\test_pth_rot.kl(1139) 1139 tstrot_pthpl(lines, contours, 1, 1, FALSE, FALSE) ^ ERROR ROUTINE called has more arguments than ROUTINE definition.

C:\Users\Kevin Alfsen\EffeeDevelopment\Fanuc Plugins\Karel Environment\Ka-Boost\lib\paths\pathmotion\test\test_pth_rot.kl(1209) 1209 tstrot_pthpl(lines, contours, 4, 1, FALSE, FALSE) ^ ERROR ROUTINE called has more arguments than ROUTINE definition.

C:\Users\Kevin Alfsen\EffeeDevelopment\Fanuc Plugins\Karel Environment\Ka-Boost\lib\paths\pathmotion\test\test_pth_rot.kl(1265) 1265 tstrot_pthpl(lines, contours, 1, 1, FALSE, FALSE) ^ ERROR ROUTINE called has more arguments than ROUTINE definition.`

The first error seems to come from pathplan.klc::importPath. There is a comment there stating that the method should be updated to the new csv/layout. The error seems to come from passing a filename as a parameter to the function which is declared to take a PATH : nodedata = t_VEC_PATH as input.

The second error comes from passing to many parameters into the tstrot_pthpl (pathmake.klc::planPath) function.

My workaround was to comment out pathplan.klc::importPath and to remove the last boolean parameter from any calls to planPath in the test_mtn and test_rot scripts.

Here is a changelog of my workaround. workaround_diff.pdf

Hope this is helpful

kobbled commented 1 year ago

Firstly, sorry for being MIA, I was out for a bit with some medical issues, and then work got swamped for me. Secondly sorry about this, I had some uncommitted changes, and I updated the tests to the new function signatures breaking things. It should be good now for the tests. Reopen issue if you still have problems.

A couple of the reason for this: