QTPlasmac and mesa7I96 questions

More
11 Nov 2021 21:42 #226147 by RDA
This results in
Debug file information:
Note: Using POSIX realtime
sh: 1: PATH: not found
sh: 1: PATH: not found
sh: 1: PATH: not found
sh: 1: PATH: not found
sh: 1: PATH: not found
sh: 1: PATH: not found
./Mesa_test.hal:68: Pin 'qtplasmac.ext_out_0' does not exist
8979
That comes to my previous "I cant find these from HAL show or from my "mesa_test.hal". If these do not exist, any idea how would I create a pin or where can I poke around to to see what pins are available?

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

More
11 Nov 2021 21:52 #226148 by phillc54
Can you start LinuxCNC from a terminal and post the full output in the terminal begining with the command you used to start LinuxCNC up until the GUI loads.

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

More
12 Nov 2021 05:17 #226183 by rodw

This results in
./Mesa_test.hal:68: Pin 'qtplasmac.ext_out_0' does not exist
That comes to my previous "I cant find these from HAL show or from my "mesa_test.hal". If these do not exist, any idea how would I create a pin or where can I poke around to to see what pins are available?


any pin starting with qtplasmac is created in user space when the GUI is created.
You need to add these commands in the postgui.hal file that is loaded after the gui for the pin to exist and be found.

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

More
12 Nov 2021 05:57 #226189 by phillc54

any pin starting with qtplasmac is created in user space when the GUI is created.
You need to add these commands in the postgui.hal file that is loaded after the gui for the pin to exist and be found.

We probably should add something to the docs about that.

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

More
12 Nov 2021 06:19 #226190 by phillc54
I should also mention that you can toggle hardware pins directly:
BUTTON_7_NAME = ENABLE
BUTTON_7_CODE = toggle-halpin hm2_7i96.0.ssr.00.out-00 runcritical
Also if it is for a laser then you are probably better served using the inbuilt laser function.
linuxcnc.org/docs/devel/html/plasma/qtplasmac.html#qt_laser

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

More
12 Nov 2021 09:41 - 12 Nov 2021 09:42 #226203 by RDA
Hello Gentlemen,

A big thank you for helping me out!

So now I can toggle the pin when tying the button directly to the output using:

toggle-halpin hm2_7i96.0.ssr.00.out-00 runcritical

But I am still unable to create or use the plasmac ext pin (now in custom_postgui.hal)...
 

File Attachment:

File Name: custom_pos...12-2.hal
File Size:0 KB

net critical-pin qtplasmac.ext_out_0   =>     hm2_7i96.0.ssr.00.out-00

Here is the terminal ouput when trying to us the plasma ext output:
 

File Attachment:

File Name: terminal_2...12-2.txt
File Size:5 KB

This probably something very simple but I dont know enough to get an idea where to look what I am doing wrong. I still guess the plasmac ext outputs are not generated, but not sure where I would look for these.

Its not for laser, I initally just wanted to try something quick and dirty. This will be used as a servo enable signal but I also want to try and playaround using signals to trigger a light beacon based on different "events" (this is something for later when I have more knowledge about how this all works).


 
 
Attachments:
Last edit: 12 Nov 2021 09:42 by RDA. Reason: Added files

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

More
12 Nov 2021 09:53 #226205 by phillc54
Why do you want to connect the qtplasmac.ext_out_0 pin to the ssr.00.out.0 pin when you can toggle ssr.00.out.0 directly?
What are you attempting to do with the qtplasmac.ext_out_0 pin while it is connected to the ssr.0.out.0 pin?
Do you get an error message?
I am not really sure what you are trying to achieve.

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

More
12 Nov 2021 11:39 - 12 Nov 2021 11:46 #226215 by RDA
Hello Sir,

Can we start from scratch and forget all the above and ill try to explain.

Never tried to play with hal before, so I wanted to start from something easy to try, and get a grasp on how this stuff works. The simplest use case I figured was to toggle a pin with a button. You showed me probably the most direct way by toggling directly the output, thanks for that.

As far as I undestand I can net a signal name to a hal pin that connects to an output?
So how I understand this is:
net critical-pin qtplasmac.ext_out_0 => hm2_7i96.0.ssr.00.out-00
I create a net "critical-pin" that connects to pin" qtplasmac.ext_out_0" that is tied to "hm2_7i96.0.ssr.00.out-00"

So I assume that by creating a net "critical-pin" I could then reference to this "anywhere".

While reading the manual I saw that there are "unused" hal pins to be used as outputs (qtplasmac.ext_out_0/1/2/3). So I figured this was the easiest way for me to try and create a net.

I dont have to use those specific hal pins, I can use any but I thought those were "available" already. I tried finding out on how to "create" a hal pin but I cant find much, probably because I dont know exactly what I am looking for.

A lot of assumptions from my part and probably mostly wrong ones.

Error msg while using
net critical-pin qtplasmac.ext_out_0 => hm2_7i96.0.ssr.00.out-00
and having button code point to
critical-pin
is HAL-pin "critical-pin" does not exist.

BUT using Button code: qtplasmac.ext_out_0 now works...

So I am understanding something comletly incorrectly, sorry about that. Now that this qtplasmac.ext_out_0 button code works it makes sense why the net doesnt (button code asking for a hal pin, not a net).
Last edit: 12 Nov 2021 11:46 by RDA. Reason: Forgot the error msg...

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

More
13 Nov 2021 03:47 #226278 by rodw
It is quite complicated initially to understand. My choice of critical-pin as a signal name may have confused you.
components have pins and they are connected using signals. These equate to electronic hardware where chips have pins and they are connected by wires or tracks.

Signal names like critical-pin are totally arbitrary and are chosen by you. Others may use a less verbose method but I like to join hal together in 2 steps.
1.  create a signal (eg a wire) that is connected to a component pin
2. connect that signal to where I want it to go.

This involves a bit more typing but it works for me so it would look a bit like this:
# create  signal
net my-critical-signal <= qtplasmac.ext_out_0
#Connect to a pin
net my-critical-signal => hm2_7i96.0.ssr.00.out-00
 

So if you now decided you wanted to turn on an external LED when that was enabled you would just need to add something like:
net my-critical-signal => hm2_7i96.0.ssr.00.out-01
The following user(s) said Thank You: RNJFAB, RDA

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

More
13 Nov 2021 10:16 #226302 by RNJFAB
Thanks Rod,

I'll try this tonight on my machine.

I want to set up 2 buttons in QTPlasmac. 1 to turn/turn off the sighting laser, the second to turn on the pump to fill the water table. this one I want on a timer to enable me to press an forget knowing that it will run long enough to fill the table, but not so long that overfills or runs the pump dry.

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

Moderators: snowgoer540
Time to create page: 0.190 seconds
Powered by Kunena Forum