Advanced Search

Search Results (Searched for: )

  • Korre
  • Korre
26 Sep 2025 09:03 - 26 Sep 2025 09:09

best practice Benutzervariablen anzeigen und speichern

Category: Deutsch

Vielen Dank für Eure Antworten, 

1. Parameterwert in einen Analog Hal pin schreiben (zB M68 E0 Q#31)

2. Parameterwert mit Gcode logging in eine Datei schreiben

1.) Parameterwert in Hal Pin werde ich testen. 
2.) Gcode logging: das praktiziere ich bereits, ist aber nicht so ganz "bequem" 

Über Debug kann man sich das im Fenster vorne ausgeben lassen. Z. B. #1234 = 12 + 32 ( debug, #1234 )
es gibt auch noch msg, und print, jenachdem ob es im terminal stehen soll oder vorne erscheinen soll

 
Der Befehl ist mit schon sehr wohl bekannt. Habe ich im Eröffnungsthread ja geschrieben.....
Nur wenn ich ein CNC Programm ablaufen lasse, Dann verschwindet das untere Fenster (F) und anstelle dem wird das CNC Programm angezeigt.
Wie bleibt dieses Ausgabefenster erhalten (für Statusreports und Fehlermeldungen) während das NC Programm ausgeführt wird?
(siehe Anhang!)


 

 
  • Hakan
  • Hakan
26 Sep 2025 07:56 - 26 Sep 2025 11:45

(Solved) Initialization code for a rintelligent ECT60 fails when run on an ECR60

Category: Driver Boards

"Invalid output mapping" is what it says. infosys.beckhoff.com/english.php?content...stem/1058704779.html
What I think you should do is minimize the config to one slave, slave 0, and make that go OP.
Comment out all references to the other slaves lcec.0.1 and lcec.0.2 in the hal files.
Comment out/remove all sdoconfigs from ethercat-conf.xml and only leave slave 0 in there.
Comment out pdos, leave 6040, 6060, 607a, 6041,6061,6064 only.
With that, the slave should go to OP mode, check with "ethercat slaves".
Then gradually bring back the mods you took out, and fix what doesn't work.
  • blazini36
  • blazini36
26 Sep 2025 03:18

LinuxCNC RT blindspots (I2C and UART/Serial)

Category: Driver Boards

There's been a couple of things I was thinking about for a while and the more I dig in the more I wonder about why they haven't become a thing with LinuxCNC. When I have other uses for something I tend to think "will this work with LinuxCNC too?" I suppose everyone gets used to doing things a certain way and only pick up new things if they are the hot new thing (like EtherCAT). There are probably a couple of interfaces that are "just there" that should technically be fully realtime capable. I think alot of it also stems from the fact that when people were using parallel ports on desktop motherboards, Mesa popped up with PCI and Ethernet cards and that's just the way it went. Nowadays I like to use mini-PCs like Odroid H3/H4, I still use some H2's as well. These have UART and I2C ports right on the "GPIO" header, interestingly the GPIO header doesn't actually have GPIO. I use these because they're cheap, small and have 2 ethernet ports. I would still use a Mesa Ethernet card for most bigger things but I run into alot of cases where they don't have anything convenient to use in the place I want to use it. The reason (besides being readily available) that I would think about UART and I2C is that they are simple and easier to deal with for something custom.

Unless I'm missing something, both UART and I2C should be fully realtime capable. Niether is the fastest interface out there but I don't think they really have to be. The appeal for I2C is there are already a bunch of kernel drivers for specific ICs, IO expanders like MCP23017. Currently these are only used in userspace components etc., but if the interrupt output is used I think it can meet RT expectations, especially if you can run the bus at 1Mhz+. I've gotten these IO expanders to work with the kernel driver on the H-series as I needed something to register as a gpiochip for use with other kernel drivers. The LinuxCNC RT bits just don't exist yet. The thing about it is there are clockgens, ADCs, etc,  that all have kernel drivers. There obviously needs to be a hal compenent for this stuff, I'm going to play with it soon but what it seems to me is that if the HAL environment existed, you could literally breadboard a controller based on just I2C chips that have suitable kernel drivers. There's a limit of chips that can be strung in there before transaction queues start to build up but besides that, I think this could be a thing. SPI could be used in much the same vein as many I2C chips have SPI variants and generally have an associated kernel driver.

UART/Serial is also probably realtime capable as a host interface (NOT USB serial). Again Ethernet is better but AFAIK I think Intel UARTs can be run at over 3 Mbaud, that's pretty quick but I'll have to test that as I've never actually seen or heard of it being done. I wouldn't expect this to be super popular since again there are better ways to do this but the main reason I'd want to use UART is for a control panel host. Right now I'm using Arduino Connector to a custom board running a Teensy 4.1. It works, it's fine but Arduino Connector is userspace/Python. Typical use is with the USB serial port, should be usable with a UART instead but probably not gaining anything being userspace. I'd like to replace Arduino Connector with a realtime UART setup to the Teensy board. At this point I'll probably just switch to an ESP32 S3 for other reasons but I don't want to deal with anything like Ethernet. This is something else that needs HAL implimentation but I will start with some simple tests just to see what I can do with it.

I'm curious if I'm missing anything from a bus/hardware perspective. I'm not concerned with why these aren't already popular choices, I think I've already mentioned that. More concerned with what I might be missing as far as implimenting them goes. I can't find a great reason why either of these wouldn't be perfectly fine to use as RT interfaces, albeit with some limitations.

 
  • thanks for the help
  • thanks for the help
26 Sep 2025 02:29
Replied by thanks for the help on topic Tool height setter M6 subroutine question

Tool height setter M6 subroutine question

Category: General LinuxCNC Questions

Thank you for the response, Based on your idea of the #5400 I tried this code, but no luck: here is the current status of my toolchange.ngc
O<toolchange> SUB

(MSG, Toolchange subroutine called)
(MSG, Tool number param #1 = #1)
#2 = #5400
#<tool_num> = #2
;#<setter_z> = -3.0
#<safe_z> = -.5 ; safe Z height above tool setter
#<probe_z> = -4.0 ; how far down to probe
#<setter_z> = -3.0 ; Z height of the setter in machine coords

G49 ; cancel length offset
G53 G90 G01 X1.0 Y0 F50. Z[#<safe_z>] ; move above setter

; Begin probing
G38.2 Z[#<probe_z>] F1.0
(If probe failed, LinuxCNC will stop here)

#<measured_z> = #5063 ; captured machine Z from probe

(MSG, 5063)

; Compute tool length

(MSG, Compute tool length)

#<tool_length> = [#<measured_z> - #<setter_z>]

; Store to tool table
(--- Optional: print value to operator ---)
(MSG, Tool length = #<tool_length>)

G10 L1 P#<tool_num> Z#<tool_length>

G43 H#<tool_num>

; Done
O<toolchange> ENDSUB
M2

I feel my problem lies in the fact that my tool number is not getting passed to the tool.tbl When I enter (debug #5400) in MDI get 0.0000 after entering in a T1 M6 command in MDI, I assume that I would see a 1 for T1? My tool height seem to be registering. When I enter (debug #5063) the z value from the tool setter shows up as the #5063. I am still getting the Pvalue out of range with G10 L1 error after the probe is tripped when the G38.2 part of my file runs.

I made this change to my hal.io:

loadusr -W hal_manualtoolchange
net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number
net tool-change iocontrol.0.tool-change => hal_manualtoolchange.change
net tool-changed iocontrol.0.tool-changed <= hal_manualtoolchange.changed
net tool-prepare iocontrol.0.tool-prepare => iocontrol.0.tool-prepared

Here are some parts of my ini file:

[RS274NGC]
REMAP = M6 modalgroup=6 ngc=toolchange
SUBROUTINE_PATH = /home/dave/linuxcnc/configs/by_interface.pico.univpwmv/subroutines/
#/home/dave/linuxcnc/configs/by_interface.pico.univpwmv/subroutines/
PARAMETER_FILE = linuxcnc.var
FEATURES = 12


TOOL_TABLE = tool.tbl

RETAIN_TOOL_NO = 1

TOOL_CHANGE = manual
Displaying 13321 - 13324 out of 13324 results.
Time to create page: 0.886 seconds
Powered by Kunena Forum