Tool Changer

More
14 years 1 week ago #25592 by BigJohnT
Replied by BigJohnT on topic Re:Tool Changer
ArcEye wrote:

Hi

It's quite simple, I have copied all of Johns entry into sim files and the problem is that the <pyvcp> </pyvcp> tags are missing from the .xml file


Good catch! I didn't even think of the pyvcp tags when I copied that part from the much larger xml file.

John

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

More
14 years 1 week ago #25600 by tkamsker
Replied by tkamsker on topic Re:Tool Changer
Hi,
I thought on that as well
my xml
is like

<pyvcp>
<labelframe text="Tool Changer">
<font>("Helvetica",16)</font>
    <hbox>
      <button>
      <halpin>"tool-1"</halpin>
      <text>"T1"</text>
      <bd>3</bd>
      </button>
      <button>
      <halpin>"tool-2"</halpin>
      <text>"T2"</text>
      <bd>3</bd>
      </button>
      <button>
      <halpin>"tool-3"</halpin>
      <text>"T3"</text>
      <bd>3</bd>
      </button>
      <button>
      <halpin>"tool-4"</halpin>
      <text>"T4"</text>
      <bd>3</bd>
      </button>
    </hbox>

    <hbox>
      <button>
      <halpin>"tool-5"</halpin>
      <text>"T5"</text>
      <bd>3</bd>
      </button>
      <button>
      <halpin>"tool-6"</halpin>
      <text>"T6"</text>
      <bd>3</bd>
      </button>
      <button>
      <halpin>"tool-7"</halpin>
      <text>"T7"</text>
      <bd>3</bd>
      </button>
      <button>
      <halpin>"tool-8"</halpin>
      <text>"T8"</text>
      <bd>3</bd>
      </button>
    </hbox>
  </labelframe>
</pyvcp>


So the Tags are here
I do get the command unknown and that is not clear how to tackle that one ,..
thx
tk

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

More
14 years 1 week ago #25601 by BigJohnT
Replied by BigJohnT on topic Re:Tool Changer
Did you put the MDI commands in the ini file in the correct place?

linuxcnc.org/docs/html/config/ini_config..._sub_halui_section_a

John

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

More
14 years 1 week ago #25603 by andypugh
Replied by andypugh on topic Re:Tool Changer
"unknown command" is a strange error message, as I would expect "pin not found" if it was a problem with the PyVCP or the MDI_COMMANDs.

You can check that the halui.mdi-command and pyvcp pins exist by using Machine->Show HAL Config to bring up the Halshow widget.
My suggestion is that they do.

I wonder if the problem is some sort of windows line-ending problem? Is the interpreter baffled by the "<LF>net" command?

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

More
14 years 1 week ago - 14 years 1 week ago #25604 by ArcEye
Replied by ArcEye on topic Re:Tool Changer

So the Tags are here
I do get the command unknown and that is not clear how to tackle that one


You will just have to zip your complete config folder and attach it.

The code works, as demonstrated, there must be something in the way it is implemented in your configs which is causing the error.

(or as I have just seen Andy say, your files are littered with CR / LF or other control chars if done on a word processor)

regards
Last edit: 14 years 1 week ago by ArcEye.

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

More
14 years 1 week ago #25610 by BigJohnT
Replied by BigJohnT on topic Re:Tool Changer
A little grepping in the source finds this code that triggered the "Unknown command" error is in src/hal/utils/halcmd.c:
Code:
static int parse_cmd1(char **argv) { struct halcmd_command *command = bsearch(argv[0], halcmd_commands, halcmd_ncommands, sizeof(struct halcmd_command), compare_command); int argc = count_args(argv); if(argc == 0) return 0; if(!command) { // special case: sig = newvalue if(argc == 3 && strcmp(argv[1], "=")) { return do_setp_cmd(argv[0], argv[2]); } else { halcmd_error("Unknown command '%s'\n", argv[0]); return -EINVAL; }

Don't know if this sheds some light on the picture...

John

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

Time to create page: 0.107 seconds
Powered by Kunena Forum