Integrating a BCL-AMP capacitive sensor to LinuxCNC

More
2 years 6 months ago #297604 by PCW
Do you need direction on the PWMgens?
 

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

More
2 years 6 months ago #297607 by Uthayne

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

More
2 years 6 months ago #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:
Code:
# 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
The following user(s) said Thank You: Uthayne

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

More
2 years 6 months ago #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:
Code:
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
2 years 6 months ago - 2 years 6 months ago #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:176.97 KB

 
Last edit: 2 years 6 months ago by PCW.
The following user(s) said Thank You: Uthayne

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

More
2 years 6 months ago #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:
Code:
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.

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