Mesa 5i25 7i77 0-10v spindle output Dual spindles
26 Aug 2014 22:34 - 14 Sep 2014 19:44 #50322
by jeeybee
Mesa 5i25 7i77 0-10v spindle output Dual spindles was created by jeeybee
Now its me again
I´m trying to get an analog output of the 7i77 to work as a 0-10v spindle output and I have been trying the last four hours to get it working, searching the internet and reading previous posts but I get stuck right in the begining.
From this thread linuxcnc.org/lucid/emc2/index.php/italia...-5i20-a-7i48-emc2-25 i get that this should be a good start:
setp hm2_5i25.0.pwmgen.04.output-type 2
But when starting linuxcnc I get parameter or pin hm2_5i25.0.pwmgen.04.output-type not found
What am I missing?
I´m trying to get an analog output of the 7i77 to work as a 0-10v spindle output and I have been trying the last four hours to get it working, searching the internet and reading previous posts but I get stuck right in the begining.
From this thread linuxcnc.org/lucid/emc2/index.php/italia...-5i20-a-7i48-emc2-25 i get that this should be a good start:
setp hm2_5i25.0.pwmgen.04.output-type 2
But when starting linuxcnc I get parameter or pin hm2_5i25.0.pwmgen.04.output-type not found
What am I missing?
Last edit: 14 Sep 2014 19:44 by jeeybee.
Please Log in or Create an account to join the conversation.
26 Aug 2014 23:08 - 26 Aug 2014 23:09 #50324
by PCW
Replied by PCW on topic Mesa 5i25 7i77 0-10v spindle output
First, if you have a 7I77, analog channel 5 is designed for spindle use,
no other channel is suitable since only analog channel 5 can be enabled/disabled
independently.
If you have a question about pin names, its always good to see what actual pins
you have available.
If you have linuxcnc running, you can type:
and get text files of all available pins and parameters
if linuxcnc is not running you can type the following in a terminal:
and in another terminal run the previous commands:
These text files can be used as "donor" files for copy/pasting pin and parameter names.
no other channel is suitable since only analog channel 5 can be enabled/disabled
independently.
If you have a question about pin names, its always good to see what actual pins
you have available.
If you have linuxcnc running, you can type:
halcmd show pin >allpins.txt
halcmd show param >allparams.txt
if linuxcnc is not running you can type the following in a terminal:
halrun
halcmd:loadrt hostmot2
halcmd:loadrt hm2_pci
and in another terminal run the previous commands:
halcmd show pin >allpins.txt
halcmd show param >allparams.txt
These text files can be used as "donor" files for copy/pasting pin and parameter names.
Last edit: 26 Aug 2014 23:09 by PCW.
Please Log in or Create an account to join the conversation.
27 Aug 2014 00:28 #50326
by jeeybee
Replied by jeeybee on topic Mesa 5i25 7i77 0-10v spindle output
Ok...
So I dont need the pwmgen function?
Thanks for the tip of the textfiles, that helps alot.
I´m sorry but I get no wiser of how to bind the spindle rpm output to the analog output, if can you give an example of the hal code needed it would be most appreciated?
So I dont need the pwmgen function?
Thanks for the tip of the textfiles, that helps alot.
I´m sorry but I get no wiser of how to bind the spindle rpm output to the analog output, if can you give an example of the hal code needed it would be most appreciated?
Please Log in or Create an account to join the conversation.
27 Aug 2014 01:18 #50327
by PCW
Replied by PCW on topic Mesa 5i25 7i77 0-10v spindle output
linuxcnc.org/docs/html/examples/spindle.html
Has some examples of spindle hal code
(with pin and parameter names changed appropriately)
Has some examples of spindle hal code
(with pin and parameter names changed appropriately)
Please Log in or Create an account to join the conversation.
28 Aug 2014 20:22 #50395
by jeeybee
Replied by jeeybee on topic Mesa 5i25 7i77 0-10v spindle output
Now it works almost as it should, only that I get -10v when a M4 is issued.
So I tried to load an absolute component to solve that but when I look at the hal-meter the signal get stuck inside the abs component,
I have the spindle speed on the abs.0.in but not on abs.0.out?
Here is the code that I got so far for the spindle speed:
loadrt abs count=1
loadrt scale count=1
addf scale.0 servo-thread
setp scale.0.gain 0.002
net spindle-speed-scale motion.spindle-speed-out => abs.0.in
net positive-only-spindle-speed-cmd abs.0.out => scale.0.in
net spindle-speed-DAC scale.0.out => hm2_[HOSTMOT2](BOARD).0.7i77.0.1.analogout4
So I tried to load an absolute component to solve that but when I look at the hal-meter the signal get stuck inside the abs component,
I have the spindle speed on the abs.0.in but not on abs.0.out?
Here is the code that I got so far for the spindle speed:
loadrt abs count=1
loadrt scale count=1
addf scale.0 servo-thread
setp scale.0.gain 0.002
net spindle-speed-scale motion.spindle-speed-out => abs.0.in
net positive-only-spindle-speed-cmd abs.0.out => scale.0.in
net spindle-speed-DAC scale.0.out => hm2_[HOSTMOT2](BOARD).0.7i77.0.1.analogout4
Please Log in or Create an account to join the conversation.
28 Aug 2014 20:28 #50396
by PCW
Replied by PCW on topic Mesa 5i25 7i77 0-10v spindle output
I think you forgot to addf the absolute function
BTW you dont really need the scale component
(the analog outputs are scalable via the scalemax parameter)
BTW you dont really need the scale component
(the analog outputs are scalable via the scalemax parameter)
Please Log in or Create an account to join the conversation.
28 Aug 2014 21:04 #50400
by jeeybee
Replied by jeeybee on topic Mesa 5i25 7i77 0-10v spindle output
Thank you that did it,
So now it works but you got me curious about the scalemax command and I have been playing around with it but get the error message that the pin hm2_[HOSTMOT2](BOARD).0.7i77.0.1.analogout4-scalemax does not exist.
Do I have to load it somehow?
So now it works but you got me curious about the scalemax command and I have been playing around with it but get the error message that the pin hm2_[HOSTMOT2](BOARD).0.7i77.0.1.analogout4-scalemax does not exist.
Do I have to load it somehow?
Please Log in or Create an account to join the conversation.
28 Aug 2014 21:15 #50401
by PCW
Replied by PCW on topic Mesa 5i25 7i77 0-10v spindle output
hm2_5i25.0.7i77.0.1.analogout4-scalemax is a parameter, not a pin
so you can setp it, but not link it to a signal with net
so you can setp it, but not link it to a signal with net
Please Log in or Create an account to join the conversation.
28 Aug 2014 21:39 #50405
by jeeybee
Replied by jeeybee on topic Mesa 5i25 7i77 0-10v spindle output
With
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
It works like s0-10 = 0-10v but if I add:
setp hm2_[HOSTMOT2](BOARD).0.7i77.0.1.analogout4-scalemax 3000
It does not work at all?
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
It works like s0-10 = 0-10v but if I add:
setp hm2_[HOSTMOT2](BOARD).0.7i77.0.1.analogout4-scalemax 3000
It does not work at all?
Please Log in or Create an account to join the conversation.
28 Aug 2014 21:51 #50407
by PCW
Replied by PCW on topic Mesa 5i25 7i77 0-10v spindle output
You have to set the limits also (minlim and maxlim)
(or you maximum output will be 10/3000 V)
(or you maximum output will be 10/3000 V)
Please Log in or Create an account to join the conversation.
Time to create page: 0.141 seconds