Closed dpslwk closed 1 year ago
Well that's horrible - someone broken the naming scheme for SSR and outM . Can you post what a normal not inverted pin name is for these pins?
not sure what you mean by not inverted pin names?
two commits that added inverting to SSR and the full OUTM module https://github.com/LinuxCNC/linuxcnc/commit/dbaa51e484453541fdcfbff5ddbafeae445cb3cd https://github.com/LinuxCNC/linuxcnc/commit/9f3109f242002723b15ab95481dbcdd59091e097
Since I suspect its far two late to rename these in hostmot2 I think a fix would be needed in build_HAL.py
https://github.com/LinuxCNC/linuxcnc/blob/db02b5b27f35cbde6cd73c2ec2da0e7d431528ec/src/emc/usr_intf/pncconf/build_HAL.py#L1689-L1694
Ya so I needed to see the normal pin name to see how the scheme works. every other pin AFAIK adds some sort of invert text after the normal pin name, these but the invert text before the number. So the fix needs to go deeper in the code. Thanks for the print out that should give me what I need.
I'm not setup to build dev and test actual changes myself, but I suspect this might work?
if i: # invert pin
if t in (_PD.SSR0,_PD.OUTM0):
print("setp %s true"% (pinname.replace('.out-', '.invert-')), file=file)
else:
if "sserial" in pname:
ending = "-invert"
elif "parport" in pinname: ending = "-invert"
else: ending = ".invert_output"
print("setp %s true"% (pinname + ending ), file=file)
Nice ! I'll test it out.
Ok that looks good - how about inverted inputs - are they ok?
INM is fine, that’s seems to use more standard -not
thank you. I will push your fix to 2.9. I'll close this. please open it again if this somehow didn't work
PNCConf build_HAL is not correctly inverting pins for SSR / OUTM pins
Result from PNCConf
I believe this should be
Here are the steps I follow to reproduce the issue:
7i96s-Internal Data
, Firmware:7i96s_d
SSR Output
(Control->Machine Is Enabled
) and clickInv
OUTM Output
(Spindle->Spindle Enable
) and clickInv
This is what I expected to happen:
This is what happened instead:
Information about my hardware and software:
lsb_release -a
): Debian GNU/Linux 12 (bookworm)uname -a
): Linux 6.1.0-10-rt-amd64 #1 SMP PREEMPT_RT Debian 6.1.37-1 (2023-07-03) x86_64 GNU/Linuxscripts/get-version-from-git
): linuxcnc-uspace_2.9.0~pre1+git20230208.f1270d6ed7-1_amd64.deb