- Configuring LinuxCNC
- Basic Configuration
- How to connect Home switches for dual motor on 3 Axis machine [2.8 Pre Master]
How to connect Home switches for dual motor on 3 Axis machine [2.8 Pre Master]
01 Feb 2018 02:35 - 01 Feb 2018 02:35 #105262
by rodw
Replied by rodw on topic How to connect Home switches for dual motor on 3 Axis machine [2.8 Pre Master]
I've not played with spindles or BOB's. You'd just have to look at the specs of your air solenoid and see if there was enough current (and the right voltage) at your BOB output otherwise you'd need to add an intermediate relay.
square wave generator
linuxcnc.org/docs/ja/html/man/man9/siggen.9.html
See if siggen.N.clock give you a flashing light in halshow.
If it doesn't, you'll need to convert siggen.N.square to a S32 and then to a bit (as there is no float to bit converter)
I was thinking if the squarewave had a off-delay applied, you should be able to create a pulse that has different on and off times. See
linuxcnc.org/docs/html/man/man9/timedelay.9.html
square wave generator
linuxcnc.org/docs/ja/html/man/man9/siggen.9.html
See if siggen.N.clock give you a flashing light in halshow.
If it doesn't, you'll need to convert siggen.N.square to a S32 and then to a bit (as there is no float to bit converter)
I was thinking if the squarewave had a off-delay applied, you should be able to create a pulse that has different on and off times. See
linuxcnc.org/docs/html/man/man9/timedelay.9.html
Last edit: 01 Feb 2018 02:35 by rodw.
Please Log in or Create an account to join the conversation.
- Mike_Eitel
- Offline
- Platinum Member
Less
More
- Posts: 1150
- Thank you received: 184
01 Feb 2018 07:04 #105274
by Mike_Eitel
Replied by Mike_Eitel on topic How to connect Home switches for dual motor on 3 Axis machine [2.8 Pre Master]
A relay with a cycle time of 4 seconds ... I doubt it will have a long live. There are some chepo fet moduls in arduino world, probably better suited.
Mike
Mike
Please Log in or Create an account to join the conversation.
01 Feb 2018 10:45 #105277
by denhen89
Replied by denhen89 on topic How to connect Home switches for dual motor on 3 Axis machine [2.8 Pre Master]
Thanks.
Soon i will go down to my workshop and try to first get the spindle/spindle control to work properly (difficult set up the right PWM settings for the 3kw chinese spindle) and when its working theb i will think about the mist cooling.
When i was talking about pneumatic air valve relay i meant this one here: www.sorotec.de/shop/Magnetventil---Pilotventil-1-8--230V.html
230V pneumatic solenoid Valve (i think thats correct). If there is any easy way to control it and it does not get broken very quickly then it would be great if you could tell me. What i want achieve (even i think its clear) you can see on this YT video :
As i understand correctly, i would need something like an SSR relay (12V input / 230V output). The SSR relay would be controlled via the 12V relay on the BOB and gives output to the pneumatic solenoid air valve.
I have never worked with arduino, but thanks for the info. Would like to realise it as cheap and easy as possible.
Soon i will go down to my workshop and try to first get the spindle/spindle control to work properly (difficult set up the right PWM settings for the 3kw chinese spindle) and when its working theb i will think about the mist cooling.
When i was talking about pneumatic air valve relay i meant this one here: www.sorotec.de/shop/Magnetventil---Pilotventil-1-8--230V.html
230V pneumatic solenoid Valve (i think thats correct). If there is any easy way to control it and it does not get broken very quickly then it would be great if you could tell me. What i want achieve (even i think its clear) you can see on this YT video :
As i understand correctly, i would need something like an SSR relay (12V input / 230V output). The SSR relay would be controlled via the 12V relay on the BOB and gives output to the pneumatic solenoid air valve.
I have never worked with arduino, but thanks for the info. Would like to realise it as cheap and easy as possible.
Please Log in or Create an account to join the conversation.
01 Feb 2018 11:01 #105278
by rodw
Replied by rodw on topic How to connect Home switches for dual motor on 3 Axis machine [2.8 Pre Master]
SSR or a TRIAC would do the job to switch 230 V mains. Triac is probably cheaper but will need a heatsink and maybe some extra components.
I still think you can avoid Classic Ladder with some creative thinking with HAL components.
I still think you can avoid Classic Ladder with some creative thinking with HAL components.
Please Log in or Create an account to join the conversation.
- Mike_Eitel
- Offline
- Platinum Member
Less
More
- Posts: 1150
- Thank you received: 184
01 Feb 2018 16:03 #105285
by Mike_Eitel
Replied by Mike_Eitel on topic How to connect Home switches for dual motor on 3 Axis machine [2.8 Pre Master]
Why 230V. Stay industrial usual with 12 or 24V. Such valves are low power. In same shop the following is expicitely for mist application.
www.sorotec.de/shop/Magnetventil---Pilot...il-1-8--24V-DC-.html
Mike
www.sorotec.de/shop/Magnetventil---Pilot...il-1-8--24V-DC-.html
Mike
Please Log in or Create an account to join the conversation.
01 Feb 2018 16:46 - 01 Feb 2018 16:51 #105288
by denhen89
Replied by denhen89 on topic How to connect Home switches for dual motor on 3 Axis machine [2.8 Pre Master]
Hi,
my current situation looks like that:
M3 command works,
S3 also, but i have problem with setting up the PWM speed control.
My spindle is an chinese 3.0kw 3000rpm - 24000rpm (50hz - 400hz). My VFD is an Huanyang.
Everything is correctly wired up and the VFD settings should also be correct. Controlling the spindle speed works, but the commands gives not the RPM i would like to get.
I managed to get 3000 rpm when using S3000 command, but when using S4000 it does not give 4000rpm. Its not linear.
Also, when using lower value than 3000 in the S-command, e.g. S1000, it gives an rpm of more than 6000.
I changed the settings at least 50 times, to come closer, but its not linear.
Could someone help me with that?
This are the settings i currently use (s3000 gives now 3200 rpm)
net spindle-cmd-rpm => pwmgen.0.value
net spindle-on <= motion.spindle-on => pwmgen.0.enable
net spindle-pwm <= pwmgen.0.pwm
setp pwmgen.0.pwm-freq 400.0
setp pwmgen.0.scale 24000.00
setp pwmgen.0.offset -0.12
setp pwmgen.0.dither-pwm true
net spindle-cmd-rpm <= motion.spindle-speed-out
net spindle-cmd-rpm-abs <= motion.spindle-speed-out-abs
net spindle-cmd-rps <= motion.spindle-speed-out-rps
net spindle-cmd-rps-abs <= motion.spindle-speed-out-rps-abs
net spindle-at-speed => motion.spindle-at-speed
About the mist coolant situation: I was stupid. I told you that the programmable relay on the polish bob gives 12v output, but thats wrong. I can connect there 250v and max. 8A, so i can use it to control the pneumatic valve.
@Mike: Actually, i ordered it and have not think even that far. I am an beginner, and just starting to learn everything...
I would like today to start to wire up the compressor and the pneumatic valve to the bob relay, and testing it, but the spindle speed thing stopping me.
EDIT: checked volt at 0-10V pins:
S3000 = about 3200rpm = 0.12V
s4000 = about 5200rpm = 0.54V
my current situation looks like that:
M3 command works,
S3 also, but i have problem with setting up the PWM speed control.
My spindle is an chinese 3.0kw 3000rpm - 24000rpm (50hz - 400hz). My VFD is an Huanyang.
Everything is correctly wired up and the VFD settings should also be correct. Controlling the spindle speed works, but the commands gives not the RPM i would like to get.
I managed to get 3000 rpm when using S3000 command, but when using S4000 it does not give 4000rpm. Its not linear.
Also, when using lower value than 3000 in the S-command, e.g. S1000, it gives an rpm of more than 6000.
I changed the settings at least 50 times, to come closer, but its not linear.
Could someone help me with that?
This are the settings i currently use (s3000 gives now 3200 rpm)
net spindle-cmd-rpm => pwmgen.0.value
net spindle-on <= motion.spindle-on => pwmgen.0.enable
net spindle-pwm <= pwmgen.0.pwm
setp pwmgen.0.pwm-freq 400.0
setp pwmgen.0.scale 24000.00
setp pwmgen.0.offset -0.12
setp pwmgen.0.dither-pwm true
net spindle-cmd-rpm <= motion.spindle-speed-out
net spindle-cmd-rpm-abs <= motion.spindle-speed-out-abs
net spindle-cmd-rps <= motion.spindle-speed-out-rps
net spindle-cmd-rps-abs <= motion.spindle-speed-out-rps-abs
net spindle-at-speed => motion.spindle-at-speed
About the mist coolant situation: I was stupid. I told you that the programmable relay on the polish bob gives 12v output, but thats wrong. I can connect there 250v and max. 8A, so i can use it to control the pneumatic valve.
@Mike: Actually, i ordered it and have not think even that far. I am an beginner, and just starting to learn everything...
I would like today to start to wire up the compressor and the pneumatic valve to the bob relay, and testing it, but the spindle speed thing stopping me.
EDIT: checked volt at 0-10V pins:
S3000 = about 3200rpm = 0.12V
s4000 = about 5200rpm = 0.54V
Last edit: 01 Feb 2018 16:51 by denhen89.
Please Log in or Create an account to join the conversation.
- Mike_Eitel
- Offline
- Platinum Member
Less
More
- Posts: 1150
- Thank you received: 184
01 Feb 2018 18:40 #105292
by Mike_Eitel
Replied by Mike_Eitel on topic How to connect Home switches for dual motor on 3 Axis machine [2.8 Pre Master]
Also a small 230v valve will give sparks. And you can not use diodes.
A damping bootstrap circuit made by resistor and capacitor is not so easy to design.
I expect your relais contacts being burned quite fast.
Mike
A damping bootstrap circuit made by resistor and capacitor is not so easy to design.
I expect your relais contacts being burned quite fast.
Mike
Please Log in or Create an account to join the conversation.
01 Feb 2018 19:09 #105293
by denhen89
Replied by denhen89 on topic How to connect Home switches for dual motor on 3 Axis machine [2.8 Pre Master]
Thanks Mike.
Just an hour ago i tested the compressor and the Noga mister. Its seems that i will for now not need to control the valve, because the small compressor i have bought yesterday works pretty good on air flow settings. It pumps 30 seconds from 6bar to 8bar, and then it does not to pump for 1 minute until it reaches again 6bar. It seems to be fine for now.
Its an small compressor: 110l/min.
If i use an high air flow then it pump without doing a brake, so on high air flow it would be good to control the valve, but i will do tests with low air flow maby ein the next days (i hope).
Still cant get the spindle speed to work with the s commands properly. Would be perfect to write s6000 and get 6000rpm at least be close or s20000 and get 20000 rpm. Have read a lot, but it seems not doable or at least not for me.
Just an hour ago i tested the compressor and the Noga mister. Its seems that i will for now not need to control the valve, because the small compressor i have bought yesterday works pretty good on air flow settings. It pumps 30 seconds from 6bar to 8bar, and then it does not to pump for 1 minute until it reaches again 6bar. It seems to be fine for now.
Its an small compressor: 110l/min.
If i use an high air flow then it pump without doing a brake, so on high air flow it would be good to control the valve, but i will do tests with low air flow maby ein the next days (i hope).
Still cant get the spindle speed to work with the s commands properly. Would be perfect to write s6000 and get 6000rpm at least be close or s20000 and get 20000 rpm. Have read a lot, but it seems not doable or at least not for me.
Please Log in or Create an account to join the conversation.
- Mike_Eitel
- Offline
- Platinum Member
Less
More
- Posts: 1150
- Thank you received: 184
01 Feb 2018 19:43 #105294
by Mike_Eitel
Replied by Mike_Eitel on topic How to connect Home switches for dual motor on 3 Axis machine [2.8 Pre Master]
Can't help you with spindle and pwm, i go 7i76e and there is a very nice electronic poti included. Generally a good designed pwm to voltage is a very linear story. Your square must drive a constant current into a capacitor when high and reverse also unload with constant current. Resulting voltage is what I guess you need for your vfd
Mike
Mike
Please Log in or Create an account to join the conversation.
03 Feb 2018 01:59 - 03 Feb 2018 02:01 #105349
by denhen89
Replied by denhen89 on topic How to connect Home switches for dual motor on 3 Axis machine [2.8 Pre Master]
Thanks, i will just accept that it is like it is. I will somewhere write down that e.g. s50 is 3000 rpm , S3000 = 6000, and so on.
Maybe the scale command (....scale 24000) will help, but i havent tryed it yet, because i have again an another problem, and its so strange...
So, due to problem that the addon pwm card for the polish BOB does not work, i decided to use an chinese 5 axis board which has the 0-10V analog output integrated, as an second BOB just for controling SPINDLE ON and SPINDLE PWM. I bought an very cheap LPT PCIe card (SUNIX PAR5408AXX200 with SUN1989 chip), and thats only because an friend told me that its 100% working under linux, an actually it is. I tested it while waiting for the LPT cable i ordered, and it worked plug and play, so i thought when i get the LPT cable, i will just add the parallel port in the .HAL file like described, and everything will work, but unfortunately the problems wont stop.
About the Hardware situation:
The polish "main" BOB, where are the stepper motors, homing and estop connected is connected to an PCI LPT card (NETMOS - works plug & play)
The chinese BOB for the SPINDLE ON and SPINDLE PWM is connected to the SUNIX PCIe card)
The chinese BOB and the Polish BOB are both connected to the same 12V/3A power Supply. The chinese BOB needs the 12V for the relay and and through an USB it gets 5V.(the wire is not connected to my PC, but the an smartphone charger plug)
What is going on:
Today i picked up the LPT cable, connected everything and did the .HAL file changes, like described. Please see the .HAL file in attachment).
I turned on Linuxcnc and before i even homed the machine, the X-axis started to move in one direction, but very strange, it wasnt fluent, more like some signal problems.
I started to check the X-axis stepper motor wires, but everything was okay. I checked and tryed many things which i dont even remember anymore and maybe its not even important to list it here.
I then took off the LPT cable from the Chinese BOB. Problem was still there.
I am not anymore sure when it became better, but after some time the motor did not anymore move that much, it was more like short steps from time to time.
I then also took off the LPT cable from the Chinese BOB, but this time on the SUNIX LPT card side, so the wire was nowhere connected, and the problem dissapeared!
When i then connected the cable only on the LPT card side again, then the Problem was again there.
I then switched the LPT card to an different PCIe slot. Problem still there.
Then i switched the Cables. So i now used the new LPT cable for the main BOB and the older one for the Chinese BOB.
Problem dissappeared !
I then launched LINUXCNC and started the Machine. WORKED
Then i did Home the machine. WORKED
But then again something very strange happend:
The machine was homed, so the last thing which had to work was to get the Spindle on and spindle speed control with the M3 S50 command.
The Spindle went on 3000 rpm, but in same time the X-axis motor moved again (not fluent).
I dont know what is going on, but isnt it strange? I think the .HAL configuration is correct.
I googled, but could not find anything similar to my problem.
Again, sorry guys, but my problems dont want to stop.
Hope someone can help me to solve that problem.
Thanks in advance.
Maybe the scale command (....scale 24000) will help, but i havent tryed it yet, because i have again an another problem, and its so strange...
So, due to problem that the addon pwm card for the polish BOB does not work, i decided to use an chinese 5 axis board which has the 0-10V analog output integrated, as an second BOB just for controling SPINDLE ON and SPINDLE PWM. I bought an very cheap LPT PCIe card (SUNIX PAR5408AXX200 with SUN1989 chip), and thats only because an friend told me that its 100% working under linux, an actually it is. I tested it while waiting for the LPT cable i ordered, and it worked plug and play, so i thought when i get the LPT cable, i will just add the parallel port in the .HAL file like described, and everything will work, but unfortunately the problems wont stop.
About the Hardware situation:
The polish "main" BOB, where are the stepper motors, homing and estop connected is connected to an PCI LPT card (NETMOS - works plug & play)
The chinese BOB for the SPINDLE ON and SPINDLE PWM is connected to the SUNIX PCIe card)
The chinese BOB and the Polish BOB are both connected to the same 12V/3A power Supply. The chinese BOB needs the 12V for the relay and and through an USB it gets 5V.(the wire is not connected to my PC, but the an smartphone charger plug)
What is going on:
Today i picked up the LPT cable, connected everything and did the .HAL file changes, like described. Please see the .HAL file in attachment).
I turned on Linuxcnc and before i even homed the machine, the X-axis started to move in one direction, but very strange, it wasnt fluent, more like some signal problems.
I started to check the X-axis stepper motor wires, but everything was okay. I checked and tryed many things which i dont even remember anymore and maybe its not even important to list it here.
I then took off the LPT cable from the Chinese BOB. Problem was still there.
I am not anymore sure when it became better, but after some time the motor did not anymore move that much, it was more like short steps from time to time.
I then also took off the LPT cable from the Chinese BOB, but this time on the SUNIX LPT card side, so the wire was nowhere connected, and the problem dissapeared!
When i then connected the cable only on the LPT card side again, then the Problem was again there.
I then switched the LPT card to an different PCIe slot. Problem still there.
Then i switched the Cables. So i now used the new LPT cable for the main BOB and the older one for the Chinese BOB.
Problem dissappeared !
I then launched LINUXCNC and started the Machine. WORKED
Then i did Home the machine. WORKED
But then again something very strange happend:
The machine was homed, so the last thing which had to work was to get the Spindle on and spindle speed control with the M3 S50 command.
The Spindle went on 3000 rpm, but in same time the X-axis motor moved again (not fluent).
I dont know what is going on, but isnt it strange? I think the .HAL configuration is correct.
I googled, but could not find anything similar to my problem.
Again, sorry guys, but my problems dont want to stop.
Hope someone can help me to solve that problem.
Thanks in advance.
Last edit: 03 Feb 2018 02:01 by denhen89.
Please Log in or Create an account to join the conversation.
- Configuring LinuxCNC
- Basic Configuration
- How to connect Home switches for dual motor on 3 Axis machine [2.8 Pre Master]
Time to create page: 0.115 seconds