REMAP function doesn't work

More
27 Jan 2020 20:17 #155946 by aleksamc
I try to study REMAP function and I read main Doc (Example for named parameter passing to NGC procedures)
but I get such error:
"NGC file not found: ngc=m400 - 45:REMAP = M400 modalgroup=10 argspec=Pg ngc=m400"

I make standart example:
1) I add to .ini file in [RS274NGC]
REMAP=M400 modalgroup=10 argspec=Pq ngc=400
2) Creat file <m400.ngc> in main linux configuration folder (also change it to standart nc-files
2.1) The code of it is from example:
o<m400> sub
(P is required since it's uppercase in the argspec)
(debug, P word=#<P>)
(the q argspec is optional since its lowercase in the argspec. Use as follows:)
o100 if [EXISTS[#<q>]]
    (debug, Q word set: #<q>)
o100 endif
o<m400> endsub
M2
3) linux doesn't starts.

Please Log in or Create an account to join the conversation.

More
27 Jan 2020 20:41 #155953 by tommylight

"NGC file not found: ngc=m400 - 45:REMAP = M400 modalgroup=10 argspec=Pg ngc=m400"


You need to have actual files named m400.ngc in the same folder as the config, if i remember correctly as it was some years ago i used remap.

Please Log in or Create an account to join the conversation.

More
28 Jan 2020 06:12 #155977 by aleksamc
Yes, I have them in the same folder as .ini file, but it doesn't found it.
What I do wrong I don't know?

Please Log in or Create an account to join the conversation.

More
28 Jan 2020 09:36 #155984 by curtisa
Replied by curtisa on topic REMAP function doesn't work
Pretty sure your 400.ngc file needs to be saved in the location specified under the SUBROUTINE_PATH parameter in the [RS274NGC] section of your INI file.
The following user(s) said Thank You: tommylight, aleksamc

Please Log in or Create an account to join the conversation.

More
28 Jan 2020 11:48 #155998 by aleksamc
Yes, it's helped. Thanks a lot.

Please Log in or Create an account to join the conversation.

More
28 Jan 2020 18:38 - 28 Jan 2020 19:14 #156037 by aleksamc
-
Last edit: 28 Jan 2020 19:14 by aleksamc. Reason: was my gramar fault

Please Log in or Create an account to join the conversation.

More
28 Jan 2020 20:01 - 28 Jan 2020 20:41 #156041 by aleksamc
I try to continue my study of remap.
Now I stuck at python runnig program (first example)
1) In .ini file I write
REMAP=G88.6 modalgroup=1 argspec=XYZp python=g886
2) Then I created file g886.py in the same directory as ngc remapping files.
3) In file I write my program from standart example
4) I've got an error:
'g886' is not a Python callable function - 48:REMAP=G88.6 modalgroup=1 argspec=XYZp python=g886
I get such error if I complitly delete file from the folder also.
What problem could be?

I've read "4. Upgrading an existing configuration for remapping"


but still have problem
Last edit: 28 Jan 2020 20:41 by aleksamc.

Please Log in or Create an account to join the conversation.

More
29 Jan 2020 03:38 #156064 by satiowadahc
Can you post your python code?

Please Log in or Create an account to join the conversation.

More
29 Jan 2020 11:27 - 29 Jan 2020 11:30 #156080 by aleksamc
I added all necessary files. Now I'm very bad in python but I hope to study it using examples in technical docs.

File Attachment:

File Name: Axis4_2020-01-29.ini
File Size:3 KB

File Attachment:

File Name: g886.py
File Size:0 KB

File Attachment:

File Name: remap.py
File Size:0 KB

File Attachment:

File Name: stdglue.py
File Size:15 KB

File Attachment:

File Name: toplevel.py
File Size:0 KB


What editor Can I use to write program for python? Using it in gedit is very inconvenient.
Attachments:
Last edit: 29 Jan 2020 11:30 by aleksamc.

Please Log in or Create an account to join the conversation.

More
30 Jan 2020 04:24 #156140 by satiowadahc
I may be mistaken but I believe your return needs to be indented on line 10.

Editor personal preference for general python is atom for generic writing, and pycharm for extreme debugging, but it doesn't work as nice when using linuxcnc

Please Log in or Create an account to join the conversation.

Time to create page: 0.262 seconds
Powered by Kunena Forum