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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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
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
36 changes: 18 additions & 18 deletions configs/by_interface/mesa/hm2-modbus/bldc_and_wavebox.mbccs
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,27 @@
<command device="dummy" function="W_COIL" address="0x0000" noanswer="1"><data value="0xff00" /></command>
</initlist>
<commands> <!-- Command function sequences and HAL pin assignments -->
<command device="bldc" function="R_REGISTERS" address="0x0020" modbustype="U_AB" haltype="S32" scale="1">
<command device="bldc" function="R_REGISTERS" address="0x0020" modbustype="U_AB" haltype="SINT" scale="1">
<pin name="rtpwm"/>
<pin name="rtcurrent"/>
<pin name="comfreq" modbustype="S_AB"/>
<pin skip="1" />
<pin name="rtpos" modbustype="S_ABCD" scale="0"/>
</command>
<!-- Gives us the following pins:
- hm2_modbus.0.bldc.rtpwm (out, s32) (range [0..65535])
- hm2_modbus.0.bldc.rtpwm.offset (in, u64)
- hm2_modbus.0.bldc.rtpwm.scale (in, float) (must be set to 0.1)
- hm2_modbus.0.bldc.rtpwm.scaled (out, float)
- hm2_modbus.0.bldc.rtcurrent (out, s32) (range [0..65535])
- hm2_modbus.0.bldc.rtcurrent.offset (in, u64)
- hm2_modbus.0.bldc.rtcurrent.scale (in, float) (must be set to 0.01)
- hm2_modbus.0.bldc.rtcurrent.scaled (out, float)
- hm2_modbus.0.bldc.comfreq (out, s32) (range [-32768..+32767])
- hm2_modbus.0.bldc.comfreq.offset (in, s64)
- hm2_modbus.0.bldc.comfreq.scale (in, float) (must be set to 0.1)
- hm2_modbus.0.bldc.comfreq.scaled (out, float)
- hm2_modbus.0.bldc.rtpos (out, s32) (range [-2147483648..+2147483647])
- hm2_modbus.0.bldc.rtpwm (out, sint) (range [0..65535])
- hm2_modbus.0.bldc.rtpwm.offset (in, uint)
- hm2_modbus.0.bldc.rtpwm.scale (in, real) (must be set to 0.1)
- hm2_modbus.0.bldc.rtpwm.scaled (out, real)
- hm2_modbus.0.bldc.rtcurrent (out, sint) (range [0..65535])
- hm2_modbus.0.bldc.rtcurrent.offset (in, uint)
- hm2_modbus.0.bldc.rtcurrent.scale (in, real) (must be set to 0.01)
- hm2_modbus.0.bldc.rtcurrent.scaled (out, real)
- hm2_modbus.0.bldc.comfreq (out, sint) (range [-32768..+32767])
- hm2_modbus.0.bldc.comfreq.offset (in, sint)
- hm2_modbus.0.bldc.comfreq.scale (in, real) (must be set to 0.1)
- hm2_modbus.0.bldc.comfreq.scaled (out, real)
- hm2_modbus.0.bldc.rtpos (out, sint) (range [-2147483648..+2147483647])

The start will be suspended (see top). The .scale pins will be set in
the hal-file. Offset pins are automatically initialized to zero.
Expand All @@ -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>
Original file line number Diff line number Diff line change
Expand Up @@ -36,27 +36,27 @@
<command device="dummy" function="W_COIL" address="0x0000" noanswer="1"><data value="0xff00" /></command>
</initlist>
<commands> <!-- Command function sequences and HAL pin assignments -->
<command device="bldc" function="R_REGISTERS" address="0x0020" modbustype="U_AB" haltype="S32" scale="1">
<command device="bldc" function="R_REGISTERS" address="0x0020" modbustype="U_AB" haltype="SINT" scale="1">
<pin name="rtpwm"/>
<pin name="rtcurrent"/>
<pin name="comfreq" modbustype="S_AB"/>
<pin skip="1" />
<pin name="rtpos" modbustype="S_ABCD" scale="0"/>
</command>
<!-- Gives us the following pins:
- hm2_modbus.0.bldc.rtpwm (out, s32) (range [0..65535])
- hm2_modbus.0.bldc.rtpwm.offset (in, u64)
- hm2_modbus.0.bldc.rtpwm.scale (in, float) (must be set to 0.1)
- hm2_modbus.0.bldc.rtpwm.scaled (out, float)
- hm2_modbus.0.bldc.rtcurrent (out, s32) (range [0..65535])
- hm2_modbus.0.bldc.rtcurrent.offset (in, u64)
- hm2_modbus.0.bldc.rtcurrent.scale (in, float) (must be set to 0.01)
- hm2_modbus.0.bldc.rtcurrent.scaled (out, float)
- hm2_modbus.0.bldc.comfreq (out, s32) (range [-32768..+32767])
- hm2_modbus.0.bldc.comfreq.offset (in, s64)
- hm2_modbus.0.bldc.comfreq.scale (in, float) (must be set to 0.1)
- hm2_modbus.0.bldc.comfreq.scaled (out, float)
- hm2_modbus.0.bldc.rtpos (out, s32) (range [-2147483648..+2147483647])
- hm2_modbus.0.bldc.rtpwm (out, sint) (range [0..65535])
- hm2_modbus.0.bldc.rtpwm.offset (in, uint)
- hm2_modbus.0.bldc.rtpwm.scale (in, real) (must be set to 0.1)
- hm2_modbus.0.bldc.rtpwm.scaled (out, real)
- hm2_modbus.0.bldc.rtcurrent (out, sint) (range [0..65535])
- hm2_modbus.0.bldc.rtcurrent.offset (in, uint)
- hm2_modbus.0.bldc.rtcurrent.scale (in, real) (must be set to 0.01)
- hm2_modbus.0.bldc.rtcurrent.scaled (out, real)
- hm2_modbus.0.bldc.comfreq (out, sint) (range [-32768..+32767])
- hm2_modbus.0.bldc.comfreq.offset (in, sint)
- hm2_modbus.0.bldc.comfreq.scale (in, real) (must be set to 0.1)
- hm2_modbus.0.bldc.comfreq.scaled (out, real)
- hm2_modbus.0.bldc.rtpos (out, sint) (range [-2147483648..+2147483647])

The start will be suspended (see top). The .scale pins will be set in
the hal-file. Offset pins are automatically initialized to zero.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ addf estop-latch.0 servo-thread
# ################

# axis enable chain
newsig emcmot.00.enable bit
newsig emcmot.00.enable bool
sets emcmot.00.enable FALSE

net emcmot.00.enable <= joint.0.amp-enable-out
Expand Down Expand Up @@ -97,7 +97,7 @@ setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.step_type 0
# ################

# axis enable chain
newsig emcmot.01.enable bit
newsig emcmot.01.enable bool
sets emcmot.01.enable FALSE

net emcmot.01.enable <= joint.1.amp-enable-out
Expand Down Expand Up @@ -132,7 +132,7 @@ setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.step_type 0
# ################

# axis enable chain
newsig emcmot.02.enable bit
newsig emcmot.02.enable bool
sets emcmot.02.enable FALSE

net emcmot.02.enable <= joint.2.amp-enable-out
Expand Down
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="UINT" name="potu" count="2" />
<command device="rs485io" address="0x2000" function="R_REGISTERS" modbustype="S_ABCD" haltype="SINT" 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
6 changes: 3 additions & 3 deletions configs/by_interface/mesa/hm2-servo/hm2-servo-eth.hal
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ addf hm2_[HOSTMOT2](BOARD).0.write servo-thread
# ################

# axis enable chain
newsig emcmot.00.enable bit
newsig emcmot.00.enable bool
sets emcmot.00.enable FALSE
net emcmot.00.enable => pid.0.enable
net emcmot.00.enable => hm2_[HOSTMOT2](BOARD).0.pwmgen.00.enable
Expand Down Expand Up @@ -112,7 +112,7 @@ net motor.00.command pid.0.output => hm2_[HOSTMOT2](BOARD).0.pwmgen.00.value
# ################

# axis enable chain
newsig emcmot.01.enable bit
newsig emcmot.01.enable bool
sets emcmot.01.enable FALSE
net emcmot.01.enable => pid.1.enable
net emcmot.01.enable => hm2_[HOSTMOT2](BOARD).0.pwmgen.01.enable
Expand Down Expand Up @@ -153,7 +153,7 @@ net motor.01.command pid.1.output => hm2_[HOSTMOT2](BOARD).0.pwmgen.01.value
# ################

# axis enable chain
newsig emcmot.02.enable bit
newsig emcmot.02.enable bool
sets emcmot.02.enable FALSE
net emcmot.02.enable => pid.2.enable
net emcmot.02.enable => hm2_[HOSTMOT2](BOARD).0.pwmgen.02.enable
Expand Down
6 changes: 3 additions & 3 deletions configs/by_interface/mesa/hm2-servo/hm2-servo.hal
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ addf hm2_[HOSTMOT2](BOARD).0.write servo-thread
# ################

# axis enable chain
newsig emcmot.00.enable bit
newsig emcmot.00.enable bool
sets emcmot.00.enable FALSE
net emcmot.00.enable => pid.0.enable
net emcmot.00.enable => hm2_[HOSTMOT2](BOARD).0.pwmgen.00.enable
Expand Down Expand Up @@ -112,7 +112,7 @@ net motor.00.command pid.0.output => hm2_[HOSTMOT2](BOARD).0.pwmgen.00.value
# ################

# axis enable chain
newsig emcmot.01.enable bit
newsig emcmot.01.enable bool
sets emcmot.01.enable FALSE
net emcmot.01.enable => pid.1.enable
net emcmot.01.enable => hm2_[HOSTMOT2](BOARD).0.pwmgen.01.enable
Expand Down Expand Up @@ -153,7 +153,7 @@ net motor.01.command pid.1.output => hm2_[HOSTMOT2](BOARD).0.pwmgen.01.value
# ################

# axis enable chain
newsig emcmot.02.enable bit
newsig emcmot.02.enable bool
sets emcmot.02.enable FALSE
net emcmot.02.enable => pid.2.enable
net emcmot.02.enable => hm2_[HOSTMOT2](BOARD).0.pwmgen.02.enable
Expand Down
6 changes: 3 additions & 3 deletions configs/by_interface/mesa/hm2-stepper/hm2-stepper-eth.hal
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ addf estop-latch.0 servo-thread
# ################

# axis enable chain
newsig emcmot.00.enable bit
newsig emcmot.00.enable bool
sets emcmot.00.enable FALSE

net emcmot.00.enable <= joint.0.amp-enable-out
Expand Down Expand Up @@ -97,7 +97,7 @@ setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.step_type 0
# ################

# axis enable chain
newsig emcmot.01.enable bit
newsig emcmot.01.enable bool
sets emcmot.01.enable FALSE

net emcmot.01.enable <= joint.1.amp-enable-out
Expand Down Expand Up @@ -132,7 +132,7 @@ setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.step_type 0
# ################

# axis enable chain
newsig emcmot.02.enable bit
newsig emcmot.02.enable bool
sets emcmot.02.enable FALSE

net emcmot.02.enable <= joint.2.amp-enable-out
Expand Down
6 changes: 3 additions & 3 deletions configs/by_interface/mesa/hm2-stepper/hm2-stepper-rpspi.hal
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ addf estop-latch.0 servo-thread
# ################

# axis enable chain
newsig emcmot.00.enable bit
newsig emcmot.00.enable bool
sets emcmot.00.enable FALSE

net emcmot.00.enable <= joint.0.amp-enable-out
Expand Down Expand Up @@ -97,7 +97,7 @@ setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.step_type 0
# ################

# axis enable chain
newsig emcmot.01.enable bit
newsig emcmot.01.enable bool
sets emcmot.01.enable FALSE

net emcmot.01.enable <= joint.1.amp-enable-out
Expand Down Expand Up @@ -132,7 +132,7 @@ setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.step_type 0
# ################

# axis enable chain
newsig emcmot.02.enable bit
newsig emcmot.02.enable bool
sets emcmot.02.enable FALSE

net emcmot.02.enable <= joint.2.amp-enable-out
Expand Down
6 changes: 3 additions & 3 deletions configs/by_interface/mesa/hm2-stepper/hm2-stepper.hal
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ addf estop-latch.0 servo-thread
# ################

# axis enable chain
newsig emcmot.00.enable bit
newsig emcmot.00.enable bool
sets emcmot.00.enable FALSE

net emcmot.00.enable <= joint.0.amp-enable-out
Expand Down Expand Up @@ -97,7 +97,7 @@ setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.step_type 0
# ################

# axis enable chain
newsig emcmot.01.enable bit
newsig emcmot.01.enable bool
sets emcmot.01.enable FALSE

net emcmot.01.enable <= joint.1.amp-enable-out
Expand Down Expand Up @@ -132,7 +132,7 @@ setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.step_type 0
# ################

# axis enable chain
newsig emcmot.02.enable bit
newsig emcmot.02.enable bool
sets emcmot.02.enable FALSE

net emcmot.02.enable <= joint.2.amp-enable-out
Expand Down
Loading
Loading