Advanced Search

Search Results (Searched for: )

  • Hakan
  • Hakan
10 Oct 2025 06:43

Controlling spindle using python scripts and Modbus TCP

Category: General LinuxCNC Questions

Sounds like a user component.

There are some examples, for example the mitsub_vfd.py here github.com/LinuxCNC/linuxcnc/tree/master/src/hal/user_comps
  • Aciera
  • Aciera's Avatar
10 Oct 2025 05:37
  • davidgill
  • davidgill
10 Oct 2025 03:36

Controlling spindle using python scripts and Modbus TCP

Category: General LinuxCNC Questions

Hi All,
I have been playing with this for days and have not cracked it. I was using AI for answers but every solution failed. I want to do the following. I have the python code sorted but getting LinuxCNC to call the python scripts seems to be the problem. The python script sets the Modbus TCP registers on the VFD.Spindle forward, pass the value 1 to my python script as an argSpindle reverse, pass the value 2 to my python script as an argStop spindle, pass the value 5 to my python script as an argSpindle speed, pass a value between 0 and 200 to a python script.can anyone offer a solution. Cheers
 
  • Hendrixx
  • Hendrixx
10 Oct 2025 02:46
Any progress on QTLazerC or was created by Hendrixx

Any progress on QTLazerC or

Category: Other User Interfaces

The last cool thing i remeber reading or putting any effort into was the gentleman from Proma on a Monokrom thread asking people to beta test his. Capactive THC Analog DC converter, I wonder how that went? And then ther was the makerspace that hacked together a usable motion control to build their fiber system from some clever manipulation of QTPlasma . other then finding a laser power source which will happen sooner then laater "fingers cross" 
  • d3m0n54in7
  • d3m0n54in7
10 Oct 2025 00:55
MPG pendant interface 7I96s was created by d3m0n54in7

MPG pendant interface 7I96s

Category: HAL

Since I was last asking for assistance, I opted to switch over to a 7I96s board. I am having issues getting a cheap MPG pendant to jog axes in the Axis GUI. I have confirmed that the encoder works as well as the dead-man switch allows the signals I've designated as axis selectors and step values to trigger appropriately. I have seen forum posts about joint vs axis jog being toggled through the use of homing. (joint vs teleop) I utilize the Home all button to zero out the display before attempting to jog any axis. Using Halshow, I am able to see the joint-select-(a-d) and joint-incr-(a-d) trigger as well as the axis-selected-count value count up and down. I used the PNC wizard to setup the pinouts and didn't see "Axis select" as an option but did have "Joint select" available. I assume, based on what I've read about the 2.9 update that this wouldn't be an issue as I'm just using a standard 3 axis cartesian XYZ setup with possible expansion to XYZA once I have more confidence in using Linux CNC to actually run my machine.
It's probably something overly simple like linking joints to axes in a different way than PNC did by default or just a need to add a switch to convince the machine that it's been homed.
I've attached the Hal and Ini files for review.
  • nanowhat
  • nanowhat
09 Oct 2025 23:41
Replied by nanowhat on topic Axis control via ModbusTCP

Axis control via ModbusTCP

Category: General LinuxCNC Questions

I am running LinuxCNC 2.9.4 from the official repository, but it seems that modbus functions 1 and 5 aren't available. (loading my partial mb2hal config file at halrun throws "[fnct_05_write_single_coil] out of range") I read that Linuxcnc 2.8 didn't support those functions, but that 2.9 should. What am I missing?
  • ChrisB_II
  • ChrisB_II's Avatar
09 Oct 2025 21:27
Replied by ChrisB_II on topic Axis configuration not fully working on 2.9.6

Axis configuration not fully working on 2.9.6

Category: AXIS

I've gone back to 2.9.4 because of a similar problem with 2.9.5/6.
At first all buttons on the pendant work fine until I try to call an MDI_COMMAND_xx. The command itself is not executed but afterward there is a zombie process and most of the buttons on the pendant stop working. In halshow all buttons and connected signals still show activity - even MDI_COMMAND_xx are getting called - but nothing happens. After restarting linuxcnc everything ist back to normal. With 2.9.4 this does not happen! Seems like something is wrong in 2.9.5/6...
  • nanowhat
  • nanowhat
09 Oct 2025 21:23
Axis control via ModbusTCP was created by nanowhat

Axis control via ModbusTCP

Category: General LinuxCNC Questions

I have been fighting these iX7NH drives for several days and they still won't reliably communicate via ethercat. However, they talk ModbusTCP just fine. What's the best way to control axis drives via ModbusTCP? The machine being driven is a pallet changer for a milling machine, so path accuracy doesn't matter, only endpoint repeatability. I figure it won't matter that I can't have CSP mode.

In order to make the drive move the motor, I have to:
  1. Set coil 0x12 == 1 (SV_ON: This enables the drive output)
  2. Specify movement speed (register 0x6034), acceleration (register 0x6036), and deceleration (0x6038)
  3. Specify the target position (register 0x6025)
  4. Set the control word (register 0x6001) to 0x30, then immediately to 0x20 (I tried this without linuxCNC, in Python, with no delay between the statements, and the servo system executed the move correctly)
Step 1 only has to happen once, step 2 whenever the application requires it, and steps 3/4 whenever a movement must happen.
It seems that I could use MB2HAL to create HAL pins for coil 0x12, registers 0x6034, 0x6036, 0x6038, and 0x6025, and data from LinuxCNC's motion planner would sail right through to the drives, but what about the control word register?
I have to set and then clear bit 5 whenever I want the drives to make a movement.
  • Hendrixx
  • Hendrixx
09 Oct 2025 20:21
Replied by Hendrixx on topic XHC-WHB04B-04 Got it working

XHC-WHB04B-04 Got it working

Category: Advanced Configuration

You're welcome, I'm glad you got it worked out. On the topic of separate machines, the logic is there and holds water; it's almost like multiprocess welders, unless you drop some serious money, you're compromising. And I, for one reason or another in the past, needed both couldn't afford both, or didnt have the space, I know I'm basically handicapping the machine, whichever gui is loaded but not ot the point, parts are out spec, or customers bringing stuff back. The plan is to build another machine for a 3 to 5k fiber laser, ditch the plasma altogether, and mount an ATC spindle and vacuum holding to this current one. I've been really good this year, hopefully a smoking deal comes through on BidSpotter for a laser source. This is the 5th iteration of a CNC gantry-style machine I've built. I went HAM on it just because I'm tired of being tired of not being satisfied with it.  The .5" flat bar on top has a reference shoulder machined in and a skimmed on both sides im gonna use jack screws every 12" or so in pairs to get this thing as coplanar, square and level as pyhics will allow, me to and then use a metalized epoxy to bed the bar to the frame and finaly a few stitch welds to lock it in.  ce la vie i gues. Your set up is pretty gangster 

 
  • Doc_emmet
  • Doc_emmet
09 Oct 2025 19:39
Replied by Doc_emmet on topic REMAP=M6 modalgroup=6 python=atc_toolchange

REMAP=M6 modalgroup=6 python=atc_toolchange

Category: Advanced Configuration

Hello, what is the content of toplevel.py?

import oword
import remap
  • PCW
  • PCW's Avatar
09 Oct 2025 19:35
Replied by PCW on topic Stepper Motor Speed is too slow

Stepper Motor Speed is too slow

Category: Basic Configuration

FF0 should be 0
  • RLA
  • RLA
09 Oct 2025 18:59
Replied by RLA on topic AC Servo change to run

AC Servo change to run

Category: General LinuxCNC Questions

Thanks for reply..so I just need to lookup how to configure as spindle...no wiring...speed controlled by gcode?...motor driver would need parameters changed or can that be done through linuxcnc?

Thanks again!!
  • Todd Zuercher
  • Todd Zuercher's Avatar
09 Oct 2025 18:50
Replied by Todd Zuercher on topic Gmoccapy tool setter install "errors"

Gmoccapy tool setter install "errors"

Category: Gmoccapy

The problem is that you can not reuse a hal pin anywhere in that hal file or another hal file. However you can connect multiple hal input pins to a hal signal name (but only one hal output pin).

Not seeing what you have going on in your other hal files I think this might get you going change this line in your post gui hal file from:
net tool-change gmoccapy.toolchange-change <= iocontrol.0.tool-change
to:
net tool-change-request iocontrol.0.tool-change

That may still not get your config working, if you have other similar mistakes in your postgui hal file. But it will get you on to the next one.
  • Fastfred
  • Fastfred
09 Oct 2025 18:27
Gmoccapy tool setter install "errors" was created by Fastfred

Gmoccapy tool setter install "errors"

Category: Gmoccapy

Hi need some advice I tried to do this much as possible on my own but ran into a error not sure whats the best way to get around it.Looks like i have two pins for tool change ? 

File Attachment:

File Name: linuxcnc.report.txt
File Size:10 KB

File Attachment:

File Name: linuxcnc.report.txt
File Size:10 KB

File Attachment:

File Name: custom_postgui.hal
File Size:0 KB

File Attachment:

File Name: CNC.ini
File Size:6 KB
  • Todd Zuercher
  • Todd Zuercher's Avatar
09 Oct 2025 17:59
Replied by Todd Zuercher on topic Setting Values in INI vs HAL

Setting Values in INI vs HAL

Category: Basic Configuration

For one, thing the "Calibration" window will not show that as a tune-able option in the calibration window.
Displaying 8971 - 8985 out of 16970 results.
Time to create page: 0.364 seconds
Powered by Kunena Forum