Controlling a compressor with Linuxcnc.
- Creative25
- Offline
- Premium Member
Less
More
- Posts: 133
- Thank you received: 9
05 Nov 2024 06:11 #313795
by Creative25
Controlling a compressor with Linuxcnc. was created by Creative25
I have a serious problem with our power company.
The 60 amps connection to our house is not what they say. I have serious voltage drops between utilities transformer and our house and they will not fix it. Looks like common practice in our area.
I can reliably cut at 35 amps.
if I go higher depending how much power my neighbors are using The plasma cutter gets an undervoltage and cuts out.
So the table happily cuts until the compressor starts.
Then the plasma cuts out because it gets an undervoltage. Qtplasmac pauses and gives an arc lost warning.
If the torch is off during the probing and the compressor kicks in the program keeps running until the compressor cuts out because of undervoltage.
So I can not run plasma and compressor at the same time.
So I was wandering If I add a relay an electric unloaded valve and a pressure sensor to the compressor. Would it be possible to control the compressor with Linuxcnc.
I was thinking about the following. When pressure drops to a certain level. Well above what the plasma needs the program pauses. Preferably at the end of a cut.
then the compressor starts. When the tank is full the program resumes.
Is that possible?
The 60 amps connection to our house is not what they say. I have serious voltage drops between utilities transformer and our house and they will not fix it. Looks like common practice in our area.
I can reliably cut at 35 amps.
if I go higher depending how much power my neighbors are using The plasma cutter gets an undervoltage and cuts out.
So the table happily cuts until the compressor starts.
Then the plasma cuts out because it gets an undervoltage. Qtplasmac pauses and gives an arc lost warning.
If the torch is off during the probing and the compressor kicks in the program keeps running until the compressor cuts out because of undervoltage.
So I can not run plasma and compressor at the same time.
So I was wandering If I add a relay an electric unloaded valve and a pressure sensor to the compressor. Would it be possible to control the compressor with Linuxcnc.
I was thinking about the following. When pressure drops to a certain level. Well above what the plasma needs the program pauses. Preferably at the end of a cut.
then the compressor starts. When the tank is full the program resumes.
Is that possible?
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19300
- Thank you received: 6462
05 Nov 2024 12:27 #313811
by tommylight
Replied by tommylight on topic Controlling a compressor with Linuxcnc.
Probably yes, it will be a bit tricky to figure out when to stop, one option would be when motion is rapid (going from one cut to another), still, i think you would need another sensor to notify LinuxCNC it is safe to continue.
2 pressure sensors should do just fine, one for low and the other for high, or use the existing one in compressor for the high side, but this complicates wiring and logic a bit more.
2 pressure sensors should do just fine, one for low and the other for high, or use the existing one in compressor for the high side, but this complicates wiring and logic a bit more.
Please Log in or Create an account to join the conversation.
06 Nov 2024 00:31 - 13 Nov 2024 01:00 #313865
by phillc54
Replied by phillc54 on topic Controlling a compressor with Linuxcnc.
EDIT: files changed to suit a pressure sensor on a analog input.
The following should work but has only been tested in a sim. Use a pressure sensor connected to an analog input and change the postgui file hal pin to suit the analog input. Change HIGH_PRESSURE_VALUE and LOW_PRESSURE_VALUE in user_periodic.py to the values you wish to use. All three files need to be in your plasma machine config directory. Due to response times you will need to move the torch to a suitable start point using the cut recovery panel after the job has paused.
custom_postgui.hal
qtplasmac_custom.py
user_periodic.py
The following should work but has only been tested in a sim. Use a pressure sensor connected to an analog input and change the postgui file hal pin to suit the analog input. Change HIGH_PRESSURE_VALUE and LOW_PRESSURE_VALUE in user_periodic.py to the values you wish to use. All three files need to be in your plasma machine config directory. Due to response times you will need to move the torch to a suitable start point using the cut recovery panel after the job has paused.
custom_postgui.hal
Warning: Spoiler!
# Keep your post GUI customisations here to prevent them from
# being overwritten by updates or pncconf/stepconf changes.
net plasmac:pressure-sensor <analog_input_pin_detecting_pressure>
qtplasmac_custom.py
Warning: Spoiler!
''' qtplasmac_custom.py - custom python code for qtplasmac '''
self.pressurePause = False
user_periodic.py
Warning: Spoiler!
''' user_periodic.py - custom periodic code for qtplasmac '''
if self.pressurePause:
if STATUS.is_auto_paused() and hal.get_value('plasmac:pressure-sensor') > HIGH_PRESSURE_VALUE:
self.ext_resume(True)
self.pressurePause = False
elif not STATUS.is_auto_paused():
self.pressurePause = False
if hal.get_value('plasmac.state-out') in [6, 7, 8, 9, 10, 11, 12] and \
self.w.torch_enable.isChecked() and \
hal.get_value('plasmac:pressure-sensor') < LOW_PRESSURE_VALUE:
self.ext_pause_only(True)
self.pressurePause = True
Last edit: 13 Nov 2024 01:00 by phillc54. Reason: files changed to suit a pressure sensor on a analog input
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
06 Nov 2024 08:45 #313881
by meister
Replied by meister on topic Controlling a compressor with Linuxcnc.
i use this sensor to check the compressor pressure,
but you need an analog input for that:
www.amazon.de/gp/product/B07YKZ773Z
but you need an analog input for that:
www.amazon.de/gp/product/B07YKZ773Z
Please Log in or Create an account to join the conversation.
- Creative25
- Offline
- Premium Member
Less
More
- Posts: 133
- Thank you received: 9
07 Nov 2024 06:35 #313986
by Creative25
Replied by Creative25 on topic Controlling a compressor with Linuxcnc.
Thank you so much
You come faster than I could work out a concept.
I do not fully understand the code.
does it stop at the end of a cycle?
Is there any code to start the compressor?
I was thinking of a simple way to use the original pressure switch on the compressor.
I could add two Relais on the compressor.
one with a 24V coil in series with the pressure switch.
one with a 220 V coil that closes when the pressure switch wants to start the compressor.
So when the pressure drops the 220V relay is activated and sends a signal to Linuxcnc.
linuxcnc pauses the program. And turns on the second relay. To start the compressor.
Is full the The 220v relay gets turned off by the pressure switch.
linuxcnc turns off relay2 and resumes cutting.
The only question is will the Relay with the 220Volt coil turn off when the voltage drops during compressor startup?
You come faster than I could work out a concept.
I do not fully understand the code.
does it stop at the end of a cycle?
Is there any code to start the compressor?
I was thinking of a simple way to use the original pressure switch on the compressor.
I could add two Relais on the compressor.
one with a 24V coil in series with the pressure switch.
one with a 220 V coil that closes when the pressure switch wants to start the compressor.
So when the pressure drops the 220V relay is activated and sends a signal to Linuxcnc.
linuxcnc pauses the program. And turns on the second relay. To start the compressor.
Is full the The 220v relay gets turned off by the pressure switch.
linuxcnc turns off relay2 and resumes cutting.
The only question is will the Relay with the 220Volt coil turn off when the voltage drops during compressor startup?
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19300
- Thank you received: 6462
07 Nov 2024 06:49 #313987
by tommylight
Replied by tommylight on topic Controlling a compressor with Linuxcnc.
The whole battle here is to stop LinuxCNC before compressor starts, so you do need another sensor set to trigger at a bit higher than the compressor low pressure, then you can use the existing switch to trigger when compressor stops.
Please Log in or Create an account to join the conversation.
- Creative25
- Offline
- Premium Member
Less
More
- Posts: 133
- Thank you received: 9
07 Nov 2024 06:59 #313989
by Creative25
Replied by Creative25 on topic Controlling a compressor with Linuxcnc.
I just gave it a second thought.
a relay with a 220 volt coil on the compressor is a bit risky.
If your business grows and you employ people an uninformed person could connect 220 volt on the wrong wire and then probably blow the mesa board.
i think I will go with the pressure sensor.
So far all the analog inputs of the mesa board are free. Advantage I have full control of hysteresis of the compressor as well. Disadvantage I need to put an electric unloaded valve. I guess any normally open pneumatic valve will do.
a relay with a 220 volt coil on the compressor is a bit risky.
If your business grows and you employ people an uninformed person could connect 220 volt on the wrong wire and then probably blow the mesa board.
i think I will go with the pressure sensor.
So far all the analog inputs of the mesa board are free. Advantage I have full control of hysteresis of the compressor as well. Disadvantage I need to put an electric unloaded valve. I guess any normally open pneumatic valve will do.
Please Log in or Create an account to join the conversation.
07 Nov 2024 07:02 #313990
by phillc54
Replied by phillc54 on topic Controlling a compressor with Linuxcnc.
If you go with a sensor and use a analog input then we can rewrite the code to use a high and low pressure setting.
Please Log in or Create an account to join the conversation.
- Creative25
- Offline
- Premium Member
Less
More
- Posts: 133
- Thank you received: 9
07 Nov 2024 17:21 #314026
by Creative25
Replied by Creative25 on topic Controlling a compressor with Linuxcnc.
Thanks for all your efforts.
I am going to order an unloader valve and pressure sensor.
no hurry with the software side it will take time for me to get all the parts.
looks like LinuxCnc is really awesome.
I am going to order an unloader valve and pressure sensor.
no hurry with the software side it will take time for me to get all the parts.
looks like LinuxCnc is really awesome.
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19300
- Thank you received: 6462
07 Nov 2024 19:30 #314033
by tommylight
Replied by tommylight on topic Controlling a compressor with Linuxcnc.
Yes it is.
looks like LinuxCnc is really awesome.
Please Log in or Create an account to join the conversation.
Moderators: snowgoer540
Time to create page: 0.104 seconds