#<_hal[custom.pin]> not defined

More
08 Nov 2016 17:59 - 08 Nov 2016 18:03 #82599 by bkt
these is the warning that Lcnc show my at start ...
Near line....
/home....../../../file.ngc
Named Parameter
#<_hal[custom.pin]> not defined

I use the value of out bit parameter from my custom comp in a if loop in my gcode ... the gcode is present as start code in myini.ini file ... Is possible to solve these warning (I need start with these program ... I've not choice) ... i just try to use my gcode as soubroutine ... but obviously is the same ...

In My header custom comp there is these line:
pin out bit mypin "comment"; /* my first version whit error*/
pin out bit mypin = 0 "comment"; /* my second version whit error, actually I use these*/

Regards
giorgio
Last edit: 08 Nov 2016 18:03 by bkt.

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

More
09 Nov 2016 16:53 #82615 by andypugh
You need to activate reading HAL pins from G-code:
linuxcnc.org/docs/2.7/html/remap/remap.h...i_file_configuration
Be aware of the warnings here:
linuxcnc.org/docs/2.7/html/remap/remap.h...ap:referto-hal-items

Your ,comp sample seems to create two pins with the same name. That probably won't work.
The following user(s) said Thank You: bkt

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

More
09 Nov 2016 16:58 #82616 by bkt
Replied by bkt on topic #<_hal[custom.pin]> not defined
ok I solve in these way:

ini file ... open_file = ""

than when axis (or in my case nogui gui ;) ) start use ssh command
ssh user@server-name-here /path/to/command arg1

and use these script on remote machine..
#! /usr/bin/python
import sys
import linuxcnc
myprog = str(sys.argv[1])
c = linux.command()
c.mode(linuxcnc.Mode_AUTO)
c.reset_interpreter()
c.program_open('/home/myfolder' + myprog + '.ngc')

if you prefer can use as argv the complete name file or path complete name file (example /home/myfolder/myngc.ngc) ... so the last row become:
c.program_open( myprog )

that's all folks ...;)

If there are a more secure and elegant method I hope that someone me indicates ....

Regards
giorgio

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

More
09 Nov 2016 17:00 #82617 by bkt
Replied by bkt on topic #<_hal[custom.pin]> not defined

You need to activate reading HAL pins from G-code:
linuxcnc.org/docs/2.7/html/remap/remap.h...i_file_configuration
Be aware of the warnings here:
linuxcnc.org/docs/2.7/html/remap/remap.h...ap:referto-hal-items


for version 2.6 is the same??

Regards
Giorgio

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

More
09 Nov 2016 17:03 - 09 Nov 2016 17:04 #82618 by bkt
Replied by bkt on topic #<_hal[custom.pin]> not defined

You need to activate reading HAL pins from G-code:
linuxcnc.org/docs/2.7/html/remap/remap.h...i_file_configuration
Be aware of the warnings here:
linuxcnc.org/docs/2.7/html/remap/remap.h...ap:referto-hal-items


for version 2.6 is the same??

Your ,comp sample seems to create two pins with the same name. That probably won't work.

there is not my case .... I have only one but set as io .....

Regards
Giorgio
Last edit: 09 Nov 2016 17:04 by bkt.

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

More
09 Nov 2016 17:14 #82621 by andypugh

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

More
09 Nov 2016 20:42 #82628 by bkt
Replied by bkt on topic #<_hal[custom.pin]> not defined
Sorry ia from 2 years that copy and modify the same ini file so i not remember these point..... but my is these:

FEATURES = 28

So I think these is not the real problem .... i suspect that: custom pin is read after call of my custom comp. My custom ccomp is read from custom_hal.hal .... custom_hal.hal is read after myhal.hal..... so when gcode is parse.... my custom comp do not exist..... probabily if can loadrt mycustomcomp in myhal the problem disappear..... tomorrow i try these

Regarfs
Giorgio

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

Time to create page: 0.220 seconds
Powered by Kunena Forum