Advanced Search

Search Results (Searched for: )

  • Aciera
  • Aciera's Avatar
17 Nov 2024 10:37 - 17 Nov 2024 10:46
Replied by Aciera on topic How to move a variable value with G-code

How to move a variable value with G-code

Category: G&M Codes

If you do not need to interact with a running gcode program then you could simply use the pyhton interface to send mdi commands
import linuxcnc
s = linuxcnc.stat()
c = linuxcnc.command()

def ok_for_mdi():
s.poll()
return not s.estop and s.enabled and (s.homed.count(1) == s.joints) and (s.interp_state == linuxcnc.INTERP_IDLE)


x = 1.23
y = 2.34
if ok_for_mdi():
   c.mode(linuxcnc.MODE_MDI)
   c.wait_complete() # wait until mode switch executed
   c.mdi("G0 X%s Y%s " % (x, y))


If you need to interact with running Gcode then use 'motion.*' pins.

1.  Get your python script to create hal pins. Example:

import hal
self.hal = hal.component("vision")
self.hal.newpin("enable", hal.HAL_BIT, hal.HAL_IN)
self.hal.newpin("done", hal.HAL_BIT, hal.HAL_OUT)
self.hal.newpin("input_value", hal.HAL_FLOAT, hal.HAL_IN)
self.hal.newpin("output_value", hal.HAL_FLOAT, hal.HAL_OUT)
self.hal.ready()

2.  Connect those hal pins to motion.* pins. Example:

net camera-enable <= motion.digital-out-00 => vision.enable
net camera-done <= vision.done => motion.digital-in-00
net camera-val-in <= motion.analog-out-00 => vision.input-value
net camera-val-out <= vision.output-value => motion.analog-in-00

3. in gcode read the motion.* pins and store in a variable:

m66 p0 l3 q2    ; wait for vision.done to go HIGH with 2 seconds timeout
o100 if [#5399 le 0]    ; timeout occured
    #1000 = 0
    (DEBUG, vision: timeout)
o100 else
    m66 e0 l0    ; read vision.output-value which is stored in #5399
    #1000 = [#5399]
o100 endif
  • LabOuest
  • LabOuest
17 Nov 2024 10:15
Replied by LabOuest on topic Remora - Does Analog input syntax exist?

Remora - Does Analog input syntax exist?

Category: Computers and Hardware

Hello again,
I'm struggling with the infamous following error when I try to go faster than about 2300mm/min.
I'm running my steppers at 1000 steps/mm as is required by my application.
I've read through this topic and the stepper tuning doc but I can't seem to figured it out.
Does my servo thread latency matters ?
I'm still running the default configs beside the JOINT SCALE set to 1000.

I was also thinking that this issue could be due to the default signal timing being to long for remora to keep up.
How and where do I configure the stepgen timing with remora ?
See the attached timing requirements for my drivers.
 
  • Grotius
  • Grotius's Avatar
17 Nov 2024 09:29
Replied by Grotius on topic Trajectory Planner using Ruckig Lib

Trajectory Planner using Ruckig Lib

Category: General LinuxCNC Questions

@Collins,

Using a base thread of 20,000ns = 50.000 HZ

Example 0:
Suppose the encoder has P=10,000 pulses per revolution and the machine rotates at
R=3 revolutions per second.
f=10,000×3=30,000 Hz

Example 1:
Suppose the encoder has P=10,000 pulses per revolution and the machine rotates at
R=6 revolutions per second.
f=10,000×6=60,000 Hz

I see the problem. At high speeds, and high encoder resolution, it just can't keep
up with the second example.

***
For ethercat to get device information, i poked around in the etherlab's source and
found a solution.

Made a file to hold device data : device data struct (this data is equvalent to the "$ ehtercat xml" command.)
Add a few function's in the tool section of ethercat's source code : .h file   cpp.file
Recompile ethercat...

And then when we start the realtime app, it retrieves all the ethercat information there is by
using the get info function.

This works perfect.

We now have all the ethercat data (master info, slave info) at startup.
This is then the moment to automaticly create hal pins etc. Let's try this.
  • shaying526
  • shaying526
17 Nov 2024 09:23
How to move a variable value with G-code was created by shaying526

How to move a variable value with G-code

Category: G&M Codes

I'm a beginner, I need to use G-code to move a value that may change.
This value comes from my vision camera, which is used to correct the positional deviation of my workpiece.
What I can currently think of is to write a Python script to generate G-code each time before it is called.
What is a more common method to achieve this?
Which chapter of the document should I read?
  • LabOuest
  • LabOuest
17 Nov 2024 08:18
Replied by LabOuest on topic Remora - Does Analog input syntax exist?

Remora - Does Analog input syntax exist?

Category: Computers and Hardware

I understand, thank you Scotta.
  • Aciera
  • Aciera's Avatar
17 Nov 2024 08:10 - 17 Nov 2024 08:19
Replied by Aciera on topic Fast Hole EDM from Hacked Parts

Fast Hole EDM from Hacked Parts

Category: General LinuxCNC Questions

1. 'M52 P1' enables adaptive feed while 'M52 P0' disables it

2. you would bring that EDM output into HAL and create a logic that outputs a float value to the 'motion.adaptive-feed' pin. eg output some negative value if a short is detected and output 1.0 if no short is detected. That could be done using a mux2 component.

[Edit]
The range for the 'motion.adaptive-feed' pin in version 2.9 is -1..1.
In  master this has recently been expanded to  -MAX_FEED_OVERRIDE .. MAX_FEED_OVERRIDE  (As defined in the [DISPLAY] section of the ini file)  
  • Mecanix
  • Mecanix
17 Nov 2024 05:31

Strange motion offsets in one direction on one axis

Category: General LinuxCNC Questions

Those OP pics are not cool. Re-check all your terminations when you'll have a spare 143hrs. Crimps, joints, everything linked to motion/control, look for something loose. I know, it's a nightmare, takes quite a bit of time and efforts, but I'll have to throw in the highly suspect "caused by vibration".
  • Mecanix
  • Mecanix
17 Nov 2024 04:55 - 17 Nov 2024 05:14

LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)

Category: Computers and Hardware

[deleted] potentially misleading, no hands on exp. sorry ab that. 
  • Mecanix
  • Mecanix
17 Nov 2024 04:37 - 17 Nov 2024 05:13

LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)

Category: Computers and Hardware

StackExchange and EEVBlog are both fantastic venues for brainstorming and validating electrical/circuit ideas and designs, you'd find accurate answers to your questions in a finger snap and be done already. I highly doubt a Lcnc forum will be of any help. Great place for software, configs, dev, and industrial motion control hardware though, mostly.
  • Lcvette
  • Lcvette's Avatar
17 Nov 2024 04:29
Replied by Lcvette on topic 5 Axis Simulation Help needed!

5 Axis Simulation Help needed!

Category: QtPyVCP

took some figuring but have it up and running, now to tinker on the vtk.  its oging to be epic!
  :D
  • tcbmetalworks
  • tcbmetalworks
17 Nov 2024 04:09
Replied by tcbmetalworks on topic 10.5 x 25 cnc plasma table retrofit

10.5 x 25 cnc plasma table retrofit

Category: Computers and Hardware

Here is more photos   
  • tcbmetalworks
  • tcbmetalworks
17 Nov 2024 03:57
Replied by tcbmetalworks on topic 10.5 x 25 cnc plasma table retrofit

10.5 x 25 cnc plasma table retrofit

Category: Computers and Hardware

  Little update to the cnc plasma.
Red box DVD rental is going out of service and I was able to grab one from infront of a dollar general. Talked to the managers and they said go right ahead. My plan is to use the redbox for the enclosure aswell as it came with tons of components. It has a industrial grade touch screen computer monitor. A lenovo windows 7 pc. Do you think this computer would be a good Canidate to install Linux on? Some 5 wire stepper motors. A 24v power supply. About 4 foot of high quality linear rail. Infrared camera. A nice apc unit. What are your thoughts on all of this? What do you think of the 5 wire stepper and driver? Any chance of easily controlling them? It also has a 110v heater and a ac unit. I don't think I will use either of them except for the fan on the ac unit but might be a good idea. My shop has many holes in the roof literally a water fall and in the winter it gets about 45 degrees. To expensive to heat it more. 
  • mBender
  • mBender
17 Nov 2024 03:21

LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)

Category: Computers and Hardware

I changed the Y Axis motors back to the Nema 23 with the DM332T driver. 3200 Microsteps/rpm and I can go up to 6000mm/min without an issue.
Handwheel xhc-whb04b-6 is working as well.

Now I am focusing on getting Modbus and the spindle to work. This is the last thing I need to run the mill with the Tang. Can someone confirm that this wiring is correct for the Max485?
 
  • scotta
  • scotta's Avatar
17 Nov 2024 02:41
Replied by scotta on topic Remora - Does Analog input syntax exist?

Remora - Does Analog input syntax exist?

Category: Computers and Hardware

Hi LabQuest,

That error message is normal and nothing to worry about. It's because we are not using the base thread, only the servo thread in LinuxCNC.
  • digiex_chris
  • digiex_chris
17 Nov 2024 02:23 - 17 Nov 2024 02:24
Replied by digiex_chris on topic Flex GUI Import a Python Module

Flex GUI Import a Python Module

Category: Other User Interfaces

I am, which IRC are you referring to? I'll join up!

edit: oops, found it! on the community page of linuxcnc
Displaying 17026 - 17040 out of 24608 results.
Time to create page: 0.448 seconds
Powered by Kunena Forum