Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion configs/apps/gladevcp/class-callback/class_callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def __init__(self, halcomp,builder,useropts):
self.halcomp = halcomp
self.builder = builder

self.halcomp.newpin("value", hal.HAL_FLOAT, hal.HAL_OUT)
self.halcomp.newpin("value", hal.Type.REAL, hal.Dir.OUT)
self.start = time.time()
self.nhits = 0
self.ticks = 0
Expand Down
6 changes: 3 additions & 3 deletions configs/apps/gladevcp/complex/complex.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,12 @@ def _hal_setup(self,halcomp, builder):
self.led1 = self.builder.get_object("hal_led1")

# standard hal pins not associated with any widget
self.halcomp.newpin("example-out", hal.HAL_BIT, hal.HAL_OUT)
self.halcomp.newpin("example-in", hal.HAL_S32, hal.HAL_IN)
self.halcomp.newpin("example-out", hal.Type.BOOL, hal.Dir.OUT)
self.halcomp.newpin("example-in", hal.Type.SINT, hal.Dir.IN)

# hal pins with change callback. Also unrelated to any HAL widget.
# When the pin's value changes the callback is executed.
self.example_trigger = hal_glib.GPin(halcomp.newpin('example-trigger', hal.HAL_BIT, hal.HAL_IN))
self.example_trigger = hal_glib.GPin(halcomp.newpin('example-trigger', hal.Type.BOOL, hal.Dir.IN))
self.example_trigger.connect('value-changed', self._on_example_trigger_change)

def __init__(self, halcomp,builder,useropts):
Expand Down
4 changes: 2 additions & 2 deletions configs/attic/demo_mazak/demo_mazak.hal
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ loadrt modmath mod_dir=2
loadrt charge_pump
loadrt tristate_bit
loadrt tristate_float count=3
loadrt conv_s32_float
loadrt conv_sint_real

# Software encoder counter, for the jogwheel, and possibly a future
# small manual encoder for a feedrate override knob.
Expand Down Expand Up @@ -164,7 +164,7 @@ addf tristate-bit.0 servo-thread
addf tristate-float.0 servo-thread
addf tristate-float.1 servo-thread
addf tristate-float.2 servo-thread
addf conv-s32-float.0 servo-thread
addf conv-sint-real.0 servo-thread

# output drivers are loaded last
addf motenc.3.dac-write servo-thread
Expand Down
8 changes: 4 additions & 4 deletions configs/attic/unclaimed/plasma-thc/mp1000A.hal
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ loadrt or2 count=9
loadrt scale
loadrt sum2 count=5
loadrt xor2 count=4
loadrt conv_s32_float
loadrt conv_sint_real
loadrt edge count=2

# Attach realtime hal components to a realtime thread
Expand All @@ -32,7 +32,7 @@ addf and2.8 servo-thread
addf comp.0 servo-thread
addf comp.1 servo-thread
addf comp.2 servo-thread
addf conv-s32-float.0 servo-thread
addf conv-sint-real.0 servo-thread
addf edge.0 servo-thread
addf edge.1 servo-thread
addf flipflop.0 servo-thread
Expand Down Expand Up @@ -178,8 +178,8 @@ net FeedHold xor2.0.out => motion.feed-hold
net CHLSwitched xor2.2.out => and2.1.in1
net ArcOKTimer oneshot.2.out => xor2.1.in0
net PierceLatch flipflop.1.out => mux2.0.sel oneshot.0.in
net IgnitionCounterS32 updown.0.count => conv-s32-float.0.in
net IgnitionCounterFloat conv-s32-float.0.out => comp.2.in1
net IgnitionCounterS32 updown.0.count => conv-sint-real.0.in
net IgnitionCounterFloat conv-sint-real.0.out => comp.2.in1
net IgnitionTimerOff oneshot.1.out-not => updown.0.countup
net TorchOff not.2.out => flipflop.1.reset
net TorchTurnedOffOrTimeout or2.7.out => or2.6.in1
Expand Down
8 changes: 4 additions & 4 deletions configs/attic/unclaimed/plasma-thc/mp1000B.hal
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ loadrt or2 count=9
loadrt scale
loadrt sum2 count=5
loadrt xor2 count=4
loadrt conv_s32_float
loadrt conv_sint_real
loadrt edge count=2

# Attach realtime hal components to a realtime thread
Expand All @@ -32,7 +32,7 @@ addf and2.8 servo-thread
addf comp.0 servo-thread
addf comp.1 servo-thread
addf comp.2 servo-thread
addf conv-s32-float.0 servo-thread
addf conv-sint-real.0 servo-thread
addf edge.0 servo-thread
addf edge.1 servo-thread
addf flipflop.0 servo-thread
Expand Down Expand Up @@ -178,8 +178,8 @@ net FeedHold xor2.0.out => motion.feed-hold
net CHLSwitched xor2.2.out => and2.1.in1
net ArcOKTimer oneshot.2.out => xor2.1.in0
net PierceLatch flipflop.1.out => mux2.0.sel oneshot.0.in
net IgnitionCounterS32 updown.0.count => conv-s32-float.0.in
net IgnitionCounterFloat conv-s32-float.0.out => comp.2.in1
net IgnitionCounterS32 updown.0.count => conv-sint-real.0.in
net IgnitionCounterFloat conv-sint-real.0.out => comp.2.in1
net IgnitionTimerOff oneshot.1.out-not => updown.0.countup
net TorchOff not.2.out => flipflop.1.reset
net TorchTurnedOffOrTimeout or2.7.out => or2.6.in1
Expand Down
8 changes: 4 additions & 4 deletions configs/attic/unclaimed/plasma-thc/thc300.hal
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ loadrt or2 count=9
loadrt scale
loadrt sum2 count=5
loadrt xor2 count=4
loadrt conv_s32_float
loadrt conv_sint_real
loadrt edge count=2

# Attach realtime hal components to a realtime thread
Expand All @@ -32,7 +32,7 @@ addf and2.8 servo-thread
addf comp.0 servo-thread
addf comp.1 servo-thread
addf comp.2 servo-thread
addf conv-s32-float.0 servo-thread
addf conv-sint-real.0 servo-thread
addf edge.0 servo-thread
addf edge.1 servo-thread
addf flipflop.0 servo-thread
Expand Down Expand Up @@ -178,8 +178,8 @@ net FeedHold xor2.0.out => motion.feed-hold
net CHLSwitched xor2.2.out => and2.1.in1
net ArcOKTimer oneshot.2.out => xor2.1.in0
net PierceLatch flipflop.1.out => mux2.0.sel oneshot.0.in
net IgnitionCounterS32 updown.0.count => conv-s32-float.0.in
net IgnitionCounterFloat conv-s32-float.0.out => comp.2.in1
net IgnitionCounterS32 updown.0.count => conv-sint-real.0.in
net IgnitionCounterFloat conv-sint-real.0.out => comp.2.in1
net IgnitionTimerOff oneshot.1.out-not => updown.0.countup
net TorchOff not.2.out => flipflop.1.reset
net TorchTurnedOffOrTimeout or2.7.out => or2.6.in1
Expand Down
8 changes: 4 additions & 4 deletions configs/by_interface/mesa/hm2-modbus/bldc_and_wavebox.mbccs
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@
<command device="wavebox" function="R_INPUTS" address="0x0000" count="8" name="switch" />
<!-- Gives us the following pins:
- Eight switch inputs on the box are HAL output pins
* hm2_modbus.0.wavebox.switch-00 (out, HAL_BIT)
* hm2_modbus.0.wavebox.switch-00 (out, HAL_BOOL)
* ...
* hm2_modbus.0.wavebox.switch-07 (out, HAL_BIT)
* hm2_modbus.0.wavebox.switch-07 (out, HAL_BOOL)
-->

<!--
Expand All @@ -74,9 +74,9 @@
<command device="wavebox" function="W_COILS" address="0x0000" count="8" name="relay" />
<!-- Gives us the following pins:
- Eight relay outputs on the box are HAL input pins
* hm2_modbus.0.wavebox.relay-00 (in, HAL_BIT)
* hm2_modbus.0.wavebox.relay-00 (in, HAL_BOOL)
* ...
* hm2_modbus.0.wavebox.relay-07 (in, HAL_BIT)
* hm2_modbus.0.wavebox.relay-07 (in, HAL_BOOL)
-->
</commands>
</mesamodbus>
8 changes: 4 additions & 4 deletions configs/by_interface/mesa/hm2-modbus/rs485io.mbccs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
<initlist>
</initlist>
<commands>
<command device="rs485io" address="0x1000" function="R_REGISTERS" modbustype="U_ABCD" haltype="HAL_U32" name="potu" count="2" />
<command device="rs485io" address="0x2000" function="R_REGISTERS" modbustype="S_ABCD" haltype="HAL_S32" name="pots" count="2" />
<command device="rs485io" address="0x3000" function="R_REGISTERS" modbustype="F_ABCD" haltype="HAL_FLOAT" name="potf" count="2" />
<command device="rs485io" address="0x4000" function="R_REGISTERS" modbustype="F_HGFEDCBA" haltype="HAL_FLOAT" name="potd" count="1" />
<command device="rs485io" address="0x1000" function="R_REGISTERS" modbustype="U_ABCD" haltype="U32" name="potu" count="2" />
<command device="rs485io" address="0x2000" function="R_REGISTERS" modbustype="S_ABCD" haltype="S32" name="pots" count="2" />
<command device="rs485io" address="0x3000" function="R_REGISTERS" modbustype="F_ABCD" haltype="REAL" name="potf" count="2" />
<command device="rs485io" address="0x4000" function="R_REGISTERS" modbustype="F_HGFEDCBA" haltype="REAL" name="potd" count="1" />
<command device="rs485io" address="0x0000" function="R_INPUTS" name="button" count="4" />
<command device="rs485io" address="0x0000" function="W_COILS" name="led" count="6" />
</commands>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
<command device="wavebox" function="R_INPUTS" address="0x0000" count="8" name="switch" />
<!-- Gives us the following pins:
- Eight switch inputs on the box are HAL output pins
* hm2_modbus.0.wavebox.switch-00 (out, HAL_BIT)
* hm2_modbus.0.wavebox.switch-00 (out, HAL_BOOL)
* ...
* hm2_modbus.0.wavebox.switch-07 (out, HAL_BIT)
* hm2_modbus.0.wavebox.switch-07 (out, HAL_BOOL)
-->

<!--
Expand All @@ -56,9 +56,9 @@
<command device="wavebox" function="W_COILS" address="0x0000" count="8" name="relay" />
<!-- Gives us the following pins:
- Eight relay outputs on the box are HAL input pins
* hm2_modbus.0.wavebox.relay-00 (in, HAL_BIT)
* hm2_modbus.0.wavebox.relay-00 (in, HAL_BOOL)
* ...
* hm2_modbus.0.wavebox.relay-07 (in, HAL_BIT)
* hm2_modbus.0.wavebox.relay-07 (in, HAL_BOOL)
-->
</commands>
</mesamodbus>
8 changes: 4 additions & 4 deletions configs/by_interface/parport/plasma-thc-sim/thc.hal
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ loadrt or2 count=10
loadrt scale
loadrt sum2 count=5
loadrt xor2 count=4
loadrt conv_s32_float
loadrt conv_sint_real
loadrt edge count=2

# Attach realtime hal components to a realtime thread
Expand All @@ -35,7 +35,7 @@ addf and2.8 servo-thread
addf comp.0 servo-thread
addf comp.1 servo-thread
addf comp.2 servo-thread
addf conv-s32-float.0 servo-thread
addf conv-sint-real.0 servo-thread
addf edge.0 servo-thread
addf edge.1 servo-thread
addf flipflop.0 servo-thread
Expand Down Expand Up @@ -186,8 +186,8 @@ net FeedHold xor2.0.out => motion.feed-hold
net CHLSwitched xor2.2.out => and2.1.in1
net ArcOKTimer oneshot.2.out => xor2.1.in0
net PierceLatch flipflop.1.out => mux2.0.sel oneshot.0.in
net IgnitionCounterS32 updown.0.count => conv-s32-float.0.in
net IgnitionCounterFloat conv-s32-float.0.out => comp.2.in1
net IgnitionCounterS32 updown.0.count => conv-sint-real.0.in
net IgnitionCounterFloat conv-sint-real.0.out => comp.2.in1
net IgnitionTimerOff oneshot.1.out-not => updown.0.countup
net TorchOff not.2.out => flipflop.1.reset
net TorchTurnedOffOrTimeout or2.7.out => or2.6.in1
Expand Down
4 changes: 2 additions & 2 deletions configs/by_interface/pico/univpwmv/univpwm_load.hal
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ loadrt not count=1
loadrt estop_latch count=1
loadrt and2 count=1
loadrt or2 count=1
loadrt conv_s32_float count=1
loadrt conv_sint_real count=1
loadrt mult2 count=2
loadrt lowpass count=1

Expand All @@ -50,7 +50,7 @@ addf pid.2.do-pid-calcs servo-thread
addf pid.3.do-pid-calcs servo-thread
# for spindle
addf or2.0 servo-thread
addf conv-s32-float.0 servo-thread
addf conv-sint-real.0 servo-thread
addf mult2.0 servo-thread
addf mult2.1 servo-thread
addf lowpass.0 servo-thread
Expand Down
8 changes: 4 additions & 4 deletions configs/by_machine/scorbot-er-3/pyvcp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<pyvcp>
<vbox>

<label><text>"These widgets indicate a HAL_BIT"</text></label>
<label><text>"These widgets indicate a HAL_BOOL"</text></label>
<hbox>
<label><text>"LED:"</text></label>
<led>
Expand All @@ -11,7 +11,7 @@
</led>
</hbox>

<label><text>"These widgets control a HAL_BIT"</text></label>
<label><text>"These widgets control a HAL_BOOL"</text></label>
<vbox>
<hbox>
<label><text>"Button"</text></label>
Expand All @@ -29,7 +29,7 @@
</hbox>
</vbox>

<label><text>"These widgets indicate a HAL_FLOAT"</text></label>
<label><text>"These widgets indicate a HAL_REAL"</text></label>
<vbox>

<hbox>
Expand All @@ -48,7 +48,7 @@
</hbox>
</vbox>

<label><text>"These widgets control a HAL_FLOAT"</text></label>
<label><text>"These widgets control a HAL_REAL"</text></label>
<vbox>
<hbox>
<label><text>"Scale:"</text></label>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
loadrt siggen names=gen
loadrt scale names=scalea
loadrt conv_float_s32 names=cvt
loadrt conv_real_sint names=cvt
loadrt not names=nota
loadrt or2 names=or2a

Expand Down
12 changes: 6 additions & 6 deletions configs/sim/axis/gantry/gantry_panel.hal
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# factor (machine-units per count).

loadrt mux2 names=home_sequence_mux,jjog_counts_mux
loadrt conv_float_s32 names=home_sequence_s32
loadrt conv_real_sint names=home_sequence_sint
loadrt oneshot names=pulse_on_jjdisable

# synchronized homing, no joint1,3 jogging:
Expand All @@ -46,15 +46,15 @@ setp pulse_on_jjdisable.width 0.1

addf home_sequence_mux servo-thread
addf jjog_counts_mux servo-thread
addf home_sequence_s32 servo-thread
addf home_sequence_sint servo-thread
addf pulse_on_jjdisable servo-thread

net home_seq_float <= home_sequence_mux.out
net home_seq_float => home_sequence_s32.in
net home_seq_float => home_sequence_sint.in

net home_seq_s32 <= home_sequence_s32.out
net home_seq_s32 => ini.1.home_sequence
net home_seq_s32 => ini.3.home_sequence
net home_seq_sint <= home_sequence_sint.out
net home_seq_sint => ini.1.home_sequence
net home_seq_sint => ini.3.home_sequence

# set counts to zero using param_pin upon disable:
net jjog_counts_value <= jjog_counts_mux.out
Expand Down
2 changes: 1 addition & 1 deletion configs/sim/axis/gladevcp/meter_scale.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def __init__(self, halcomp,builder,useropts):

# hal pin with change callback.
# When the pin's value changes the callback is executed.
self.max_value = hal_glib.GPin(halcomp.newpin('max-value', hal.HAL_FLOAT, hal.HAL_IN))
self.max_value = hal_glib.GPin(halcomp.newpin('max-value', hal.Type.REAL, hal.Dir.IN))
self.max_value.connect('value-changed', self._on_max_value_change)

inifile = linuxcnc.ini(os.getenv("INI_FILE_NAME"))
Expand Down
2 changes: 1 addition & 1 deletion configs/sim/axis/laser/laser.hal
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
loadrt conv_s32_u32 names=laser.motion.type-conv
loadrt conv_sint_uint names=laser.motion.type-conv
loadrt bitslice names=laser.motion.type-slice personality=2
loadrt limit1 names=laser.power.min.limit,laser.power.max.limit,laser.power.cmd.limit
loadrt laserpower names=laser.control
Expand Down
2 changes: 1 addition & 1 deletion configs/sim/axis/plasma/plasmac2/lib/conversational.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ def send_pressed(self):

def block_request(self):
# may need to add this halpin for wcs rotation on abort etc.
# self.convBlockLoaded = self.h.newpin('conv_block_loaded', hal.HAL_BIT, hal.HAL_IN)
# self.convBlockLoaded = self.h.newpin('conv_block_loaded', hal.Type.BOOL, hal.Dir.IN)
if not self.settingsExited:
if self.previewActive and self.active_shape():
return True
Expand Down
2 changes: 1 addition & 1 deletion configs/sim/axis/plasma/plasmac2/lib/custom/user_hal.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# CUSTOM HAL PINS, RUNS ONCE AT STARTUP

# example hal pin named my-halpin
#comp.newpin('my-halpin', hal.HAL_FLOAT, hal.HAL_IN)
#comp.newpin('my-halpin', hal.Type.REAL, hal.Dir.IN)
2 changes: 1 addition & 1 deletion configs/sim/axis/plasma/plasmac2/lib/sim/sim_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def estop_pressed(event):
I = linuxcnc.ini(S.ini_filename)
# create new hal component
H = hal.component('plasmac-sim')
H.newpin('z-position', hal.HAL_FLOAT, hal.HAL_IN)
H.newpin('z-position', hal.Type.REAL, hal.Dir.IN)
H.ready()
# disconnect any conflicting hal pins
if hal.pin_has_writer('db_arc-ok.in'):
Expand Down
Loading