Run GladeVCP from halrun

  • mhaberler
  • New Member
  • New Member
More
13 years 9 months ago #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

Please Log in to join the conversation.

More
13 years 9 months ago #28577 by jpalttala
Replied by jpalttala on topic Run GladeVCP from halrun
Hal file as attachment

Attachment not found




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-

Please Log in to join the conversation.

  • mhaberler
  • New Member
  • New Member
More
13 years 9 months ago #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

Please Log in to join the conversation.

More
13 years 9 months ago #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-

Please Log in to join the conversation.

More
10 years 7 months ago #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
_______________________________

Please Log in to join the conversation.

More
10 years 7 months ago #71625 by andypugh
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.

Please Log in to join the conversation.

More
10 years 7 months ago #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

Please Log in to join the conversation.

More
10 years 7 months ago #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!

Please Log in to join the conversation.

Time to create page: 0.109 seconds
Powered by Kunena Forum