×
Forum Header
Mach3 XML and Stepconfig issues.
25 Apr 2017 10:22 #92043
by andypugh
Yes, quadrature mod has a different set of pins.
It is probably worth getting a list, for reference. Try this.
With LinuxCNC not running:
Make a note of the pins and params for a position-mode step/dir stepgen
Now:
And make a note of the pins and params of the velocity/quadrature mode stepgen.
(Copy and paste from the terminal window in a text editor is the easy way)
Replied by andypugh on topic Mach3 Xhttps://forum.linuxcnc.org/16-stepconf-wizard/32ML and Stepconfig issues.
Have to comment out that line to get started, but I doubt it will help anyhow.
Yes, quadrature mod has a different set of pins.
It is probably worth getting a list, for reference. Try this.
With LinuxCNC not running:
halrun
loadrt stepgen cmd_type=p step_type=0
show pin
show param
exit
Make a note of the pins and params for a position-mode step/dir stepgen
Now:
halrun
loadrt stepgen cmd_type=v step_type=2
show pin
show param
exit
And make a note of the pins and params of the velocity/quadrature mode stepgen.
(Copy and paste from the terminal window in a text editor is the easy way)
Please Log in or Create an account to join the conversation.
25 Apr 2017 10:56 #92045
by rodw
Replied by rodw on topic Mach3 XML and Stepconfig issues.
Its probably just a typographical or spelling error. Review the other stepgens in your hal and you might have an example you can use to fix it.
Please Log in or Create an account to join the conversation.
25 Apr 2017 10:59 #92046
by tecno
Replied by tecno on topic Mach3 XML and Stepconfig issues.
That one has been there from day 1 after running XML import in Stepconfig so I assume something is missing like addf line.
Please Log in or Create an account to join the conversation.
25 Apr 2017 11:16 #92047
by tecno
Replied by tecno on topic Mach3 XML and Stepconfig issues.
Here the hal test for you Andy
bengt@linuxcnc:~$ halrun
.
halcmd: loadrt stepgen cmd_type=p step_type=0
Error: could not insert module /usr/realtime-3.4-9-rtai-686-pae/modules/linuxcnc/stepgen.ko: Unknown symbol in module
<stdin>:1: exit value: 1
<stdin>:1: insmod for stepgen failed, returned -1
See the output of 'dmesg' for more information.
halcmd: show pin
Component Pins:
Owner Type Dir Value Name
halcmd: show param
Parameters:
Owner Type Dir Value Name
halcmd: exit
bengt@linuxcnc:~$
bengt@linuxcnc:~$ halrun
.
halcmd: loadrt stepgen cmd_type=v step_type=2
Error: could not insert module /usr/realtime-3.4-9-rtai-686-pae/modules/linuxcnc/stepgen.ko: Unknown symbol in module
<stdin>:1: exit value: 1
<stdin>:1: insmod for stepgen failed, returned -1
See the output of 'dmesg' for more information.
halcmd: show pin
Component Pins:
Owner Type Dir Value Name
halcmd: show param
Parameters:
Owner Type Dir Value Name
halcmd: exit
bengt@linuxcnc:~$
bengt@linuxcnc:~$ halrun
.
halcmd: loadrt stepgen cmd_type=p step_type=0
Error: could not insert module /usr/realtime-3.4-9-rtai-686-pae/modules/linuxcnc/stepgen.ko: Unknown symbol in module
<stdin>:1: exit value: 1
<stdin>:1: insmod for stepgen failed, returned -1
See the output of 'dmesg' for more information.
halcmd: show pin
Component Pins:
Owner Type Dir Value Name
halcmd: show param
Parameters:
Owner Type Dir Value Name
halcmd: exit
bengt@linuxcnc:~$
bengt@linuxcnc:~$ halrun
.
halcmd: loadrt stepgen cmd_type=v step_type=2
Error: could not insert module /usr/realtime-3.4-9-rtai-686-pae/modules/linuxcnc/stepgen.ko: Unknown symbol in module
<stdin>:1: exit value: 1
<stdin>:1: insmod for stepgen failed, returned -1
See the output of 'dmesg' for more information.
halcmd: show pin
Component Pins:
Owner Type Dir Value Name
halcmd: show param
Parameters:
Owner Type Dir Value Name
halcmd: exit
bengt@linuxcnc:~$
Please Log in or Create an account to join the conversation.
25 Apr 2017 11:24 #92048
by andypugh
Replied by andypugh on topic Mach3 XML and Stepconfig issues.
Sorry, my error (I rarely use stepgen.
ctrl_type rather than cmd_type
ctrl_type rather than cmd_type
Please Log in or Create an account to join the conversation.
25 Apr 2017 11:34 #92050
by tecno
Replied by tecno on topic Mach3 XML and Stepconfig issues.
halrun
loadrt stepgen ctrl_type=p step_type=0
show pin
show param
exit
bengt@linuxcnc:~$ halrun
.
halcmd: loadrt stepgen ctrl_type=p step_type=0
halcmd: show pin
Component Pins:
Owner Type Dir Value Name
4 s32 OUT 0 stepgen.0.counts
4 bit OUT FALSE stepgen.0.dir
4 bit IN FALSE stepgen.0.enable
4 float IN 0 stepgen.0.position-cmd
4 float OUT 0 stepgen.0.position-fb
4 bit OUT FALSE stepgen.0.step
4 s32 OUT 0 stepgen.capture-position.time
4 s32 OUT 0 stepgen.make-pulses.time
4 s32 OUT 0 stepgen.update-freq.time
halcmd: show param
Parameters:
Owner Type Dir Value Name
4 u32 RW 0x00000001 stepgen.0.dirhold
4 u32 RW 0x00000001 stepgen.0.dirsetup
4 float RO 0 stepgen.0.frequency
4 float RW 0 stepgen.0.maxaccel
4 float RW 0 stepgen.0.maxvel
4 float RW 1 stepgen.0.position-scale
4 s32 RO 0 stepgen.0.rawcounts
4 u32 RW 0x00000001 stepgen.0.steplen
4 u32 RW 0x00000001 stepgen.0.stepspace
4 s32 RW 0 stepgen.capture-position.tmax
4 bit RO FALSE stepgen.capture-position.tmax-increased
4 s32 RW 0 stepgen.make-pulses.tmax
4 bit RO FALSE stepgen.make-pulses.tmax-increased
4 s32 RW 0 stepgen.update-freq.tmax
4 bit RO FALSE stepgen.update-freq.tmax-increased
halcmd: exit
bengt@linuxcnc:~$ ^C
bengt@linuxcnc:~$
halrun
loadrt stepgen ctrl_type=v step_type=2
show pin
show param
exit
bengt@linuxcnc:~$ halrun
.
halcmd: loadrt stepgen ctrl_type=v step_type=2
halcmd: show pin
Component Pins:
Owner Type Dir Value Name
4 s32 OUT 0 stepgen.0.counts
4 bit IN FALSE stepgen.0.enable
4 bit OUT FALSE stepgen.0.phase-A
4 bit OUT FALSE stepgen.0.phase-B
4 float OUT 0 stepgen.0.position-fb
4 float IN 0 stepgen.0.velocity-cmd
4 s32 OUT 0 stepgen.capture-position.time
4 s32 OUT 0 stepgen.make-pulses.time
4 s32 OUT 0 stepgen.update-freq.time
halcmd: show param
Parameters:
Owner Type Dir Value Name
4 u32 RW 0x00000001 stepgen.0.dirdelay
4 float RO 0 stepgen.0.frequency
4 float RW 0 stepgen.0.maxaccel
4 float RW 0 stepgen.0.maxvel
4 float RW 1 stepgen.0.position-scale
4 s32 RO 0 stepgen.0.rawcounts
4 u32 RW 0x00000001 stepgen.0.steplen
4 s32 RW 0 stepgen.capture-position.tmax
4 bit RO FALSE stepgen.capture-position.tmax-increased
4 s32 RW 0 stepgen.make-pulses.tmax
4 bit RO FALSE stepgen.make-pulses.tmax-increased
4 s32 RW 0 stepgen.update-freq.tmax
4 bit RO FALSE stepgen.update-freq.tmax-increased
halcmd: exitbengt@linuxcnc:~$ ^C
bengt@linuxcnc:~$ ^C
bengt@linuxcnc:~$
loadrt stepgen ctrl_type=p step_type=0
show pin
show param
exit
bengt@linuxcnc:~$ halrun
.
halcmd: loadrt stepgen ctrl_type=p step_type=0
halcmd: show pin
Component Pins:
Owner Type Dir Value Name
4 s32 OUT 0 stepgen.0.counts
4 bit OUT FALSE stepgen.0.dir
4 bit IN FALSE stepgen.0.enable
4 float IN 0 stepgen.0.position-cmd
4 float OUT 0 stepgen.0.position-fb
4 bit OUT FALSE stepgen.0.step
4 s32 OUT 0 stepgen.capture-position.time
4 s32 OUT 0 stepgen.make-pulses.time
4 s32 OUT 0 stepgen.update-freq.time
halcmd: show param
Parameters:
Owner Type Dir Value Name
4 u32 RW 0x00000001 stepgen.0.dirhold
4 u32 RW 0x00000001 stepgen.0.dirsetup
4 float RO 0 stepgen.0.frequency
4 float RW 0 stepgen.0.maxaccel
4 float RW 0 stepgen.0.maxvel
4 float RW 1 stepgen.0.position-scale
4 s32 RO 0 stepgen.0.rawcounts
4 u32 RW 0x00000001 stepgen.0.steplen
4 u32 RW 0x00000001 stepgen.0.stepspace
4 s32 RW 0 stepgen.capture-position.tmax
4 bit RO FALSE stepgen.capture-position.tmax-increased
4 s32 RW 0 stepgen.make-pulses.tmax
4 bit RO FALSE stepgen.make-pulses.tmax-increased
4 s32 RW 0 stepgen.update-freq.tmax
4 bit RO FALSE stepgen.update-freq.tmax-increased
halcmd: exit
bengt@linuxcnc:~$ ^C
bengt@linuxcnc:~$
halrun
loadrt stepgen ctrl_type=v step_type=2
show pin
show param
exit
bengt@linuxcnc:~$ halrun
.
halcmd: loadrt stepgen ctrl_type=v step_type=2
halcmd: show pin
Component Pins:
Owner Type Dir Value Name
4 s32 OUT 0 stepgen.0.counts
4 bit IN FALSE stepgen.0.enable
4 bit OUT FALSE stepgen.0.phase-A
4 bit OUT FALSE stepgen.0.phase-B
4 float OUT 0 stepgen.0.position-fb
4 float IN 0 stepgen.0.velocity-cmd
4 s32 OUT 0 stepgen.capture-position.time
4 s32 OUT 0 stepgen.make-pulses.time
4 s32 OUT 0 stepgen.update-freq.time
halcmd: show param
Parameters:
Owner Type Dir Value Name
4 u32 RW 0x00000001 stepgen.0.dirdelay
4 float RO 0 stepgen.0.frequency
4 float RW 0 stepgen.0.maxaccel
4 float RW 0 stepgen.0.maxvel
4 float RW 1 stepgen.0.position-scale
4 s32 RO 0 stepgen.0.rawcounts
4 u32 RW 0x00000001 stepgen.0.steplen
4 s32 RW 0 stepgen.capture-position.tmax
4 bit RO FALSE stepgen.capture-position.tmax-increased
4 s32 RW 0 stepgen.make-pulses.tmax
4 bit RO FALSE stepgen.make-pulses.tmax-increased
4 s32 RW 0 stepgen.update-freq.tmax
4 bit RO FALSE stepgen.update-freq.tmax-increased
halcmd: exitbengt@linuxcnc:~$ ^C
bengt@linuxcnc:~$ ^C
bengt@linuxcnc:~$
Please Log in or Create an account to join the conversation.
25 Apr 2017 13:27 #92052
by andypugh
Replied by andypugh on topic Mach3 XML and Stepconfig issues.
So, the trick is to only use the correct pis and params from those lists in the HAL file, so rather than commenting out, you might sometimes need to modify the line to use a different pin or param.
Please Log in or Create an account to join the conversation.
25 Apr 2017 13:31 #92054
by tecno
Replied by tecno on topic Mach3 XML and Stepconfig issues.
OK,
That is nothing I have any knowledge about so how can I get HAL optimized?
That is nothing I have any knowledge about so how can I get HAL optimized?
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1441
25 Apr 2017 13:57 #92059
by Todd Zuercher
Replied by Todd Zuercher on topic Mach3 XML and Stepconfig issues.
I used a copy of your hal file and modified it to run in a simulation to make the Halscope screenshot I posted of the pulse output of the encoder style Stepgen phase-A. Here is that hal file. if it helps you.
Please Log in or Create an account to join the conversation.
25 Apr 2017 14:00 #92060
by tecno
Replied by tecno on topic Mach3 XML and Stepconfig issues.
I'm a bit confused now as regards stepgen step_type=0,0,2 or 0,0,0
So what do I use from now on?
So what do I use from now on?
Please Log in or Create an account to join the conversation.
Time to create page: 0.108 seconds