MPG3 pendant installation problem
11 Aug 2011 13:50 #12411
by leintz
MPG3 pendant installation problem was created by leintz
HI !
I have probem with MPG3 (c22 board) installation....
during AXIS startup I got error message...
"
Debug file information:
insmod: error inserting '/usr/realtime-2.6.32-122-rtai/modules/emc2/encoder.ko': -1 File exists
custom.hal:9: exit value: 1
custom.hal:9: insmod failed, returned -1
See the output of 'dmesg' for more information.
6976
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components
"
So...custom.hal file ...row number 9 is
loadrt encoder num_chan=1
I did precisely as in "help"
wiki.linuxcnc.org/emcinfo.pl?Hooking_Up_A_MPG_Pendant
"In your custom.hal file or other .hal file add the following making sure you don't have mux4 or an encoder already in use. If you do just increase the counts and change the reference number. "
Yes...loadrt encoder num_chan=1 is already loaded in my-mill.hal
I tried several chan numbers....no result....same error message...
What I did wrong ?
best regads....
I have probem with MPG3 (c22 board) installation....
during AXIS startup I got error message...
"
Debug file information:
insmod: error inserting '/usr/realtime-2.6.32-122-rtai/modules/emc2/encoder.ko': -1 File exists
custom.hal:9: exit value: 1
custom.hal:9: insmod failed, returned -1
See the output of 'dmesg' for more information.
6976
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components
"
So...custom.hal file ...row number 9 is
loadrt encoder num_chan=1
I did precisely as in "help"
wiki.linuxcnc.org/emcinfo.pl?Hooking_Up_A_MPG_Pendant
"In your custom.hal file or other .hal file add the following making sure you don't have mux4 or an encoder already in use. If you do just increase the counts and change the reference number. "
Yes...loadrt encoder num_chan=1 is already loaded in my-mill.hal
I tried several chan numbers....no result....same error message...
What I did wrong ?
best regads....
Please Log in or Create an account to join the conversation.
11 Aug 2011 14:00 #12413
by BigJohnT
Replied by BigJohnT on topic Re:MPG3 pendant installation problem
In your main hal file increase the count to 2 and delete the second loading of the encoder in your custom hal file.
John
John
Please Log in or Create an account to join the conversation.
11 Aug 2011 14:14 #12417
by leintz
Replied by leintz on topic Re:MPG3 pendant installation problem
main hal
loadrt encoder num_chan=2 ( is it correct?)
in custom hal
loadrt encoder num_chan=1 was deleted
new error
Debug file information:
HAL: ERROR: function 'encoder.capture-position' may only be added to one thread
custom.hal:12: addf failed
1826
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components
loadrt encoder num_chan=2 ( is it correct?)
in custom hal
loadrt encoder num_chan=1 was deleted
new error
Debug file information:
HAL: ERROR: function 'encoder.capture-position' may only be added to one thread
custom.hal:12: addf failed
1826
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components
Please Log in or Create an account to join the conversation.
11 Aug 2011 14:29 #12420
by BigJohnT
Replied by BigJohnT on topic Re:MPG3 pendant installation problem
Delete the offending line in your custom.hal file. As the error says you can only add encoder.capture-position once.
John
John
Please Log in or Create an account to join the conversation.
11 Aug 2011 16:20 - 11 Aug 2011 16:20 #12429
by leintz
Replied by leintz on topic Re:MPG3 pendant installation problem
Do I need to delete those lines...because they are already loaded and added ?
and thats all ?
# Jog Pendant
loadrt encoder num_chan=1
loadrt mux4 count=1
addf encoder.capture-position servo-thread
addf encoder.update-counters base-thread
addf mux4.0 servo-thread
setp axis.N.jog-vel-mode 0
setp axis.N.jog-vel-mode 1
setp encoder.0.x4-mode 0
setp mux4.0.in0 0.1
setp mux4.0.in1 0.01
setp mux4.0.in2 0.001
net scale1 mux4.0.sel0 <= parport.1.pin-09-in
net scale2 mux4.0.sel1 <= parport.1.pin-10-in
net pend-scale axis.0.jog-scale <= mux4.0.out
net pend-scale axis.1.jog-scale
net pend-scale axis.2.jog-scale
net mpg-a encoder.0.phase-A <= parport.1.pin-02-in
net mpg-b encoder.0.phase-B <= parport.1.pin-03-in
net mpg-x axis.0.jog-enable <= parport.1.pin-04-in
net mpg-y axis.1.jog-enable <= parport.1.pin-05-in
net mpg-z axis.2.jog-enable <= parport.1.pin-06-in
net pend-counts axis.0.jog-counts <= encoder.0.counts
net pend-counts axis.1.jog-counts
net pend-counts axis.2.jog-counts
and thats all ?
# Jog Pendant
loadrt mux4 count=1
addf encoder.update-counters base-thread
addf mux4.0 servo-thread
setp axis.N.jog-vel-mode 0
setp axis.N.jog-vel-mode 1
setp encoder.0.x4-mode 0
setp mux4.0.in0 0.1
setp mux4.0.in1 0.01
setp mux4.0.in2 0.001
net scale1 mux4.0.sel0 <= parport.1.pin-09-in
net scale2 mux4.0.sel1 <= parport.1.pin-10-in
net pend-scale axis.0.jog-scale <= mux4.0.out
net pend-scale axis.1.jog-scale
net pend-scale axis.2.jog-scale
net mpg-a encoder.0.phase-A <= parport.1.pin-02-in
net mpg-b encoder.0.phase-B <= parport.1.pin-03-in
net mpg-x axis.0.jog-enable <= parport.1.pin-04-in
net mpg-y axis.1.jog-enable <= parport.1.pin-05-in
net mpg-z axis.2.jog-enable <= parport.1.pin-06-in
net pend-counts axis.0.jog-counts <= encoder.0.counts
net pend-counts axis.1.jog-counts
net pend-counts axis.2.jog-counts
Last edit: 11 Aug 2011 16:20 by leintz.
Please Log in or Create an account to join the conversation.
11 Aug 2011 16:31 #12431
by BigJohnT
Replied by BigJohnT on topic Re:MPG3 pendant installation problem
That and change encoder.0 to encoder.1
John
John
Please Log in or Create an account to join the conversation.
11 Aug 2011 16:33 #12432
by BigJohnT
Replied by BigJohnT on topic Re:MPG3 pendant installation problem
And I updated the wiki page a bit to make it a bit clearer I hope.
John
John
Please Log in or Create an account to join the conversation.
12 Aug 2011 03:47 #12443
by leintz
Replied by leintz on topic Re:MPG3 pendant installation problem
finally it works
correct code for everyone
special thanks to BigJohnT
custom.hal
# Jog Pendant
loadrt mux4 count=1
loadrt lut5 count=1
addf mux4.0 servo-thread
addf lut5.0 servo-thread
setp axis.0.jog-vel-mode 1
setp axis.1.jog-vel-mode 1
setp axis.2.jog-vel-mode 1
setp encoder.1.x4-mode 0
setp mux4.0.in0 0.1
setp mux4.0.in1 0.01
setp mux4.0.in2 0.001
net scale1 mux4.0.sel0 <= parport.1.pin-09-in
net scale2 mux4.0.sel1 <= parport.1.pin-10-in
net pend-scale axis.0.jog-scale <= mux4.0.out
net pend-scale axis.1.jog-scale
net pend-scale axis.2.jog-scale
net mpg-a encoder.1.phase-A <= parport.1.pin-02-in
net mpg-b encoder.1.phase-B <= parport.1.pin-03-in
net mpg-x axis.0.jog-enable <= parport.1.pin-04-in
net mpg-y axis.1.jog-enable <= parport.1.pin-05-in
net mpg-z axis.2.jog-enable <= parport.1.pin-06-in
net pend-counts axis.0.jog-counts <= encoder.1.counts
net pend-counts axis.1.jog-counts
net pend-counts axis.2.jog-counts
setp lut5.0.function 0x116
net mpg-x lut5.0.in-0
net mpg-y lut5.0.in-1
net mpg-z lut5.0.in-2
setp lut5.0.in-4 0
net jog-on parport.1.pin-01-out <= lut5.0.out
correct code for everyone
special thanks to BigJohnT
custom.hal
# Jog Pendant
loadrt mux4 count=1
loadrt lut5 count=1
addf mux4.0 servo-thread
addf lut5.0 servo-thread
setp axis.0.jog-vel-mode 1
setp axis.1.jog-vel-mode 1
setp axis.2.jog-vel-mode 1
setp encoder.1.x4-mode 0
setp mux4.0.in0 0.1
setp mux4.0.in1 0.01
setp mux4.0.in2 0.001
net scale1 mux4.0.sel0 <= parport.1.pin-09-in
net scale2 mux4.0.sel1 <= parport.1.pin-10-in
net pend-scale axis.0.jog-scale <= mux4.0.out
net pend-scale axis.1.jog-scale
net pend-scale axis.2.jog-scale
net mpg-a encoder.1.phase-A <= parport.1.pin-02-in
net mpg-b encoder.1.phase-B <= parport.1.pin-03-in
net mpg-x axis.0.jog-enable <= parport.1.pin-04-in
net mpg-y axis.1.jog-enable <= parport.1.pin-05-in
net mpg-z axis.2.jog-enable <= parport.1.pin-06-in
net pend-counts axis.0.jog-counts <= encoder.1.counts
net pend-counts axis.1.jog-counts
net pend-counts axis.2.jog-counts
setp lut5.0.function 0x116
net mpg-x lut5.0.in-0
net mpg-y lut5.0.in-1
net mpg-z lut5.0.in-2
setp lut5.0.in-4 0
net jog-on parport.1.pin-01-out <= lut5.0.out
Please Log in or Create an account to join the conversation.
Time to create page: 0.525 seconds