Integrating a BCL-AMP capacitive sensor to LinuxCNC

More
04 Apr 2024 22:04 #297599 by PCW
Its in the hostmot2 manual page (though you need LinuxCNC 2.10
to have the periodm module in the manual)

I can make firmware for the 7I76E with a periodm. Do you want it to use
a pin on the 7I76e encoder input? (I think the 7I96S version replaces the
7I76E encoder index with the periodm input)
The following user(s) said Thank You: Masi

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

More
04 Apr 2024 22:18 #297600 by Uthayne
That firmware would be great.

While you're at it, can I get a firmware that uses 7i76e and 7i85s x1 on P1 please? Or perhaps duplicate for 7i85s on both P1 and P2 for future proofing.

The periodm pin can be on 7i76e encoder index is fine. 7i85s needs at least 2 encoder A inputs, and convert two of the stepgens to pwmgens so it will have 2 stepgens and 2 pwmgens.

Thanks!

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

More
04 Apr 2024 22:37 #297604 by PCW
Do you need direction on the PWMgens?
 

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

More
04 Apr 2024 23:03 #297607 by Uthayne

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

More
04 Apr 2024 23:21 #297609 by shasse
Uthayne-

I've attached a zip file with the relevant config files. I'm using QtPlasmaC so the .prefs file is important as well. Since QtPlasmaC puts some limits on what are acceptable for the Arc Voltage Offset and the Arc Voltage Scale (it basically expects a MESA THCAD of some sort), for scaling I used a combo of encoder scaling in custom.hal:

# The QtPlasmaC GUI does not allow voltage offsets higher than 5 digits, so scale this down here
setp    hm2_7i92.0.encoder.00.scale 100

and the offset and scale in the laser_cutter.prefs file:

[PLASMA_PARAMETERS]
Arc Voltage Offset = 22900
Arc Voltage Scale = 0.10

This leaves me with a ~50-100 range for "arc voltage" in the QtPlasmaC GUI and is sensitive enough to hold height well, at least for the values in the table that Taloot published a while back (0.5-1.5mm). 

You might also be interested in the fake "ohmic" probing and fake "arc OK" signals I implemented in the custom.hal file:
# Make a fake Ohmic probe based on the capacitive sensor
# Use the .velocity-rpm so the .velocity can be left unused for arc_ok
loadrt comp count=1
addf comp.0 servo-thread
net fake-ohmic-probe-in hm2_7i92.0.encoder.00.velocity-rpm comp.0.in0
setp comp.0.in1 930000.0
net plasmac:ohmic-probe comp.0.out
# ohmic output is comp.0.out

# Fake "Arc OK" signal that is always true
loadrt not count=1
addf not.0 servo-thread
setp not.0.in FALSE
net plasmac:arc-ok-in not.0.out

# ---OHMIC SENSE CONTACT DEBOUNCE---
setp plasmac.ohmic-sense-off-delay  3
setp plasmac.ohmic-sense-on-delay   3
Attachments:
The following user(s) said Thank You: Uthayne

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

More
04 Apr 2024 23:29 #297610 by shasse
and since I like to be able to re-gen the config from pncconf, I made a python script to set the relevant values in the prefs file:
from qtvcp.lib.preferences import Access
import os

machineName = 'laser_cutter'
configPath = '/home/sector67/linuxcnc/configs/laser_cutter'
prefsFile = os.path.join(configPath, machineName + '.prefs')
prefs = Access(prefsFile)

prefs.putpref('Arc Voltage Offset', 22900, float, 'PLASMA_PARAMETERS')
prefs.putpref('Arc Voltage Scale', 0.10, float , 'PLASMA_PARAMETERS')
prefs.putpref('Float Switch Travel', 0.290, float , 'PLASMA_PARAMETERS')
prefs.putpref('Height Per Volt', 0.002, float , 'PLASMA_PARAMETERS')

prefs.putpref('Use keyboard shortcuts', True, bool, 'GUI_OPTIONS')
prefs.putpref('Ohmic probe enable', True, bool, 'ENABLE_OPTIONS')
prefs.putpref('THC enable', True, bool, 'ENABLE_OPTIONS')

Scott
The following user(s) said Thank You: Uthayne

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

More
04 Apr 2024 23:51 - 04 Apr 2024 23:53 #297612 by PCW
7I76E config with PeriodM on 7I76E encoder index and 2X 7I85S
each with 3 step/dir plus last stepgen channel replaced with
2X PWMgens. So 11 stepgens, 4 PWMgens and 9 encoders total.

 

File Attachment:

File Name: 7i76e_7i76...x2du.zip
File Size:177 KB

 
Attachments:
Last edit: 04 Apr 2024 23:53 by PCW.
The following user(s) said Thank You: Uthayne

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

More
05 Apr 2024 01:48 #297618 by phillc54
Most of QtPlasmaC is able to be customised.
You can change the range and the step rate of the spinboxes by having the following in a file named qtplasmac_custom.py in the config directory:
self.w.arc_voltage_offset.setRange(-9, 9)
self.w.arc_voltage_offset.setSingleStep(1)
self.w.arc_voltage_scale.setRange(-9, 9)
self.w.arc_voltage_scale.setSingleStep(1)
 
It would be nice to put together a custom file for use with fibre laser.
 
The following user(s) said Thank You: shasse

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

More
05 Apr 2024 02:22 #297619 by shasse
Ah, that's very interesting! I'll try to keep track of customizations that would make sense as we continue to integrate our machine. I've been pretty pleased at how workable QtPlasmaC is "out of the box" for our simple fiber laser with very little additional customization.

On thing I've wondered is if there an existing thread or any discussion/thoughts on the possibility of adding additional properties to a material (e.g. laser focus height)? If not I'll start a separate thread. I expect that would take some doing.

Thanks!

Scott

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

More
05 Apr 2024 02:30 #297620 by phillc54

Ah, that's very interesting! I'll try to keep track of customizations that would make sense as we continue to integrate our machine.

We could possibly add a fibre laser mode into QtPlasmaC and integrate any required changes into the base code.

One thing I've wondered is if there an existing thread or any discussion/thoughts on the possibility of adding additional properties to a material (e.g. laser focus height)?

Not that I am aware of.

I expect that would take some doing.

Yes, it probably would. I will look into it.
If we did have a fibre laser mode we could do it there.

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

Moderators: snowgoer540
Time to create page: 0.091 seconds
Powered by Kunena Forum