engraving depth setting in realtime
15 Mar 2016 18:22 #71692
by andypugh
It's a feature, we call it "Flexibility". There really is very little that you can't do in HAL.
This HAL file here uses it: electronicsam.com/images/emco/linuxcnc_c...Morph/emco-lathe.hal
Replied by andypugh on topic engraving depth setting in realtime
The number of pins, signals and functions is really overwhelming.....
It's a feature, we call it "Flexibility". There really is very little that you can't do in HAL.
This HAL file here uses it: electronicsam.com/images/emco/linuxcnc_c...Morph/emco-lathe.hal
Please Log in or Create an account to join the conversation.
16 Mar 2016 14:54 #71718
by wicki
Oh, yes - there is also a human feature called language - it is also very flexible.
But it took several years to use it![;-) ;-)](/media/kunena/emoticons/wink.png)
Thanks for all the hints.
With the collected information I now wrote this:
(and it seems to do what I want)
addf Z.update-output servo-thread
addf Z.update-feedback servo-thread
net zpos-cmd => Z.in
net zpos-fb => Z.fb-in
net zpos-cmd-corr Z.out
net zpos-fb-corr Z.fb-out
net zpos-offset Z.offset
unlinkp stepgen.2.position-cmd
unlinkp axis.2.motor-pos-fb
net zpos-cmd-corr => stepgen.2.position-cmd
net zpos-fb-corr => axis.2.motor-pos-fb
In the next step I will try to use this in a shell-script:
halcmd sets zpos-offset $offset
Replied by wicki on topic engraving depth setting in realtime
The number of pins, signals and functions is really overwhelming.....
It's a feature, we call it "Flexibility". There really is very little that you can't do in HAL.
Oh, yes - there is also a human feature called language - it is also very flexible.
But it took several years to use it
![;-) ;-)](/media/kunena/emoticons/wink.png)
Thanks for all the hints.
With the collected information I now wrote this:
(and it seems to do what I want)
addf Z.update-output servo-thread
addf Z.update-feedback servo-thread
net zpos-cmd => Z.in
net zpos-fb => Z.fb-in
net zpos-cmd-corr Z.out
net zpos-fb-corr Z.fb-out
net zpos-offset Z.offset
unlinkp stepgen.2.position-cmd
unlinkp axis.2.motor-pos-fb
net zpos-cmd-corr => stepgen.2.position-cmd
net zpos-fb-corr => axis.2.motor-pos-fb
In the next step I will try to use this in a shell-script:
halcmd sets zpos-offset $offset
Please Log in or Create an account to join the conversation.
16 Mar 2016 15:55 #71723
by andypugh
Replied by andypugh on topic engraving depth setting in realtime
In the next step I will try to use this in a shell-script:
halcmd sets zpos-offset $offset
It would also be quite easy to connect it to a physical knob. I din't know if that would help.
Please Log in or Create an account to join the conversation.
17 Mar 2016 13:59 - 17 Mar 2016 14:00 #71795
by wicki
Replied by wicki on topic engraving depth setting in realtime
The china-caliper-solution is off the table now: to big and to sensitive.
Now I read a forked light barrier with a microcontroller. It delivers several 100 steps
on distance of 1/10mm.
The values are read via ttyUSB as ASCII numbers.
In a first test with an awk-script, it holds the Z-axis in place with a difference
from about two 1/100 mm.
Instead of an own script, which uses hacmd to move the Z-axis - is there an (easy)
way to read ttyUSB via HAL ?
Now I read a forked light barrier with a microcontroller. It delivers several 100 steps
on distance of 1/10mm.
The values are read via ttyUSB as ASCII numbers.
In a first test with an awk-script, it holds the Z-axis in place with a difference
from about two 1/100 mm.
Instead of an own script, which uses hacmd to move the Z-axis - is there an (easy)
way to read ttyUSB via HAL ?
Last edit: 17 Mar 2016 14:00 by wicki.
Please Log in or Create an account to join the conversation.
17 Mar 2016 14:33 #71797
by andypugh
Replied by andypugh on topic engraving depth setting in realtime
Please Log in or Create an account to join the conversation.
17 Mar 2016 15:45 #71801
by wicki
Replied by wicki on topic engraving depth setting in realtime
hmm.... sounds nice ![;-) ;-)](/media/kunena/emoticons/wink.png)
but the PL2303 is not listed in
cat /proc/bus/input/devices
in lsusb its listed and I can read from it.
Bus 001 Device 009: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
![;-) ;-)](/media/kunena/emoticons/wink.png)
but the PL2303 is not listed in
cat /proc/bus/input/devices
in lsusb its listed and I can read from it.
Bus 001 Device 009: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Please Log in or Create an account to join the conversation.
17 Mar 2016 16:01 - 17 Mar 2016 16:01 #71803
by andypugh
Replied by andypugh on topic engraving depth setting in realtime
You might be able to create a userspace Python HAL component that can read the data.
Does it show up in cat /proc/ioports ? If so then a realtime hal module might be able to get the data with rtapi_inb()
www.linuxcnc.org/docs/html/man/man3/rtapi_inb.3rtapi.html
Does it show up in cat /proc/ioports ? If so then a realtime hal module might be able to get the data with rtapi_inb()
www.linuxcnc.org/docs/html/man/man3/rtapi_inb.3rtapi.html
Last edit: 17 Mar 2016 16:01 by andypugh.
Please Log in or Create an account to join the conversation.
17 Mar 2016 16:41 #71814
by wicki
no, this is not a real serial interface. Its a usb-serial-converter.
Is it possible to let HAL read from a file, device or from shared-mem directly?
or is it necessary to create a component for this?
Replied by wicki on topic engraving depth setting in realtime
Does it show up in cat /proc/ioports ? If so then a realtime hal module might be able to get the data with rtapi_inb()
no, this is not a real serial interface. Its a usb-serial-converter.
Is it possible to let HAL read from a file, device or from shared-mem directly?
or is it necessary to create a component for this?
Please Log in or Create an account to join the conversation.
17 Mar 2016 16:43 #71815
by andypugh
Replied by andypugh on topic engraving depth setting in realtime
You need a simple component to put the data in shared-memory.
www.linuxcnc.org/docs/html/hal/halmodule.html
www.linuxcnc.org/docs/html/hal/halmodule.html
The following user(s) said Thank You: wicki
Please Log in or Create an account to join the conversation.
17 Mar 2016 18:37 #71826
by andypugh
Replied by andypugh on topic engraving depth setting in realtime
I just remembered that there are already HAL comps that do serial transfers to USB-serial devices.
Parts of this code might be useful to you:
github.com/LinuxCNC/linuxcnc/blob/master...anyang-vfd/hy_comm.c
Most of that file if huanyang-vfd specific.
Parts of this code might be useful to you:
github.com/LinuxCNC/linuxcnc/blob/master...anyang-vfd/hy_comm.c
Most of that file if huanyang-vfd specific.
Please Log in or Create an account to join the conversation.
Time to create page: 0.116 seconds