Plasma component in Gmoccapy
15 Jan 2017 03:39 #85805
by rodw
Plasma component in Gmoccapy was created by rodw
Guys,
I'm using a mesa 7i76e and a THCAD-10 card
I just moved my config from axis GUI to gmoccapy which was surprisingly painless
Well that is until I tried to connect my THC pins to gmoccapy
The plasma sim has this line
so I assumed all I needed to do was change it to
The system then complains that plasma.hal_lbl_cur_volt does not exist. The plasma component is loaded when i Look in halshow so I'm not really sure what I've done wrong. Any help would be appreciated.
I'm using a mesa 7i76e and a THCAD-10 card
I just moved my config from axis GUI to gmoccapy which was surprisingly painless
Well that is until I tried to connect my THC pins to gmoccapy
The plasma sim has this line
net curvolt plasma.Target-Voltage => plasma.hal-lbl-cur-volt
so I assumed all I needed to do was change it to
net curvolt thc.volts => plasma.hal_lbl_cur_volt
The system then complains that plasma.hal_lbl_cur_volt does not exist. The plasma component is loaded when i Look in halshow so I'm not really sure what I've done wrong. Any help would be appreciated.
Please Log in or Create an account to join the conversation.
15 Jan 2017 12:43 #85813
by newbynobi
Replied by newbynobi on topic Plasma component in Gmoccapy
Hallo rodw,
I am pretty sure, that you do load the mentioned line in a normal hal file.
As the plasma stuff are just different embedded tabs, you have to put that line in hal file, that is loaded with the embedded tab.
The tab is loaded as follows:
In your case the mentioned line need to be in the plasma.hal file.
The reason is, that the embedded tabs are loaded after the GUI is displayed, so the hal pin are not available at earlier time, that after loading the embedded tab.
Norbert
I am pretty sure, that you do load the mentioned line in a normal hal file.
As the plasma stuff are just different embedded tabs, you have to put that line in hal file, that is loaded with the embedded tab.
The tab is loaded as follows:
EMBED_TAB_NAME = coolant_spindle_panel
EMBED_TAB_LOCATION = box_coolant_and_spindle
EMBED_TAB_COMMAND = gladevcp -x {XID} -u plasma.py -H plasma.hal plasma.glade
In your case the mentioned line need to be in the plasma.hal file.
The reason is, that the embedded tabs are loaded after the GUI is displayed, so the hal pin are not available at earlier time, that after loading the embedded tab.
Norbert
Please Log in or Create an account to join the conversation.
- islander261
- Offline
- Platinum Member
Less
More
- Posts: 757
- Thank you received: 216
15 Jan 2017 17:58 #85832
by islander261
Replied by islander261 on topic Plasma component in Gmoccapy
rodw
You have used different names for the pins. Underscores are not the same as dashes. I do this all the time because I type so poorly.
John
You have used different names for the pins. Underscores are not the same as dashes. I do this all the time because I type so poorly.
John
Please Log in or Create an account to join the conversation.
- islander261
- Offline
- Platinum Member
Less
More
- Posts: 757
- Thank you received: 216
15 Jan 2017 18:01 #85833
by islander261
Replied by islander261 on topic Plasma component in Gmoccapy
Sorry
I will post my working HAL lines for the THCad when I get to my linux machine.
John
I will post my working HAL lines for the THCad when I get to my linux machine.
John
Please Log in or Create an account to join the conversation.
- islander261
- Offline
- Platinum Member
Less
More
- Posts: 757
- Thank you received: 216
15 Jan 2017 18:38 #85834
by islander261
Replied by islander261 on topic Plasma component in Gmoccapy
rodw
Here are excepts from my HAL files. The arc voltage display and settings are working as far as I can tell from connecting an external voltage source to the THCad input.
From main HAL file:
This is from one of my auxilary HAL files:
I have two sources of arc volts shown because I was testing the scale component for for scaling the TCHad output. Note that I have two places on my screen that display the arc volts. One is on a tab in the main screen and one is on a tab with other tabs in the preview location.
John
Here are excepts from my HAL files. The arc voltage display and settings are working as far as I can tell from connecting an external voltage source to the THCad input.
From main HAL file:
#*******************
# THC stuff
#*******************
# save for future THC with PID
setp pid.thc.Pgain 10
setp pid.thc.Igain 1
setp pid.thc.bias 0
setp pid.thc.Dgain 0
setp pid.thc.FF0 0
setp pid.thc.FF1 0
setp pid.thc.FF2 0
setp pid.thc.deadband 1
setp pid.thc.maxoutput 100
#setp pid.thc.error-previous-target true
#net thc-index-enable <=> pid.thc.index-enable
#net thc-enable => pid.thc.enable
#net thc-vel-cmd-rpm => pid.thc.command
#net thc-vel-fb-rpm => pid.thc.feedback
net scaled_arcvolts scale.arcvolts.out => pid.thc.feedback
#net thc-output <= pid.thc.output
# ---Encoder Setup for THC--
setp hm2_7i76e.0.encoder.00.counter-mode 1
setp hm2_7i76e.0.encoder.00.filter 0
setp hm2_7i76e.0.encoder.00.scale -1
net thc-vel-in hm2_7i76e.0.encoder.00.velocity => thc.encoder-vel
# Value for my THCad card
setp thc.scale-offset 124400
#Value for my THCad card and voltage divider (18.94181:1)
setp thc.vel-scale .0002238191
#this may need changing
setp thc.correction-vel .0001
#this starts arc
net Torch_On and2.torch-enable.out
#starts motion on arc transfer to work this will need to change for my setup
net arcok thc.arc-ok motion.digital-in-00
#*********************************
# experimental use of components for testing future THC enhancements
#********************************
#these settings are scaling encoder counts to arcvolts using scale component
#Value for my THCad card and voltage divider (18.94181:1)
setp scale.arcvolts.gain .0002238191
# Value for my THCad card 124400 * .0002238191*-1
setp scale.arcvolts.offset -27.843
net thc-vel-in scale.arcvolts.in
#these settings are to get the arc voltage rate of change
net scaled_arcvolts ddt.arcvolts_rate.in
This is from one of my auxilary HAL files:
#link arc voltage to both tabs
net curvolt_tab thc.volts => plasma_tab.hal-lbl-cur-volt-tab
net scaled_arcvolts plasma.hal-lbl-cur-volt
#link target voltage values between tabs
net target_volts_tab plasma_tab.Target-Voltage => plasma.hal_lbl_target_voltage_main
I have two sources of arc volts shown because I was testing the scale component for for scaling the TCHad output. Note that I have two places on my screen that display the arc volts. One is on a tab in the main screen and one is on a tab with other tabs in the preview location.
John
Please Log in or Create an account to join the conversation.
15 Jan 2017 20:22 #85847
by rodw
Norbert, thanks, I think this is my problem. I copied my .hal and .ini files over from another config into a fresh plasma sim config and went to town on them. My Ini file is still pointing at plasma.hal, not the .ini file I am editing. Thanks a lot!
I've got all the THC signals tested and working except for the interface to the GUI which I'm just starting on. Once I get that done, I want to try a few things in the THC component.
Replied by rodw on topic Plasma component in Gmoccapy
Hallo rodw,
I am pretty sure, that you do load the mentioned line in a normal hal file.
As the plasma stuff are just different embedded tabs, you have to put that line in hal file, that is loaded with the embedded tab.
The tab is loaded as follows:EMBED_TAB_NAME = coolant_spindle_panel EMBED_TAB_LOCATION = box_coolant_and_spindle EMBED_TAB_COMMAND = gladevcp -x {XID} -u plasma.py -H plasma.hal plasma.glade
Norbert, thanks, I think this is my problem. I copied my .hal and .ini files over from another config into a fresh plasma sim config and went to town on them. My Ini file is still pointing at plasma.hal, not the .ini file I am editing. Thanks a lot!
John, the typo is just confined to the forum post above. I had it right in my hal file. Thanks for posting your config. I will review it. We are both on the same journey just mine is slower as I have to build everything, not just retrofit an existing table...rodw
You have used different names for the pins. Underscores are not the same as dashes. I do this all the time because I type so poorly.
John
I've got all the THC signals tested and working except for the interface to the GUI which I'm just starting on. Once I get that done, I want to try a few things in the THC component.
Please Log in or Create an account to join the conversation.
17 Jan 2017 11:24 #85901
by rodw
Well, I'm glad we are all back online
I'm still having trouble with this. I've got all the THC component working in my main hal file but this line breaks the plasma display section in gmoccapy.
Can plasma.hal access components in the main hal file?
I've had a couple of distractions but my next step was to move all of the THC stuff into plasma.hal. Is that necessary?
Replied by rodw on topic Plasma component in Gmoccapy
Guys,
so I assumed all I needed to do was change it tonet curvolt thc.volts => plasma.hal_lbl_cur_volt
Well, I'm glad we are all back online
I'm still having trouble with this. I've got all the THC component working in my main hal file but this line breaks the plasma display section in gmoccapy.
Can plasma.hal access components in the main hal file?
I've had a couple of distractions but my next step was to move all of the THC stuff into plasma.hal. Is that necessary?
Please Log in or Create an account to join the conversation.
- islander261
- Offline
- Platinum Member
Less
More
- Posts: 757
- Thank you received: 216
17 Jan 2017 16:37 #85949
by islander261
Replied by islander261 on topic Plasma component in Gmoccapy
rodw
The short answer is yes you can spread the hal instructions around, just be careful with naming. No you do not have to consolidate all of the THC related stuff in one hal file. All of my THC setup and main connections are in my main HAL file and then the voltage display connections are in another as you are doing. The easiest way I found to sort these problems out (and believe me I have had plenty) is to start Linuxcnc from a terminal and look at the error messages. Post your HAL and .ini files and we'll have a look. It really took me a while to get the hang of multiple tabs, .py files and hal files. Mine still doesn't work perfect but is close, a recurring problem on reloading persistent variables that I don't know how to trouble shoot..
John
The short answer is yes you can spread the hal instructions around, just be careful with naming. No you do not have to consolidate all of the THC related stuff in one hal file. All of my THC setup and main connections are in my main HAL file and then the voltage display connections are in another as you are doing. The easiest way I found to sort these problems out (and believe me I have had plenty) is to start Linuxcnc from a terminal and look at the error messages. Post your HAL and .ini files and we'll have a look. It really took me a while to get the hang of multiple tabs, .py files and hal files. Mine still doesn't work perfect but is close, a recurring problem on reloading persistent variables that I don't know how to trouble shoot..
John
The following user(s) said Thank You: rodw
Please Log in or Create an account to join the conversation.
19 Jan 2017 11:05 #86139
by rodw
Replied by rodw on topic Plasma component in Gmoccapy - BUG REPORT
Well, I've resolved this error. Its a bug in Gmocappy plasma sim and Islander spotted it earlier, so thanks John! Also thanks to the tip to run from the command line
This line was generated when I created a brand new sim from the LInuxcnc chooser.
A gmocappy plasma sim generates this plasma.hal file that uses underscores (_) where it should be using hyphens. (-)
Now if I had chosen any other signal, the bug would not have bitten.
So to wrap this up, can somebody confirm that building my config in plasma.hal is best practice?
This line was generated when I created a brand new sim from the LInuxcnc chooser.
# plasma.hal_lbl_cur_volt (float)
A gmocappy plasma sim generates this plasma.hal file that uses underscores (_) where it should be using hyphens. (-)
############### plasma hal pins ####################
# out pin
# plasma.CHL-Threshold (float)
# plasma.enable-HeightLock (bool)
# plasma.enable-HeightLock-not (bool)
# plasma.hal-btn-torch-not (bool)
# plasma.hal-btn-torch (bool)
# plasma.Target-Voltage (float)
# plasma.THC-Speed (float)
# plasma.Piercing-autostart-not (bool)
# plasma.Piercing-autostart (bool)
# plasma.Pierce-Gap (float)
# plasma.Pierce-Delay (float)
# plasma.G0-Gap (float)
# plasma.Cut-Gap (float)
# in pin
# plasma.led-pos-limit (bool)
# plasma.led-neg-limit (bool)
# plasma.hal-lbl-corr (float)
# plasma.hal_lbl_cur_volt (float)
# Hook up plasma pins using the net command
# for simulation mode we connect them directly
net torch plasma.hal-btn-torch => signals.led-torch-on => signals.led-arc-ok
net curvolt plasma.Target-Voltage => plasma.hal-lbl-cur-volt
Now if I had chosen any other signal, the bug would not have bitten.
So to wrap this up, can somebody confirm that building my config in plasma.hal is best practice?
Please Log in or Create an account to join the conversation.
19 Jan 2017 21:04 #86198
by rodw
Replied by rodw on topic Plasma component in Gmoccapy
Hmm, there is also a problem in signals.hal. Pin names do not agree with what is used in signals.glade so the tab does not load
I've only had time to attach one signal. Once complete I will post all errors as a bug report.
I've only had time to attach one signal. Once complete I will post all errors as a bug report.
Please Log in or Create an account to join the conversation.
Time to create page: 0.339 seconds