Again 0-10V Problem on MESA 7i97
- nighteagle
- Offline
- Senior Member
Less
More
- Posts: 72
- Thank you received: 6
19 Oct 2023 14:18 #283299
by nighteagle
Again 0-10V Problem on MESA 7i97 was created by nighteagle
Hello,
i want only the simple thing to have 0-10V instead of 0 to +- 10V to drive VFD. For reverse i have to close a contact on the VFD so i use here the output OUT1 of the MESA 7i97.
So i have read here:
linuxcnc.org/docs/2.4/html/man/man9/pwmgen.9.html
And then i wonder why it is false now - because pwmgen output_type have no value "0" now.
If i use type "1" then the behaviour by using M3 positive values and by M4 negative values.
So where is the setting to prevent +-10V and have these 0-10V always positive values?
Is there something a info about this or a wiki?
My config is now:
i want only the simple thing to have 0-10V instead of 0 to +- 10V to drive VFD. For reverse i have to close a contact on the VFD so i use here the output OUT1 of the MESA 7i97.
So i have read here:
linuxcnc.org/docs/2.4/html/man/man9/pwmgen.9.html
And then i wonder why it is false now - because pwmgen output_type have no value "0" now.
If i use type "1" then the behaviour by using M3 positive values and by M4 negative values.
So where is the setting to prevent +-10V and have these 0-10V always positive values?
Is there something a info about this or a wiki?
My config is now:
#*******************
# SPINDLE
#*******************
setp pid.s.Pgain [SPINDLE_0]P
setp pid.s.Igain [SPINDLE_0]I
setp pid.s.Dgain [SPINDLE_0]D
setp pid.s.bias [SPINDLE_0]BIAS
setp pid.s.FF0 [SPINDLE_0]FF0
setp pid.s.FF1 [SPINDLE_0]FF1
setp pid.s.FF2 [SPINDLE_0]FF2
setp pid.s.deadband [SPINDLE_0]DEADBAND
setp pid.s.maxoutput [SPINDLE_0]MAX_OUTPUT
setp pid.s.error-previous-target true
net spindle-index-enable <=> pid.s.index-enable
net spindle-enable => pid.s.enable
net spindle-vel-cmd-rpm => pid.s.command
net spindle-vel-fb-rpm => pid.s.feedback
net spindle-output <= pid.s.output
# ---PWM Generator signals/setup---
setp [HMOT](CARD0).pwmgen.05.output-type 1 #PWM pin5
setp [HMOT](CARD0).pwmgen.05.offset-mode 1 # offset mode so 50% = 0
setp [HMOT](CARD0).pwmgen.05.scale [SPINDLE_0]OUTPUT_SCALE
net spindle-output => [HMOT](CARD0).pwmgen.05.value
net spindle-enable => [HMOT](CARD0).pwmgen.05.enable
# ---Encoder feedback signals/setup---
setp [HMOT](CARD0).encoder.05.counter-mode 0
setp [HMOT](CARD0).encoder.05.filter 1
setp [HMOT](CARD0).encoder.05.index-invert 0
setp [HMOT](CARD0).encoder.05.index-mask 0
setp [HMOT](CARD0).encoder.05.index-mask-invert 0
setp [HMOT](CARD0).encoder.05.scale [SPINDLE_0]ENCODER_SCALE
net spindle-revs <= [HMOT](CARD0).encoder.05.position
net spindle-vel-fb-rps <= [HMOT](CARD0).encoder.05.velocity
net spindle-vel-fb-rpm <= [HMOT](CARD0).encoder.05.velocity-rpm
net spindle-index-enable <=> [HMOT](CARD0).encoder.05.index-enable
# ---setup spindle control signals---
#Spindle Reverse set Output OUT1 to give Signal 1 to VFD and forward 0
#net spindle-cw spindle.0.forward => [HMOT](CARD0).ssr.00.out-01
net spindle-ccw spindle.0.reverse => [HMOT](CARD0).ssr.00.out-01
net spindle-vel-cmd-rps <= spindle.0.speed-out-rps
net spindle-vel-cmd-rps-abs <= spindle.0.speed-out-rps-abs
net spindle-vel-cmd-rpm <= spindle.0.speed-out
net spindle-vel-cmd-rpm-abs <= spindle.0.speed-out-abs
net spindle-enable <= spindle.0.on
net spindle-cw <= spindle.0.forward
#net spindle-ccw <= spindle.0.reverse
net spindle-brake <= spindle.0.brake
net spindle-revs => spindle.0.revs
net spindle-at-speed => spindle.0.at-speed
net spindle-vel-fb-rps => spindle.0.speed-in
net spindle-index-enable <=> spindle.0.index-enable
# ---Setup spindle at speed signals---
sets spindle-at-speed true
[SPINDLE_0]
P = 0
I = 0
D = 0
FF0 = 1
FF1 = 0
FF2 = 0
BIAS = 0
DEADBAND = 0
MAX_OUTPUT = 40000
OUTPUT_SCALE = -40000
OUTPUT_MAX_LIMIT = 40000
OUTPUT_MIN_LIMIT = 0
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17940
- Thank you received: 4811
19 Oct 2023 14:28 #283300
by PCW
Replied by PCW on topic Again 0-10V Problem on MESA 7i97
To get 0 to 10V you would not change any PWM settings
but rather change:
net spindle-vel-cmd-rpm => pid.s.command
to
net spindle-vel-cmd-rpm-abs => pid.s.command
but rather change:
net spindle-vel-cmd-rpm => pid.s.command
to
net spindle-vel-cmd-rpm-abs => pid.s.command
Please Log in or Create an account to join the conversation.
- nighteagle
- Offline
- Senior Member
Less
More
- Posts: 72
- Thank you received: 6
19 Oct 2023 16:57 #283306
by nighteagle
Replied by nighteagle on topic Again 0-10V Problem on MESA 7i97
Hello,
@PCW - it works! So i don't have found this simple solution.... how can somebody find something like this?
And another questions - the pwmgen type is 1 - and it means value and direction - so can i use this dir signal to enable my reverse on the VFD?
I use now this solution and i think is not the best idea:
Better is to use the implemented DIR-PIN and link it to the output?
@PCW - it works! So i don't have found this simple solution.... how can somebody find something like this?
And another questions - the pwmgen type is 1 - and it means value and direction - so can i use this dir signal to enable my reverse on the VFD?
I use now this solution and i think is not the best idea:
#Spindle Reverse -> set Output OUT1 to "1" to VFD (forward set OUT1 to "0")
#net spindle-cw spindle.0.forward => [HMOT](CARD0).ssr.00.out-01
net spindle-ccw spindle.0.reverse => [HMOT](CARD0).ssr.00.out-01
Better is to use the implemented DIR-PIN and link it to the output?
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17940
- Thank you received: 4811
19 Oct 2023 18:08 - 19 Oct 2023 18:09 #283310
by PCW
Replied by PCW on topic Again 0-10V Problem on MESA 7i97
I think using the spindle.0 pin is fine
( The PWM DIR output is not present and even if it was, it would
never change as the PWM value is always positive )
( The PWM DIR output is not present and even if it was, it would
never change as the PWM value is always positive )
Last edit: 19 Oct 2023 18:09 by PCW.
Please Log in or Create an account to join the conversation.
- nighteagle
- Offline
- Senior Member
Less
More
- Posts: 72
- Thank you received: 6
20 Oct 2023 08:31 #283342
by nighteagle
Replied by nighteagle on topic Again 0-10V Problem on MESA 7i97
@PCM
okay - understand now...
so my solution is not safe at all?
The default state of the Pin is false or "0" - if i linked the pin-name to the signal:
net spindle-ccw spindle.0.reverse => [HMOT](CARD0).ssr.00.out-01
the signal will set the pin on active or "1" but how do i set the opposite?
I look for something like this:
net spindle-cw spindle.0.forward => [HMOT](CARD0).ssr.00.out-01 false
net spindle-ccw spindle.0.reverse => [HMOT](CARD0).ssr.00.out-01 true
Is there some parameter/argument to give the true or false to the pin?
I will prevent the pin is in a undefined condition. So each signal set in every case the reverse pin of my VFD correct.
If only the reverse signal set the pin - it looks not safe for me!?
okay - understand now...
so my solution is not safe at all?
The default state of the Pin is false or "0" - if i linked the pin-name to the signal:
net spindle-ccw spindle.0.reverse => [HMOT](CARD0).ssr.00.out-01
the signal will set the pin on active or "1" but how do i set the opposite?
I look for something like this:
net spindle-cw spindle.0.forward => [HMOT](CARD0).ssr.00.out-01 false
net spindle-ccw spindle.0.reverse => [HMOT](CARD0).ssr.00.out-01 true
Is there some parameter/argument to give the true or false to the pin?
I will prevent the pin is in a undefined condition. So each signal set in every case the reverse pin of my VFD correct.
If only the reverse signal set the pin - it looks not safe for me!?
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17940
- Thank you received: 4811
20 Oct 2023 13:35 - 20 Oct 2023 13:43 #283355
by PCW
Replied by PCW on topic Again 0-10V Problem on MESA 7i97
It depends on the function of the FWD/REV pins on your VFD.
If they are standard FWD/REV pins, (if you assert FWD, it runs forward,
if you assert REV, it runs in reverse) you need two outputs, one
for FWD and one for REV.
If you just have a direction pin, you need an additional pin (normally
called enable)
If they are standard FWD/REV pins, (if you assert FWD, it runs forward,
if you assert REV, it runs in reverse) you need two outputs, one
for FWD and one for REV.
If you just have a direction pin, you need an additional pin (normally
called enable)
Last edit: 20 Oct 2023 13:43 by PCW.
Please Log in or Create an account to join the conversation.
- nighteagle
- Offline
- Senior Member
Less
More
- Posts: 72
- Thank you received: 6
20 Oct 2023 18:44 #283376
by nighteagle
Replied by nighteagle on topic Again 0-10V Problem on MESA 7i97
Okay - misunderstanding.
My VFD have an input and i drive it with an relay with the ouptut of the mesa-card.
If i test it with:
setp [HMOT](CARD0).ssr.00.out-01 true
Activate the relay and the contact close on the VFD and it means reverse.
setp [HMOT](CARD0).ssr.00.out-01 false
Deactivate the relay and the contact opens and VFD is on forward.
So the signal is linked on to the pin-name in my config:
net spindle-cw spindle.0.forward => [HMOT](CARD0).ssr.00.out-01
How i know the output go to true? And if i will have inverse logic and want to have a false on the output?
net spindle-cw spindle.0.forward => [HMOT](CARD0).ssr.00.out-01 false
is not working!?
My VFD have an input and i drive it with an relay with the ouptut of the mesa-card.
If i test it with:
setp [HMOT](CARD0).ssr.00.out-01 true
Activate the relay and the contact close on the VFD and it means reverse.
setp [HMOT](CARD0).ssr.00.out-01 false
Deactivate the relay and the contact opens and VFD is on forward.
So the signal is linked on to the pin-name in my config:
net spindle-cw spindle.0.forward => [HMOT](CARD0).ssr.00.out-01
How i know the output go to true? And if i will have inverse logic and want to have a false on the output?
net spindle-cw spindle.0.forward => [HMOT](CARD0).ssr.00.out-01 false
is not working!?
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17940
- Thank you received: 4811
22 Oct 2023 22:00 #283538
by PCW
Replied by PCW on topic Again 0-10V Problem on MESA 7i97
I would not expect that to work as all VFD interfaces I know use two control pins,
Ether FWD/REV or DIR/ENA
Ether FWD/REV or DIR/ENA
Please Log in or Create an account to join the conversation.
- nighteagle
- Offline
- Senior Member
Less
More
- Posts: 72
- Thank you received: 6
23 Oct 2023 10:04 - 23 Oct 2023 10:11 #283588
by nighteagle
Replied by nighteagle on topic Again 0-10V Problem on MESA 7i97
My VFD (Acomel for 40.000 RPM IBAG Spindles) have one enable input and one 0-10V input and one Reverse input.
If the reverse input is closed to gnd of VFD the spindle is in reverse condition - and if the spindle was in forward then it goes down then it brakes and start again in reverse. All works fine - no Hardware problems no Hardware questions...
But this is not important to my question - i mean only the logic for the linking:
If i linked signal to pin name - what i linked here? A pin-name can not make anything it is only a name.
How can the signal set my pin-name to true and not to false?
I missing here something or misunderstanding something?
If the reverse input is closed to gnd of VFD the spindle is in reverse condition - and if the spindle was in forward then it goes down then it brakes and start again in reverse. All works fine - no Hardware problems no Hardware questions...
But this is not important to my question - i mean only the logic for the linking:
If i linked signal to pin name - what i linked here? A pin-name can not make anything it is only a name.
How can the signal set my pin-name to true and not to false?
I missing here something or misunderstanding something?
Last edit: 23 Oct 2023 10:11 by nighteagle.
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17940
- Thank you received: 4811
23 Oct 2023 14:04 #283601
by PCW
Replied by PCW on topic Again 0-10V Problem on MESA 7i97
I would think you would want
net spindle-ccw spindle.0.reverse => [HMOT](CARD0).ssr.00.out-01
(if SSR 1 on means reverse)
And better still add:
net spindle-on spindle.0.on => [HMOT](CARD0).ssr.00.out-00
net spindle-ccw spindle.0.reverse => [HMOT](CARD0).ssr.00.out-01
(if SSR 1 on means reverse)
And better still add:
net spindle-on spindle.0.on => [HMOT](CARD0).ssr.00.out-00
Please Log in or Create an account to join the conversation.
Time to create page: 0.087 seconds