- Posts: 154
- Thank you received: 0
İnstall glade
- Moutomation
- Topic Author
- Offline
- Premium Member
-
Less
More
2 years 2 months ago #308866
by Moutomation
Replied by Moutomation on topic İnstall glade
Attachment not found
Please Log in to join the conversation.
- Moutomation
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 154
- Thank you received: 0
2 years 2 months ago #308867
by Moutomation
Replied by Moutomation on topic İnstall glade
I have added the terminal output.the panel name is tespanel6,testpanel-handler6.py File "/home/a/linuxcnc/configs/bluecad/python/testpanel-handler6.py", line 13
changed_value = obj.get_value()
TabError: inconsistent use of tabs and spaces in indentation
changed_value = obj.get_value()
TabError: inconsistent use of tabs and spaces in indentation
Attachment not found
Please Log in to join the conversation.
2 years 2 months ago #308868
by Aciera
Python does not like if you mix tabs and spaces for indentation. I only use spaces no tabs so I presume you used tabs to indent the additional lines of code. delete the tabs and replace with spaces.
Replied by Aciera on topic İnstall glade
Code:
File "/home/a/linuxcnc/configs/bluecad/python/testpanel-handler6.py", line 13
changed_value = obj.get_value()
TabError: inconsistent use of tabs and spaces in indentation
Python does not like if you mix tabs and spaces for indentation. I only use spaces no tabs so I presume you used tabs to indent the additional lines of code. delete the tabs and replace with spaces.
Please Log in to join the conversation.
2 years 2 months ago #308869
by Aciera
Replied by Aciera on topic İnstall glade
You can just use the command without the optional '-l'. This should bring up the config picker window:
or you can directly provide it with the .ini you want to open:
Code:
linuxcnc
or you can directly provide it with the .ini you want to open:
Code:
linuxcnc <your_path_here>/<your_ini>.ini
Please Log in to join the conversation.
- Moutomation
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 154
- Thank you received: 0
2 years 2 months ago #308871
by Moutomation
Replied by Moutomation on topic İnstall glade
I start working at 6 in the morning. I work on this project for an average of 15 hours every day. Thank you very much for everything. I'm a little overwhelmed and confused, maybe that's why I can't do it. I'll take a break, get my mind together and try again.
Please Log in to join the conversation.
- Moutomation
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 154
- Thank you received: 0
2 years 2 months ago #308872
by Moutomation
Replied by Moutomation on topic İnstall glade
Right now I'm stuck on two issues: 1. Interfering with the hal parameters, 2. Changing the value of a variable in the hal from the g code file and displaying it in the gui. I think I should rest a little and try again when I'm fitter.
Please Log in to join the conversation.
2 years 2 months ago #308873
by Aciera
Replied by Aciera on topic İnstall glade
here is the relevant function as posted above:
Code:
def on_value_changed(self,obj,data=None):
changed_value = obj.get_value()
hal.set_p("near_speed.difference",str(changed_value))
Please Log in to join the conversation.
2 years 2 months ago #308875
by Aciera
Replied by Aciera on topic İnstall glade
I don't know what you use to edit your python code. 'Geany' is a simple editor that does a good job and can be easily installed with
In the menu go to 'View' and activate 'Show White Space' to see spaces and tabs:
Code:
sudo apt install geany
In the menu go to 'View' and activate 'Show White Space' to see spaces and tabs:
Attachment not found
Please Log in to join the conversation.
- Moutomation
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 154
- Thank you received: 0
2 years 2 months ago #308880
by Moutomation
Replied by Moutomation on topic İnstall glade
It works now, thank you very much.
Can you give me an example, how can I transfer a variable in the g code file to a variable on the status pin? For example, how can I connect the value #100 to the classicladder or hal pin?
Can you give me an example, how can I transfer a variable in the g code file to a variable on the status pin? For example, how can I connect the value #100 to the classicladder or hal pin?
Please Log in to join the conversation.
2 years 2 months ago #308882
by Aciera
will set the halpin 'motion.analog-out-00' to the value in parameter #100:
linuxcnc.org/docs/devel/html/gcode/m-code.html#mcode:m68
Replied by Aciera on topic İnstall glade
Code:
M68 E0 Q#100
will set the halpin 'motion.analog-out-00' to the value in parameter #100:
Attachment not found
linuxcnc.org/docs/devel/html/gcode/m-code.html#mcode:m68
Please Log in to join the conversation.
Time to create page: 0.136 seconds
