(UPDATE) QtPyVCP hal pins

More
5 years 3 weeks ago #222162 by spumco
Struggling with setting up LCNC and waiting for some guidance on other questions, so I figured I'd try something simple.

2.8.2, QtPyVCP & Probe Basic installed and working.

I have encoders connected to my feed/speed/vel overrides, all three work, and the screen sliders move when I twiddle the knobs.

All three have built-in switches which are connected to Mesa pins.  I can see all three working in HAL Show.

I'd like to have the switches reset the overrides just like the PB screen buttons to the right of the sliders.

Opened up QT Designer and found that the FRO reset action button is named machine.feed-override.reset.  But I can't find that pin name or whatever it is in the halcmd pin/signal list.

I get the feeling that QtPyVCP bypasses normal channels...?  How does that action button 'talk' to LCNC, and is there a way for me to connect my switch to that function?

Having a hard time troubleshooting this because I think my QtPyVCP installation - while it appears to be working - may not have gone according to plan.  I've read through the tutorial(s) and various threads and none of the config.yml, sims, PB-specific HAL files are under linuxcnc/configs.

There's a bunch of stuff under .local/lib/python2.7/site-packages/home/MILL/linuxcnc/configs/sim.qtvcp/, but none of the sims appear in the LCNC menu.  Did I do something silly during installation?

Thanks,
Ralph

Please Log in to join the conversation.

More
5 years 3 weeks ago #222171 by TurBoss
Replied by TurBoss on topic Action Button names - pins?
hello,

you can add
```
  hal:
    provider: qtpyvcp.plugins.exported_hal:ExportedHal
```

to your config.yaml or custom_config.yaml where the data_plugins got initialized

then pins should be visible from halshow tool

hope it helps




 

Please Log in to join the conversation.

More
5 years 3 weeks ago #222236 by spumco
Replied by spumco on topic Action Button names - pins?
Thanks, I'll have a go at it once I find the yaml files.

Please Log in to join the conversation.

More
5 years 3 weeks ago #222254 by TurBoss
Replied by TurBoss on topic Action Button names - pins?
Hello,

    If you are doing modifications to probebasic
is a good idea to have a probebasic copy of the source files in some work directory

backup your changes

you can git clone the project by running:

python2

```
git clone github.com/kcjengr/probe_basic.git
cd probe_basic/
python -m pip install -e .
```
or python3

```
git clone -b python3 github.com/kcjengr/probe_basic.git
cd probe_basic/
python3 -m pip install qtpyvcp
python3 -m pip install -e .
```

then you could find sample configs under probe_basic/config/probe_basic
and you could also back copy your modifications from .local/...

yaml files can be on the work_dir/probe_basic/probe_basic/probe_basic.yml

Please Log in to join the conversation.

More
5 years 3 weeks ago #222509 by spumco
Replied by spumco on topic Action Button names - pins?
Finally got back to the point where I have a mostly working computer and could try this.

Added the statement from your post to custom_config.yml (in my test copy config) and LCNC terminated with error.

Error log attached.  Should I have added it somewhere else, or some other way in the file?

Thx,
R 

Please Log in to join the conversation.

More
5 years 3 weeks ago #222524 by Joco
Replied by Joco on topic Action Button names - pins?
Probably need to post the yaml file for inspection.

Also in that log I saw
Code:
/usr/bin/linuxcnc: line 290: cd: $'/home/MILL/linuxcnc/configs\n.\nBasic': No such file or directory

Which suggests something re the a directory being referenced isn't quite right.

Please Log in to join the conversation.

More
5 years 3 weeks ago #222584 by spumco
Replied by spumco on topic Action Button names - pins?
yaml file custom_config.yml attached as suggested.  Renamed to .txt so I could attach.

Please Log in to join the conversation.

More
5 years 3 weeks ago #222614 by TurBoss
Replied by TurBoss on topic Action Button names - pins?
this is the yaml file that includes all pb features

 notice the data_plugins section

hal and others are there

since we are overriding data_plugins: from custom_config.yml
we need to add the plugins used to be there like status tooltable persitent data manager

hope it helps 

Attachment not found

Please Log in to join the conversation.

More
5 years 3 weeks ago #222617 by spumco
Replied by spumco on topic Action Button names - pins?
That did the trick!

Last question for now... I found the qtpyvcp pin section, but the FRO reset and RRO reset don't appear to be linked to anything?

EDIT

TO be more specific, I found pin halui.feed-override.value in HALshow.  The value responds to the PB screen slider, but it isn't linked to a signal that I can see anywhere.

My intention/desire is to have my FRO/SRO/RRO encoders control or override the screen sliders, and have the sliders respond to the encoders.  I would also like the encoder NO switch duplicate the screen override reset switch.

I don't want to change any of the screen elements or functions, so I don't think I need QtPyVCP designer.

But I don't get how to interact with PB.

Please Log in to join the conversation.

More
5 years 3 weeks ago #222624 by Joco
Replied by Joco on topic Action Button names - pins?
Other than HAL pins the either qtpyvcp or a GUI (PB in this case) explicitly expose there is no specific connection bweteen the HAL pins you see and the UI.

HAL is a way of setting various states/values within the linuxcnc "machine" from hardware.  Hence H(ardware) A(abstraction) L(ayer).  As you may have seen you can do some pretty complex things with and within HAL.

So, if you use a pin such as the halui.feed-override.value you are changing values inside the linuxcnc engine.  If the UI is representing these values corrcetly via widgets then those widgets will automatically change to represent what is happening to the underlying values.

Now in the case of the reset switch those pins are INPUT pins only.  That means you can connect a h/w button of someform to them to trigger the reset.  The onscreen button may or maynot react at the same time. I can't recall.  It's been to long since I wrote and tested that code in the framework.  :-)

Hopefully a little helpful.

Cheers - J.

 

Please Log in to join the conversation.

Time to create page: 0.068 seconds
Powered by Kunena Forum