c++ grab in position signal

More
23 Sep 2014 00:47 #51444 by andypugh

parameter named #<_hal[mycomponent.kstop]> not defined


Can you confirm that the pin really does exist (using halmeter, or halcmd)
The following user(s) said Thank You: bkt

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

More
23 Sep 2014 01:10 #51447 by bkt
Replied by bkt on topic c++ grab in position signal
yes ... now I try to force it to 1 and in hal meter and in hal configuration it exist and go to 1 value

.... mmm ... the previous version of mycomponent.comp are named MYcomponent.comp .... yesterday during my first test I see that calling hal parameter into gcode is supported only for lowercase, than i renamed MYcomponent pin and hal pin in hal file, in component and in all custom Mcode to lowercase "mycomponent". Than I cancel Mycomponent from usr/bin folder and I compiled again "mycomponent" and I install it (using sudo comp --install & sudo comp --compile ..... there are some other operation for complete the change from "MYcomponent" to "mycomponent"??

I call gcode like a subroutine using halui.mdi .... I'm on ubuntu 10.04 and linuxcnc 2.5.4 ...I do not know what else to add

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

More
23 Sep 2014 01:12 #51448 by andypugh

there are some other operation for complete the change from "MYcomponent" to "mycomponent"??


The filename and the component name declaration in the .comp file have to match exactly or you get hard-to-spot errors.
The following user(s) said Thank You: bkt

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

More
23 Sep 2014 02:00 #51450 by ArcEye
Replied by ArcEye on topic c++ grab in position signal

there are some other operation for complete the change from "MYcomponent" to "mycomponent"??


The filename and the component name declaration in the .comp file have to match exactly or you get hard-to-spot errors.


Indeed, you need to stop using capitalisation, dashes or underscores in names also.

All of those can lead to unexpected errors, the python interpreter in comp will for instance try to subtract one half of a name from the other half if you use a dash :evil:

regards
The following user(s) said Thank You: bkt

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

More
23 Sep 2014 02:16 #51452 by bkt
Replied by bkt on topic c++ grab in position signal
normally in all my code I don't use strange caracters ..... only use number for reply some var.... in this case I have use MYcomponent... sob ... but yesterday I change all reference to this component to "mycomponent" ..... anyway have this error ..... how I can solve it? ... change name, and all other reference, of my component (example in charlie.comp , charlie.signal, etc etc) can solve this issue? ..... there are other operation to do?

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

More
23 Sep 2014 02:22 #51453 by andypugh

I change all reference to this component to "mycomponent" ..... anyway have this error ..... how I can solve it?


I am still not 100% clear if you can see the HAL pin "mycomponent.kstop" during normal operation.

If you can, then perhaps try executing a G-code program that tries to access it to see if that works. (maybe it is something related MDI-ing the G-code sub from other code)

Did you enable G-code access to HAL pins by setting the INI file option? (I can't recall if I ever mentioned that)
linuxcnc.org/docs/html/remap/structure.h...d_sub_ini_features_a
The following user(s) said Thank You: bkt

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

More
23 Sep 2014 03:11 #51456 by bkt
Replied by bkt on topic c++ grab in position signal
yes during normal operations mycomponent.kstop work OK .... BuT I never read and see the doc that you have mentioned .... very thanks .... I don't understand the right mode to declare this feature...

FEATURES: 8
or
FEATURES: enable #<_hal[my component.stop]> ??

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

More
23 Sep 2014 03:30 #51457 by andypugh
You need to make sure that your INI file has an "[RS274NGC]" section (but it is very important that there is only one)

If it isn't there, then you just need to add it.

Then put
FEATURES = 12
on that section (to enable both HAL and INI file parameter access)

I can only apologise that I forgot to mention that earlier.
The following user(s) said Thank You: bkt

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

More
23 Sep 2014 04:34 #51459 by bkt
Replied by bkt on topic c++ grab in position signal
do not worry ..... I should do more study the doc.

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

More
23 Sep 2014 20:36 - 23 Sep 2014 21:02 #51482 by bkt
Replied by bkt on topic c++ grab in position signal
in ordet to solve my ysterday question, today have re-rename mi comp in e.comp ..... all custom Mcodes and other pins or signal become now e.xxxxx .... in mi file.ini I've add FEATURES=12 .... and I read this post andypug-goodworck .... but I still have the yesterday problem with the parameter # < _ hal [ e.sftop [> ... if you launch a command mdi so .
(debug,#<_hal[e.fstop]>
... I get ######

but in hal meter I see it to change value from 0 to 1 and vice versa ....... :blink: :blink:

ps. to avoid any problem I deleted every other INI files related to other tests done on the pc apart from that I work on.

.
(debug,#<_x>
... I get ###### with FEATURES=12 and 28 too
Last edit: 23 Sep 2014 21:02 by bkt.

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

Time to create page: 0.141 seconds
Powered by Kunena Forum