Configure PlasmaC with only one BOB

More
27 Jan 2021 10:50 #196737 by Giuseppe
Hi guys,

i build a CNC base machine with one Mach3 (5 axis) BOB (chinese one).
With this BOB i don't have much inputs pins and outputs pin.
So i have to use some pins multiple times.
I do this with the home switchs and this works fine.
Now i want to configure my plasmac and use some pins also multiple times.
But when i am starting the machine i get the error
"Pin "xxxx" was already linked to signal "xxxx"

In this case i can't share any pins? Do i need 2 bob's?

Or is there another possibility to realize this?

thanks so far,

regards

Giuseppe

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

More
27 Jan 2021 12:09 #196746 by tommylight
For Proma THC150
1 pin for float/ohmic
1 pin for arcok
2 pins for up/down
1 pin for home all.
1 out pin for torch on

For THCAD
1 pin for float/ohmic
1pin for THCAD
1 pin for arcok - can do without as PlasmaC can generate arcok from the voltage
2 or 3 pins for home/limits
1 out pin for torch on

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

More
27 Jan 2021 14:31 - 27 Jan 2021 14:32 #196766 by Giuseppe
i need 2 pins for home. because i am using autosquare.
What about ohmic enable? The manual says you need it if you use ohmic.
As i need 2 pins for home i have to use one of this pins for ohmic too.
Can i use the home pin for ohmic an home?
Last edit: 27 Jan 2021 14:32 by Giuseppe.

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

More
27 Jan 2021 16:38 #196780 by tommylight
What hardware are you using?

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

More
27 Jan 2021 23:28 #196848 by andypugh
One P-Port input pin, which becomes an output in the HAL layer, can drive several inputs in HAL.

But HAL inputs can only be driven by one output pin. Otherwise the system has no way to know which value to use.

You can work around this in HAL by using logic such as and2, or2. Ot you can compine several inputs into a single (selectable by more logic) output by using the mux components.
(for bit-type signals you have to use mux_generic )

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

More
28 Jan 2021 03:01 #196883 by rodw

One P-Port input pin, which becomes an output in the HAL layer, can drive several inputs in HAL.

But HAL inputs can only be driven by one output pin. Otherwise the system has no way to know which value to use.

You can work around this in HAL by using logic such as and2, or2. Ot you can compine several inputs into a single (selectable by more logic) output by using the mux components.
(for bit-type signals you have to use mux_generic )


Extending on this if you were to use mux-generic to repurpose pins, you could probably could use the joint.N.homed pin to deterime if say the float switch was a home switch or a float switch... wire the switches in series as NC to one input and in hal "split" the value to float switch in and home switch for joint N using mux-generic. If joint.N.homed is false, its a home switch...

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

More
28 Jan 2021 09:46 - 28 Jan 2021 09:49 #196914 by Giuseppe
I'am a little confused. I will append my hal and ini. Of the plasmamachine.
This was generated from the basemachine that works fine.
But when i start the plasma machine i get the message
"Pin parport.0.pin-11-in was already linked to signal din-00"

Maybe it is easier to buy a secound BOB?
# Generated by stepconf 1.1 at Fri Dec 25 19:31:57 2020
# If you make changes to this file, they will be
# overwritten when you run stepconf again
loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS num_spindles=[TRAJ]SPINDLES
loadrt hal_parport cfg="0 out"
setp parport.0.reset-time 5000
loadrt stepgen step_type=0,0,0,0

addf parport.0.read base-thread
addf stepgen.make-pulses base-thread
addf parport.0.write base-thread
addf parport.0.reset base-thread

addf stepgen.capture-position servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf stepgen.update-freq servo-thread
# net spindle-cmd-rpm     <= spindle.0.speed-out
# net spindle-cmd-rpm-abs <= spindle.0.speed-out-abs
# net spindle-cmd-rps     <= spindle.0.speed-out-rps
# net spindle-cmd-rps-abs <= spindle.0.speed-out-rps-abs
# net spindle-at-speed    => spindle.0.at-speed

net xstep           => parport.0.pin-02-out
setp parport.0.pin-02-out-reset 1
setp parport.0.pin-03-out-invert 1
net xdir            => parport.0.pin-03-out
net ystep           => parport.0.pin-04-out
setp parport.0.pin-04-out-reset 1
setp parport.0.pin-05-out-invert 1
net ydir            => parport.0.pin-05-out
net zstep           => parport.0.pin-06-out
setp parport.0.pin-06-out-reset 1
setp parport.0.pin-07-out-invert 1
net zdir            => parport.0.pin-07-out
net y1step          => parport.0.pin-08-out
setp parport.0.pin-08-out-reset 1
setp parport.0.pin-09-out-invert 1
net y1dir           => parport.0.pin-09-out
net xenable         => parport.0.pin-14-out
net all-home       <= parport.0.pin-11-in-not
net home-y1        <= parport.0.pin-10-in-not
net dout-001         => parport.0.pin-16-out
net dout-011         => parport.0.pin-17-out
net din-001          <= parport.0.pin-11-in
net din-011          <= parport.0.pin-12-in
net din-021          <= parport.0.pin-13-in
net din-031          <= parport.0.pin-15-in

setp stepgen.0.position-scale [JOINT_0]SCALE
setp stepgen.0.steplen 1
setp stepgen.0.stepspace 0
setp stepgen.0.dirhold 35000
setp stepgen.0.dirsetup 35000
setp stepgen.0.maxaccel [JOINT_0]STEPGEN_MAXACCEL
net xpos-cmd joint.0.motor-pos-cmd => stepgen.0.position-cmd
net xpos-fb stepgen.0.position-fb => joint.0.motor-pos-fb
net xstep <= stepgen.0.step
net xdir <= stepgen.0.dir
net xenable joint.0.amp-enable-out => stepgen.0.enable
net all-home => joint.0.home-sw-in

setp stepgen.1.position-scale [JOINT_1]SCALE
setp stepgen.1.steplen 1
setp stepgen.1.stepspace 0
setp stepgen.1.dirhold 35000
setp stepgen.1.dirsetup 35000
setp stepgen.1.maxaccel [JOINT_1]STEPGEN_MAXACCEL
net ypos-cmd joint.1.motor-pos-cmd => stepgen.1.position-cmd
net ypos-fb stepgen.1.position-fb => joint.1.motor-pos-fb
net ystep <= stepgen.1.step
net ydir <= stepgen.1.dir
net yenable joint.1.amp-enable-out => stepgen.1.enable
net home-y1 => joint.1.home-sw-in

setp stepgen.2.position-scale [JOINT_2]SCALE
setp stepgen.2.steplen 1
setp stepgen.2.stepspace 0
setp stepgen.2.dirhold 35000
setp stepgen.2.dirsetup 35000
setp stepgen.2.maxaccel [JOINT_1]STEPGEN_MAXACCEL
net y1pos-cmd joint.2.motor-pos-cmd => stepgen.2.position-cmd
net y1pos-fb stepgen.2.position-fb => joint.2.motor-pos-fb
net y1step <= stepgen.2.step
net y1dir <= stepgen.2.dir
net y1enable joint.2.amp-enable-out => stepgen.2.enable
net all-home => joint.2.home-sw-in

setp stepgen.3.position-scale [JOINT_3]SCALE
setp stepgen.3.steplen 1
setp stepgen.3.stepspace 0
setp stepgen.3.dirhold 35000
setp stepgen.3.dirsetup 35000
setp stepgen.3.maxaccel [JOINT_3]STEPGEN_MAXACCEL
net zpos-cmd joint.3.motor-pos-cmd => stepgen.3.position-cmd
net zpos-fb stepgen.3.position-fb => joint.3.motor-pos-fb
net zstep <= stepgen.3.step
net zdir <= stepgen.3.dir
net zenable joint.3.amp-enable-out => stepgen.3.enable
net all-home => joint.3.home-sw-in

net estop-out <= iocontrol.0.user-enable-out
net estop-out => iocontrol.0.emc-enable-in

# loadusr -W hal_manualtoolchange
# net tool-change iocontrol.0.tool-change => hal_manualtoolchange.change
# net tool-changed iocontrol.0.tool-changed <= hal_manualtoolchange.changed
# net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number
# net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared

# toolchange passthrough
net tool:change iocontrol.0.tool-change  => iocontrol.0.tool-changed
net tool:prep   iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
# this section only reqired if using the sim testing panel
# [APPLICATIONS]
# DELAY                   = 3
# APP                     = test/plasmac_test.py

# required
[PLASMAC]

# required for upgrades (DO NOT CHANGE)
LAST_MAJOR_UPGRADE      = 0.144

# sets the operating mode, if not specified the default is 0
# 0 = use arc-voltage-in for arcOK and THC (no need to connect arc-ok-in, move-up-in and move-down-in)
# 1 = use arc-ok-in for arcOK and arc-voltage-in for THC (no need to connect move-up-in and move-down-in)
# 2 = use arc-ok-in for arcOK and move-down-in + move-up-in for THC (no need to connect arc-voltage-in)
MODE = 2

# enable(0) or disable(1) the plasmac config page, if not specified the default is enabled
CONFIG_DISABLE          = 0

# the font for the Axis GUI, if not specified 'sans 10' will be used
# valid font sizes are from 9 to 15
FONT                    = sans 10

# the window size for the Axis GUI
# 0 = minimum size to suit font
# 1 = maximized
# width x height = custom size
WINDOW_SIZE             = 0

# the theme for the Axis GUI tabs, if not specified the system theme will be used
THEME                   = Clearlooks

# select portrait mode, if not specified the default is landscape
#AXIS_ORIENT            = portrait

# percentage of cut-feed-rate used for paused motion speed
PAUSED_MOTION_SPEED     = 50

# torch on time when manual pulse requested
TORCH_PULSE_TIME        = 1.0

# for Powermax communications
#PM_PORT                 = /dev/ttyUSB0

# for the five user buttons in the main window
BUTTON_1_NAME           = Ohmic\Test
BUTTON_1_CODE           = ohmic-test
BUTTON_2_NAME           = Probe\Test
BUTTON_2_CODE           = probe-test 30
BUTTON_3_NAME           = Change\Consumables
BUTTON_3_CODE           = change-consumables X0 Y0 F4000
BUTTON_4_NAME           = Pierce\& Cut
BUTTON_4_CODE           = cut-type
BUTTON_5_NAME           = Load\Sheet
BUTTON_5_CODE           = G53 G0 X{JOINT_0 HOME} Y1

# for the ten user buttons in the Extras panel
BUTTON_10_NAME           = 
BUTTON_10_CODE           = 
BUTTON_10_IMAGE          = 
BUTTON_11_NAME           = 
BUTTON_11_CODE           = 
BUTTON_11_IMAGE          = 
BUTTON_12_NAME           = 
BUTTON_12_CODE           = 
BUTTON_12_IMAGE          = 
BUTTON_13_NAME           = 
BUTTON_13_CODE           = 
BUTTON_13_IMAGE          = 
BUTTON_14_NAME           = PlasmaC\User Guide
BUTTON_14_CODE           = %xdg-open http://linuxcnc.org/docs/devel/html/plasma/plasmac-user-guide.html
BUTTON_14_IMAGE          = 
BUTTON_15_NAME           = 
BUTTON_15_CODE           = 
BUTTON_15_IMAGE          = 
BUTTON_16_NAME           = 
BUTTON_16_CODE           = 
BUTTON_16_IMAGE          = 
BUTTON_17_NAME           = 
BUTTON_17_CODE           = 
BUTTON_17_IMAGE          = 
BUTTON_18_NAME           = 
BUTTON_18_CODE           = 
BUTTON_18_IMAGE          = 
BUTTON_19_NAME           = LinuxCNC\Docs
BUTTON_19_CODE           = %xdg-open http://linuxcnc.org/docs/devel/html
BUTTON_19_IMAGE          = 

# this section required as is for removing z axis moves from the loaded gcode file
# this is optional and if used then plasmac_gcode.py needs to be set as executable
[FILTER]
PROGRAM_EXTENSION       = .ngc (filter gcode files)
ngc                     = ./plasmac/plasmac_gcode.py
nc                      = ./plasmac/plasmac_gcode.py
tap                     = ./plasmac/plasmac_gcode.py

[RS274NGC]
RS274NGC_STARTUP_CODE   = o<metric_startup> call
PARAMETER_FILE          = metric_parameters.txt

# required, ./ must be in this path
SUBROUTINE_PATH         = ./:./plasmac:../../nc_files/subroutines

# required for reading ini and hal variables
FEATURES                = 12

# required for our material change
USER_M_PATH             = ./:./plasmac

[HAL]
# required
TWOPASS = ON
# the base machine
HALFILE = testplasmacnc.hal
# the plasmac component connections
HALFILE = ./plasmac/plasmac.tcl
# the plasmac machine connections
HALFILE = testplasmacnc_connections.hal
# use this for customisation after GUI has loaded
POSTGUI_HALFILE = postgui.hal
# required
HALUI = halui

[DISPLAY]
DISPLAY = axis
EDITOR = gedit
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
ARCDIVISION = 64
GRIDS = 10mm 20mm 50mm 100mm 1in 2in 5in 10in
MAX_FEED_OVERRIDE = 1.2
MIN_SPINDLE_OVERRIDE = 0.5
MAX_SPINDLE_OVERRIDE = 1.2
DEFAULT_LINEAR_VELOCITY = 50.00
MIN_LINEAR_VELOCITY = 0
MAX_LINEAR_VELOCITY = 150.00
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
PROGRAM_PREFIX = /home/giuseppe/linuxcnc/nc_files
INCREMENTS = 5mm 1mm .5mm .1mm .05mm .01mm .005mm
OPEN_FILE = ""
TOOL_EDITOR = tooledit x y
CYCLE_TIME = 0.1

# required
USER_COMMAND_FILE = ./plasmac/plasmac_axis.py

# required
EMBED_TAB_NAME          = Statistics
EMBED_TAB_COMMAND       = gladevcp -c plasmac_stats -x {XID} -u ./plasmac/plasmac_stats.py -H ./plasmac/plasmac_stats.hal ./plasmac/plasmac_stats.glade

# use one of the next two
# run panel in tab behind preview
EMBED_TAB_NAME          = Run
EMBED_TAB_COMMAND       = gladevcp -c plasmac_run -x {XID} -u ./plasmac/plasmac_run.py -H ./plasmac/plasmac_run.hal ./plasmac/plasmac_run_tab.glade
# run panel in panel on right side
#GLADEVCP                = -c plasmac_run -u ./plasmac/plasmac_run.py -H ./plasmac/plasmac_run.hal ./plasmac/plasmac_run_panel.glade

EMBED_TAB_NAME          = Config
EMBED_TAB_COMMAND       = gladevcp -c plasmac_config -x {XID} -u ./plasmac/plasmac_config.py -H ./plasmac/plasmac_config.hal ./plasmac/plasmac_config.glade

EMBED_TAB_NAME          = Extras
EMBED_TAB_COMMAND       = gladevcp -c plasmac_wizards -x {XID} -u ./plasmac/plasmac_wizards.py ./plasmac/plasmac_wizards.glade

[EMC]
MACHINE = testplasmacnc
DEBUG = 0
VERSION = 1.1

[KINS]
JOINTS = 4
KINEMATICS = trivkins coordinates=XYYZ kinstype=BOTH

[TASK]
TASK = milltask
CYCLE_TIME = 0.010

[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
BASE_PERIOD = 83333
SERVO_PERIOD = 1000000

[TRAJ]
SPINDLES = 3
COORDINATES =  X Y Y Z
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 50.00
MAX_LINEAR_VELOCITY = 150.00

[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl

[AXIS_X]
# set to double the value in the corresponding joint
MAX_VELOCITY = 400.0
# set to double the value in the corresponding joint
MAX_ACCELERATION = 1800.0
# shares the above two equally between the joint and the offset
OFFSET_AV_RATIO = 0.5
MIN_LIMIT = -0.001
MAX_LIMIT = 1390.0

[JOINT_0]
TYPE = LINEAR
HOME = 0.0
MIN_LIMIT = -0.001
MAX_LIMIT = 1390.0
MAX_VELOCITY = 200.0
MAX_ACCELERATION = 900.0
STEPGEN_MAXACCEL = 1125.0
SCALE = 29.0909090909
FERROR = 1
MIN_FERROR = .25
HOME_OFFSET = -5.000000
HOME_SEARCH_VEL = -30.000000
HOME_LATCH_VEL = -5.000000
HOME_SEQUENCE = 1
HOME_FINAL_VEL = 5

[AXIS_Y]
# set to double the value in the corresponding joint
MAX_VELOCITY = 400.0
# set to double the value in the corresponding joint
MAX_ACCELERATION = 1800.0
# shares the above two equally between the joint and the offset
OFFSET_AV_RATIO = 0.5
MIN_LIMIT = -0.001
MAX_LIMIT = 1000.0

[JOINT_1]
TYPE = LINEAR
HOME = 0.0
MIN_LIMIT = -0.001
MAX_LIMIT = 1000.0
MAX_VELOCITY = 200.0
MAX_ACCELERATION = 800.0
STEPGEN_MAXACCEL = 1125.0
SCALE = 29.0909090909
FERROR = 1
MIN_FERROR = .25
HOME_OFFSET = -5.000000
HOME_SEARCH_VEL = -30.000000
HOME_LATCH_VEL = -5.000000
HOME_SEQUENCE = -2
HOME_FINAL_VEL = 5

[JOINT_2]
TYPE = LINEAR
HOME = 0.0
MIN_LIMIT = -0.001
MAX_LIMIT = 1000.0
MAX_VELOCITY = 200.0
MAX_ACCELERATION = 800.0
STEPGEN_MAXACCEL = 1125.0
SCALE = 29.0909090909
FERROR = 1
MIN_FERROR = .25
HOME_OFFSET = -5.000000
HOME_SEARCH_VEL = -30.000000
HOME_LATCH_VEL = -5.000000
HOME_SEQUENCE = -2
HOME_FINAL_VEL = 5

[AXIS_Z]
# set to double the value in the corresponding joint
MAX_VELOCITY = 57.000228001
# set to double the value in the corresponding joint
MAX_ACCELERATION = 600.0
# shares the above two equally between the joint and the offset
OFFSET_AV_RATIO = 0.5
MIN_LIMIT = -40.0
MAX_LIMIT = 5.0

[JOINT_3]
TYPE = LINEAR
HOME = 0.0
MIN_LIMIT = -40.0
MAX_LIMIT = 5.0
MAX_VELOCITY = 28.5001140005
MAX_ACCELERATION = 300.0
STEPGEN_MAXACCEL = 375.0
SCALE = 400.0
FERROR = 1
MIN_FERROR = .25
HOME_OFFSET = 5.000000
HOME_SEARCH_VEL = 2.000000
HOME_LATCH_VEL = 0.100000
HOME_SEQUENCE = 0
HOME_FINAL_VEL = 5

This is the BOB
Attachments:
Last edit: 28 Jan 2021 09:49 by Giuseppe.

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

More
28 Jan 2021 17:29 - 29 Jan 2021 03:05 #196973 by Todd Zuercher
The problem is in one (or more) of your hal files, but not the one you posted above. Guessing the one above is "testplasmacnc.hal"
So the conflict is likely in "./plasmac/plasmac.tcl", "testplasmacnc_connections.hal", or "postgui.hal.

Each hal pin such as "parport.0.pin-11-in" can only ever be used once, including all of your other hal configuration files. (but I don't see it in the hal file you posted, so the repeat is in one of the other ones.)

Edit: I stand corrected, not sure why I missed those pins when I scanned it.
Last edit: 29 Jan 2021 03:05 by Todd Zuercher.

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

More
28 Jan 2021 22:13 #196996 by phillc54
pin 11 is used twice in your posted hal file:
net all-home       <= parport.0.pin-11-in-not

net din-001          <= parport.0.pin-11-in

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

More
29 Jan 2021 00:33 #197012 by andypugh

pin 11 is used twice in your posted hal file:
net all-home       <= parport.0.pin-11-in-not

net din-001          <= parport.0.pin-11-in


That's actually OK, you can treat the in and in-not pins as entirely separate.

The problem seems to be connecting the pin to more than one signal name.

The "signal" is the first word after the "net". And you can pick these freely, there are no special meanings.
If you want to use pin 11 in more than one place in the HAL then just use the same signal name in both places.
net din-11 parport.0.pin-11-in
...
net din-11 joint.0.home-sw-in
net din-11 joint.0.pos-lim-sw-in joint.0.neg-lin-sw-in
...
net din-11 motion,probe-in
...
net din-11 gladevcp.indicator-00 iocontrol.0.tool-changed
(And so on)
The following user(s) said Thank You: phillc54

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

Moderators: phillc54
Time to create page: 0.095 seconds
Powered by Kunena Forum