Mesa 5i25 7i77 0-10v spindle output Dual spindles

More
28 Aug 2014 22:37 #50412 by jeeybee
Ok now it work like it should and here is the code:

setp hm2_[HOSTMOT2](BOARD).0.7i77.0.1.analogout4-scalemax 3000
setp hm2_[HOSTMOT2](BOARD).0.7i77.0.1.analogout4-minlim 0
setp hm2_[HOSTMOT2](BOARD).0.7i77.0.1.analogout4-maxlim 3000
loadrt abs count=1
addf abs.0 servo-thread
net spindle-speed-scale motion.spindle-speed-out => abs.0.in
net positive-only-spindle-speed-cmd abs.0.out => hm2_[HOSTMOT2](BOARD).0.7i77.0.1.analogout4

Moving on to add the settings to the INI file.

Please Log in or Create an account to join the conversation.

More
28 Aug 2014 22:42 #50414 by jeeybee
Here are the version with INI settings:

HAL:

setp hm2_[HOSTMOT2](BOARD).0.7i77.0.1.analogout4-scalemax [SPINDLE]SCALE_MAX
setp hm2_[HOSTMOT2](BOARD).0.7i77.0.1.analogout4-minlim [SPINDLE]MIN_LIMIT
setp hm2_[HOSTMOT2](BOARD).0.7i77.0.1.analogout4-maxlim [SPINDLE]MAX_LIMIT
loadrt abs count=1
addf abs.0 servo-thread
net spindle-speed-scale motion.spindle-speed-out => abs.0.in
net positive-only-spindle-speed-cmd abs.0.out => hm2_[HOSTMOT2](BOARD).0.7i77.0.1.analogout4

INI:

[SPINDLE]

MIN_LIMIT = 0.0
MAX_LIMIT = 3000
SCALE_MAX = 3000

Please Log in or Create an account to join the conversation.

More
28 Aug 2014 23:16 #50416 by jeeybee
Stuck again :dry:

Iḿ trying to add a second spindle speed with a different scale and everything seem to work until the analog output, which does not give anything out of it?

#Spindle 0-10v
setp hm2_[HOSTMOT2](BOARD).0.7i77.0.1.analogout4-scalemax [SPINDLE]SCALE_MAX
setp hm2_[HOSTMOT2](BOARD).0.7i77.0.1.analogout4-minlim [SPINDLE]MIN_LIMIT
setp hm2_[HOSTMOT2](BOARD).0.7i77.0.1.analogout4-maxlim [SPINDLE]MAX_LIMIT
setp hm2_[HOSTMOT2](BOARD).0.7i77.0.1.analogout5-scalemax [SPINDLE_2]SCALE_MAX
setp hm2_[HOSTMOT2](BOARD).0.7i77.0.1.analogout5-minlim [SPINDLE_2]MIN_LIMIT
setp hm2_[HOSTMOT2](BOARD).0.7i77.0.1.analogout5-maxlim [SPINDLE_2]MAX_LIMIT
loadrt abs count=2
addf abs.0 servo-thread
addf abs.1 servo-thread
net spindle-speed-scale motion.spindle-speed-out => abs.0.in
net positive-only-spindle-speed-cmd abs.0.out => hm2_[HOSTMOT2](BOARD).0.7i77.0.1.analogout4
net spindle-speed-scale motion.spindle-speed-out => abs.1.in
net positive-only-spindle2-speed-cmd abs.1.out => hm2_[HOSTMOT2](BOARD).0.7i77.0.1.analogout5

Please Log in or Create an account to join the conversation.

More
28 Aug 2014 23:41 #50418 by jeeybee
The halmeter actually shows that I have the S value on analogout5 but for some reason it wont give any voltage.
Is this output different from analogout4 and have to be enabled or something?

Please Log in or Create an account to join the conversation.

More
29 Aug 2014 00:17 #50421 by PCW
Yes Analog output 5 is the output intended for spindle use so has a separate enable

Please Log in or Create an account to join the conversation.

More
29 Aug 2014 01:51 #50426 by jeeybee
Ok tried this:
#Analogout5 enable
# axis enable chain
newsig emcmot.05.enable bit
sets emcmot.05.enable FALSE
net emcmot.05.enable => axis.5.amp-enable-out

Nothing happens :huh:

Please Log in or Create an account to join the conversation.

More
29 Aug 2014 02:38 #50428 by PCW
net spindle-on motion.spindle-on hm2_5i25.0.7i77.0.1.spinena

Please Log in or Create an account to join the conversation.

More
29 Aug 2014 13:58 #50442 by jeeybee
Thanks.
Is there somewhere I can read to learn this or is it checking the pins thoroghly and guessing the function?

Please Log in or Create an account to join the conversation.

More
29 Aug 2014 14:14 #50443 by cncbasher
most is all there in the docs , but things do change , i have even had the same question , so dont fret , just ask if you can't find a soloution , their are quite a few of us willing to help
it's just linuxcnc is so diverse in it's configuration , and covers every permutation .

Dave

Please Log in or Create an account to join the conversation.

More
29 Aug 2014 17:03 #50451 by jeeybee
Ok its a bit frustrating that it seem to be so hard to find the info, seem not to written for beginners at least :(

Next thing Iḿ having a problem with are M103-M105.
I have created them and put them in the NC files directory as that is the only search patch specified in the INI file.
This is the code for M103:
#!/bin/bash
#Set spindle2 cw output
halcmd setp hm2_[HOSTMOT2](BOARD).0.7i77.0.0.output-04 True
halcmd setp hm2_[HOSTMOT2](BOARD).0.7i77.0.0.output-05 False
exit 0

But nothing happens, no error message and no output?
If I write the code in terminal I get bash: syntax error near unexpected token `('
But if I just put it in my hal file like setp hm2_[HOSTMOT2](BOARD).0.7i77.0.0.output-04 True the output is set at startup so the address seem to be right.
And I have set the permissions for the files so they can be executed

Also what is the #!/bin/bash for?

Please Log in or Create an account to join the conversation.

Time to create page: 0.120 seconds
Powered by Kunena Forum