Run GladeVCP from halrun
10 Jan 2013 19:33 #28545
by mhaberler
Replied by mhaberler on topic Run GladeVCP from halrun
please post a complete halcmd file and the exact sequence of commands you execute before the error appears
- Michael
- Michael
The following user(s) said Thank You: jpalttala
Please Log in or Create an account to join the conversation.
11 Jan 2013 14:51 - 11 Jan 2013 15:08 #28577
by jpalttala
Replied by jpalttala on topic Run GladeVCP from halrun
Hal file as attachment
I boot my system with desktop icon --> .sh file
so my startup command is linuxcnc /configs/Tron-CNC.ini
this error occures every time when I start LinuxCNC + my UI
When my UI comes up there is these 2 windows
Was this enough??
-Jyrki-
I boot my system with desktop icon --> .sh file
so my startup command is linuxcnc /configs/Tron-CNC.ini
this error occures every time when I start LinuxCNC + my UI
When my UI comes up there is these 2 windows
Was this enough??
-Jyrki-
Last edit: 11 Jan 2013 15:08 by jpalttala.
Please Log in or Create an account to join the conversation.
11 Jan 2013 15:18 #28579
by mhaberler
Replied by mhaberler on topic Run GladeVCP from halrun
yes it was.
You want a HAL/Gladevcp only application, but nevertheless start it with Linuxcnc which starts a UI by itself, which is why you get several windows.
What you want is to start your application just with 'halcmd -f halfile'
Also, please see the example I gave here earlier how to wait for termination of the UI and shutdown hal. It is all outlined there, just follow that.
- Michael
You want a HAL/Gladevcp only application, but nevertheless start it with Linuxcnc which starts a UI by itself, which is why you get several windows.
What you want is to start your application just with 'halcmd -f halfile'
Also, please see the example I gave here earlier how to wait for termination of the UI and shutdown hal. It is all outlined there, just follow that.
- Michael
The following user(s) said Thank You: jpalttala
Please Log in or Create an account to join the conversation.
11 Jan 2013 15:41 #28581
by jpalttala
Replied by jpalttala on topic Run GladeVCP from halrun
Thank you!!
I will test this when I get home, this might resolve on one additional problem too
Great. I will comment how it went
-Jyrki-
I will test this when I get home, this might resolve on one additional problem too
Great. I will comment how it went
-Jyrki-
Please Log in or Create an account to join the conversation.
14 Mar 2016 05:53 #71605
by famus
Replied by famus on topic Re:Run GladeVCP from halrun
Hi, John,
I am a newby who is trying to make a simple .hal script to turn three motors, starting with just one motor. I found this thread wd5jwy posted back in 2012. He seemed to have it working. But I am still stuck.
I have a TB6560 3-axis controller connected to a parallel port. All three motors turned under Axis 2.7.4 after I configured using Stepconf wizard. But running halrun and clicking the Start button does turn the motors. There was also no error. However, I see the LED for that axis lit up and turned off with toggling the Start button.
Could you please tell me what I have wrong? The following is my .hal script for only one motor: x-axis. Thank you very much!
- Famus
____________________________
loadusr -Wn motorTest gladevcp -c motorTest -u handler.py wd.glade
loadrt threads name1=fast period1=50000 fp1=0 name2=slow period2=1000000
loadrt stepgen step_type=0 ctrl_type=v
loadrt hal_parport cfg="0x378 out"
addf stepgen.make-pulses fast
addf stepgen.update-freq slow
addf parport.0.read fast
addf parport.0.write fast
setp stepgen.0.position-scale 10000
setp motorTest.hal_hbox1 1
setp motorTest.hal_hbox2 1
net p-scale stepgen.0.velocity-cmd <= motorTest.hal_spinbutton1-f
net xstep => parport.0.pin-01-out
net xenable => parport.0.pin-14-out
net xdir => parport.0.pin-07-out
net xstep <= stepgen.0.step
net xdir <= stepgen.0.dir
#net xenable axis.0.amp-enable-out => stepgen.0.enable
net run-stepgen stepgen.0.enable <= motorTest.start_button
start
_______________________________
I am a newby who is trying to make a simple .hal script to turn three motors, starting with just one motor. I found this thread wd5jwy posted back in 2012. He seemed to have it working. But I am still stuck.
I have a TB6560 3-axis controller connected to a parallel port. All three motors turned under Axis 2.7.4 after I configured using Stepconf wizard. But running halrun and clicking the Start button does turn the motors. There was also no error. However, I see the LED for that axis lit up and turned off with toggling the Start button.
Could you please tell me what I have wrong? The following is my .hal script for only one motor: x-axis. Thank you very much!
- Famus
____________________________
loadusr -Wn motorTest gladevcp -c motorTest -u handler.py wd.glade
loadrt threads name1=fast period1=50000 fp1=0 name2=slow period2=1000000
loadrt stepgen step_type=0 ctrl_type=v
loadrt hal_parport cfg="0x378 out"
addf stepgen.make-pulses fast
addf stepgen.update-freq slow
addf parport.0.read fast
addf parport.0.write fast
setp stepgen.0.position-scale 10000
setp motorTest.hal_hbox1 1
setp motorTest.hal_hbox2 1
net p-scale stepgen.0.velocity-cmd <= motorTest.hal_spinbutton1-f
net xstep => parport.0.pin-01-out
net xenable => parport.0.pin-14-out
net xdir => parport.0.pin-07-out
net xstep <= stepgen.0.step
net xdir <= stepgen.0.dir
#net xenable axis.0.amp-enable-out => stepgen.0.enable
net run-stepgen stepgen.0.enable <= motorTest.start_button
start
_______________________________
Please Log in or Create an account to join the conversation.
14 Mar 2016 11:11 #71625
by andypugh
Replied by andypugh on topic Re:Run GladeVCP from halrun
That looks like it should work.
Is it possible that the halrun command is running then exiting?
linuxcnc.org/docs/2.7/html/man/man1/halrun.1.html
You might need to use the -I option.
Is it possible that the halrun command is running then exiting?
linuxcnc.org/docs/2.7/html/man/man1/halrun.1.html
You might need to use the -I option.
The following user(s) said Thank You: famus
Please Log in or Create an account to join the conversation.
14 Mar 2016 19:49 #71653
by famus
Replied by famus on topic Re:Run GladeVCP from halrun
Thank you, Andy! I used this command:
>>halrun -I -f start.hal
And i saw the interactive prompt.
-famus
>>halrun -I -f start.hal
And i saw the interactive prompt.
-famus
Please Log in or Create an account to join the conversation.
20 Mar 2016 06:40 #71938
by famus
Replied by famus on topic Re:Run GladeVCP from halrun
I got it working. The reason was the button link was not correct, and I didn't set the maxvel and maxaccel. They were all 0's!
I am very happy!
Thank you!
I am very happy!
Thank you!
Please Log in or Create an account to join the conversation.
Moderators: HansU
Time to create page: 0.086 seconds