cycle timer not working

More
28 Nov 2012 20:16 #27040 by BigJohnT
Replied by BigJohnT on topic cycle timer not working

the documentation over here could be improved
linuxcnc.org/docs/2.5/html/man/man9/time.9.html


I spend some time this morning fixing the description as the automagic generation of the man pages doesn't like a tab character and while I was at it I fixed some typos and reworded it a bit... see what you think about the description now. Might take an hour or so to show up in the online docs.

John

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

More
29 Nov 2012 09:47 #27065 by jlviloria
Replied by jlviloria on topic cycle timer not working
Andy ...

Many times thought about retiring ...

thank you all for your help and patience.

Now I'm dedicated to learning HAL to improve.

tomorrow I'll upload videos and pictures

thanks

Jorge Viloria
Colombia

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

More
04 Feb 2013 21:14 #29568 by tommy
Replied by tommy on topic cycle timer not working
I'm trying to implement this timer into my machine configuration, but I guess I missed something...

What I did was:
-Copy/paste pyvcp code from HERE into my .xml file
- copy/paste contence for post-gui.hal into mine

I also took care about:
PYVCP = custom.xml
POSTGUI_HALFILE = custom.hal
HALUI = halui
in my INI file.

After running linuxcnc I'm reading this:

Debug file information:
Can not find -sec MOT -var MOT -num 1
Can not find -sec IO -var IO -num 1
Can not find -sec LINUXCNC -var NML_FILE -num 1
Can not find -sec EMC -var NML_FILE -num 1
insmod: error inserting '/usr/realtime-2.6.32-122-rtai/modules/linuxcnc/not.ko': -1 File exists
custom.hal:3: exit value: 1
custom.hal:3: insmod failed, returned -1
See the output of 'dmesg' for more information.
5670
PID TTY STAT TIME COMMAND
5756
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components

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

More
04 Feb 2013 21:56 - 04 Feb 2013 22:24 #29569 by cncbasher
Replied by cncbasher on topic cycle timer not working
see custom.hal:3: exit value: 1

are you loading the same component twice ? , what is line 3 of your custom hal file
are you loading the same in your machine hal file ?

difficult to debug without seeing your configuration files

i suspect you have a typo or duplicate entry somewhere
i have just try'd the code on my machine and it works fine
Last edit: 04 Feb 2013 22:24 by cncbasher.

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

More
04 Feb 2013 22:33 - 04 Feb 2013 22:34 #29572 by andypugh
Replied by andypugh on topic cycle timer not working

insmod: error inserting '/usr/realtime-2.6.32-122-rtai/modules/linuxcnc/not.ko': -1 File exists

You are trying to load the "not" HAL component twice (ie, there is a loadrt not line in two separate HAL files).
You need to consolidate them onto one loadrt line in the first HAL file, and make sure that the custom.hal uses the correct index when referring to the not component.

It is possible that TWO_PASS in the INI file might resolve the problem, if you prefer. But I don't know if that resolves the component indexes. (probably not, as you might _want_ to refer to a component created in one HAL file in another).
www.linuxcnc.org/docs/html/config/ini_co...id_sub_hal_section_a
Last edit: 04 Feb 2013 22:34 by andypugh.

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

More
04 Feb 2013 23:02 #29573 by dgarrett
Replied by dgarrett on topic cycle timer not working
hal files can be made more modular and readable with TWOPASS processing if components are loaded with names= option

more details are at
linuxcnc.org/docs/html/common/starting-emc.html#_twopass

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

More
05 Feb 2013 04:17 - 05 Feb 2013 04:21 #29596 by tommy
Replied by tommy on topic cycle timer not working
Yes, in my cutom.hal is loadrt not
and in my "main" hal file is also line " loadrt not count=1 " and its a part of section where are signals for scope created, for tuning servos (basically I'm using Pico's hal config modified for my machine)


So what can I do to solve this?
If I just delete or "comment out" this line in my custom.hal is not enough, because then I'm getting error on line : addf not.0 servo-thread
Last edit: 05 Feb 2013 04:21 by tommy.

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

More
05 Feb 2013 04:30 #29601 by andypugh
Replied by andypugh on topic cycle timer not working

Yes, in my cutom.hal is loadrt not
and in my "main" hal file is also line " loadrt not count=1 " and its a part of section where are signals for scope created, for tuning servos (basically I'm using Pico's hal config modified for my machine)


So what can I do to solve this?

Change the count=1 to count=2 in the main HAL file, delete the loadrt not from the custom.hal file, use not.1 rather than not.0 in the custom.hal file.

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

More
05 Feb 2013 04:50 #29603 by tommy
Replied by tommy on topic cycle timer not working
Nice! Thank you Very much, problem solved!

Now just one more thing, that I'm not sure about ... I have not only this timer widget and would like to add also one for spindle rpm shown. Do I need to create new .xml file or simply add code to this one? And can I do same for my custom.hal?

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

More
05 Feb 2013 05:01 #29607 by andypugh
Replied by andypugh on topic cycle timer not working

Nice! Thank you Very much, problem solved!

Now just one more thing, that I'm not sure about ... I have not only this timer widget and would like to add also one for spindle rpm shown. Do I need to create new .xml file or simply add code to this one? And can I do same for my custom.hal?


I think you can only have one XML file, but you can have as many HAL files as you like. So, you can have all the HAL code in one file, or split it in a way to suit you. There is nothing "magic" about custom.hal, if you look in the INI file you will see that the HAL files are simply read in sequence.

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

Time to create page: 0.103 seconds
Powered by Kunena Forum