Advanced Search

Search Results (Searched for: )

  • Marcos DC
  • Marcos DC's Avatar
Today 11:16

PLC + LinuxCNC for industrial machine with simple HMI (non-G-code operators)

Category: General LinuxCNC Questions

To add some more technical context to our use case:

This is a large-format gantry-style machine for laser cleaning and automated spray painting of heavy equipment and large structures. The focus is on robustness, safety, and simple, repeatable operator workflows rather than traditional CNC part programming.

Our current concept is roughly:

• PLC: machine sequencing, state machine, safety logic, interlocks, recipe management, part dimensions, operator interface (HMI), and maintaining machine state independently of the PC
• LinuxCNC: motion control, path execution, coordinated axes, and low-level servo/stepper control

The PLC would command LinuxCNC at a higher level (start cycle, select program, pass parameters, etc.), while LinuxCNC would not be responsible for overall machine state or safety sequencing.

We are particularly interested in hearing from anyone who has implemented a similar architecture with a real industrial PLC + HMI, and how you structured communication, parameter passing, and responsibility boundaries between the PLC and LinuxCNC in production machines.

Any concrete examples or lessons learned from industrial environments would be very valuable.
  • Marcos DC
  • Marcos DC's Avatar
Today 11:15 - Today 11:25

PLC + LinuxCNC for industrial machine with simple HMI (non-G-code operators)

Category: General LinuxCNC Questions

Thanks for the detailed explanation — that is a very interesting architecture and I appreciate you taking the time to describe it.Thanks for the clarification regarding Beckhoff I/O. Just to be clear, in your setup you are using Beckhoff EtherCAT I/O as remote I/O, but without a Beckhoff PLC runtime (e.g. TwinCAT PLC), correct? In our case, we are specifically looking for architectures where a real PLC runtime (IEC 61131, ladder/ST, etc.) is responsible for machine sequencing and state, and LinuxCNC is used primarily for motion and interpolation.
In our case, one of the main drivers for using a PLC is to keep machine sequencing, state management, and operator workflow independent of the LinuxCNC PC. The goal is that the PLC maintains the machine state and basic operation even if the LinuxCNC PC or software needs to be restarted or serviced.

We are also targeting a more traditional industrial maintenance environment, where ladder/IEC PLC logic and a dedicated industrial HMI are preferred for long-term support by technicians who are not Linux or software specialists.

For that reason, we are specifically interested in experiences using a real PLC (e.g. Mitsubishi, Omron, Siemens, Keyence, Beckhoff, etc.) alongside LinuxCNC, and how people typically split responsibilities between PLC and LinuxCNC in that type of architecture.

Still, your approach with Node-RED, distributed I/O, and web-based HMI is useful as a reference for alternative architectures — thanks again for sharing your experience
  • Troff
  • Troff
Today 11:05

OMRON Yaskawa controllers, what I/O board would you choose

Category: Driver Boards

I guess an important information is, i plan to run the drives in position control.
I plan to use the Yaskawa in closed loop.

So the drives would receive STEP and DIRECTION signal. According to manual i also has a completion signal called COIN. And obviously some alarm and enable signals as well.

Hope this clarifies a bit.
  • suraj9735
  • suraj9735's Avatar
Today 10:54

How to do wiring to generate quadrature encoder signal in Mesa 7i95 board

Category: Driver Boards

Dear LinuxCNC User,

I am using Mesa 7i95 board to run a single axis AC Servo motor. I want to control feed override externally using LabVIEW while the LinuxCNC G-code is running at programmed feed rate. This is my part of PhD research work to control the feed override of a running G-Code based on some unstable/chatter vibration in the process.

As I now aware that, there is no analog input pin available in Mesa 7i95 board such that I feed analog voltage and bind that pin with mpg feed override inbuilt pin of LinuxCNC software. From the forum, I got suggestions that is it possible to use encoder pwm pin for the same purpose. The idea is, generate a digital  signal A and B of 90 phase lag with LabVIEW and send it to encoder pin of 7i95 using LabVIEW cDAQ module NI-9401. So, I have generated two digital signal called A and B and create logic as following 
A-0, B-0;  A1, B0;  A1, B1; A0, B1. This logic clearly generated two A and B digital pwm type signal with 90 degree phase lag. I checked that in oscilloscope and it shows perfect squrae signal of 5 volt in high and 0 volt in low with 400 mV noise.

Now the following wiring I have done from NI-9401 to 7i95 encoder 2 slot.
A signal or digital output 1 of NI-9401 to A+ or pin 1 of 7i95
B signal or digital output 2 of NI-9401 to B+  or pin 4 of 7i95
GND of NI-9401 to GND or pin 3 of 7i95

After this connection, I checked the encoder count of encoder 2 in Hal show configuration. I observed that, the count is increasing, then decreaseing, and then again increasing, but overall it increases. I see it randomly increasing or decreasing. I played with loop timing of digital signal generator from 1 second to 1 mili-second but no improvement. I was expecting that if I set 1 sec loop time the counter of encoder will increase by 4 times because it is in quadrature mode. But again important point is I have not used the other encoder pin of encoder 2 slot. There are 8 pin available in encoder slot, A+, A-, GND, B+, B-, 5 Volt output, Z+, Z- respectively from pin 1 to pin 8. Out of the eight pin I am using only 3 pin.

Truly speaking, I don't understand how the mesa driver actually counts the quadrature pulses and how the motor encoder generate those pulses. At what frequency motor encoder generate those pulses and what frequency mesa drive read those pulses.

I believe either I am doing wrong wiring or setting wrong frequency to generate the signal.

I request expert to please guide me in doing proper wiring, frequency setting of loop in LabVIEW, HAL code setting in .hal and .ini file to get stable counter in encoder 2. After I get stable counter and full control on number of pulses, I will bind that pin with feed override pin and control the feed override externally using LabVIEW. From LabVIEW I will send fix number pulses either to increase or decrease the feed override. I will scale those pulses to match the feed override required value.

If this is possible let me know, else suggest me a different approach to do the same task either by buying new most suitable daughter board that supports with 7i95 and has analog input and output pin or any other way.

Thanks 
Suraj Kumar 
  • Troff
  • Troff
Today 09:55 - Today 10:40

OMRON Yaskawa controllers, what I/O board would you choose

Category: Driver Boards

Newbie here! Be gentle :-)

I have recently acquired a bunch of Omron Yaskawa servos and SGDH drives from a running machine.

Read the LinuxCNC documentation a while ago planning for a CNC setup for my minor lathe.
Searched the forum for experience with the Omron Yaskawa SGDH controllers. One guy doing mesa to control the SGDH.

First of all i would like to do x-y axis operations to do threads etc. Long term perspective i would like to do 3 axis machining, making the spindle A-axis servo controlled - and mounting a spindle on the x-y axis.


I have not settled on a PC platform yet. But concidering making it simple and cheap as a start. And I can upgrade if i find myself in a situation where it is meaningful to throw more money at the platform.

Questions:
1. What are my simple I/O options, a RPI5 and a basic I/O card, a BeagleBone with a cape ? Any recommendations ?
2. If i later on do the A axis i plan on installing the Sevo drive with a gearing that will get up to max 600rpm. . It is a small hobby lathe and  currently is has a 700W motor. Anyone with experience running servo on an A-axis - the servo motor i have is a 1200W type?

Hope this is meaningful, if not let me know and i will try to elaborate.

Thanks in advance!










 
  • endian
  • endian's Avatar
Today 08:41 - Today 08:44
Replied by endian on topic LinuxCNC S-Curve Accelerations

LinuxCNC S-Curve Accelerations

Category: General LinuxCNC Questions

there is added filtering and influence of real active ferror from feedback but I am not using it because it creating frequencies ... 
  • endian
  • endian's Avatar
Today 08:40 - Today 08:50
Replied by endian on topic LinuxCNC S-Curve Accelerations

LinuxCNC S-Curve Accelerations

Category: General LinuxCNC Questions

Very good stuff! I made a start today forum.linuxcnc.org/ethercat/58260-lichua...r-need-help?start=20
is dt = Delta time = servo period?
I'll have to follow you guys a bit more closely!
 

yes interpolation servo period.. Rod please check this repo  codeberg.org/endian/Beckhoff_AX5ZYZZ_lcec_driver here it is solved at all ... there is a .hal file example and everything needed 
  • rodw
  • rodw's Avatar
Today 08:27
Replied by rodw on topic LinuxCNC S-Curve Accelerations

LinuxCNC S-Curve Accelerations

Category: General LinuxCNC Questions

Very good stuff! I made a start today forum.linuxcnc.org/ethercat/58260-lichua...r-need-help?start=20
is dt = Delta time = servo period?
I'll have to follow you guys a bit more closely!
 
  • Unlogic
  • Unlogic
Today 08:10
Replied by Unlogic on topic Optimum Optimill MH50V CNC conversion

Optimum Optimill MH50V CNC conversion

Category: Milling Machines

There hasn't been any updates to this thread for a while. But the machine has worked great this autumn and I've created some nice billet aluminum car parts.


 

 


However it's finally timed for a much awaited spindle upgrade. I bought this 8000 rpm, liquid cooled BT40 spindle from FUKA/Swift. It seems like a very nice unit but it's gonna be a while before I can test it as I now need to design and manufacture a new head for the milling machine along with a much larger pneumatic tool release cylinder.


 
 
  • grandixximo
  • grandixximo's Avatar
Today 07:57
Replied by grandixximo on topic LinuxCNC S-Curve Accelerations

LinuxCNC S-Curve Accelerations

Category: General LinuxCNC Questions

0x60B1 (velocity feedforward) can use joint.N.vel-cmd directly - is equal of FF1 of PID which already exist and its widely used to compensaty cycle delay ... this stuff is from my point of view useless for now

but I am still taking just about pin which allready read position from allredy presented 50ms buffer .. you are providing us from sTP posCmd(t), velCmd(t) (command speed is compensated cycle with PID FF1 and we do no use 60B1 for now), accCmd(t) and jerkCmd(t) and we need for ethercat posExtraCmd(t+2) for ethercat devices which is running in Constant Synchronized Position mode because of absention PID and therefore FF1 absention too (2 cycle lag present of ethercat) - this is just array position value which allready exist in buffer because of time(you notice 50ms) precalculation ... 

and I know this is topic connected with ethercat but it is directly connected to trajectory planner ... Beckhoff, Codesys, Deltaww it has implemented as I said because their native bus is ethercat ... 

 The lookahead buffer stores velocities and segment data, not pre-calculated positions. Positions are computed at RT execution time through interpolation based on progress values that depend on velocity integration each cycle. The future position you want doesn't exist in a buffer waiting to be exposed.Your HAL component using
vel_cmd * dt + 0.5 * acc_cmd * dt²
is actually the correct approach given the architecture. It's not a workaround, it's the right way to predict future position from the data that exists.The TP gives you accurate vel-cmd and acc-cmd every cycle. With S-curve planning these will be even smoother and more predictable than with trapezoidal, so your compensation should work better not worse.
  • Aciera
  • Aciera's Avatar
Today 07:41
Replied by Aciera on topic Strange preview for circular arc (G2/G3)

Strange preview for circular arc (G2/G3)

Category: G&M Codes

Seems to work for me, but maybe you could provide a complete gcode example:

 
  • rodw
  • rodw's Avatar
Today 07:26 - Today 07:26
Replied by rodw on topic Lichuan 4 axis stepper need help-

Lichuan 4 axis stepper need help-

Category: EtherCAT

Ooops no attachment
 

File Attachment:

File Name: pins_2026-01-30-2.txt
File Size:2 KB
  • rodw
  • rodw's Avatar
Today 07:24
Replied by rodw on topic Lichuan 4 axis stepper need help-

Lichuan 4 axis stepper need help-

Category: EtherCAT

Well, I made a start and at least have some pins displaying (see attached text file). Still so much to do after a full day on this!

Not sure if this is final but the states should look like
// CiA 402 states
typedef enum {
    STATE_NOT_READY_TO_SWITCH_ON,
    STATE_SWITCH_ON_INHIBITED,
    STATE_READY_TO_SWITCH_ON,
    STATE_SWITCHED_ON,
    STATE_OPERATION_ENABLED,
    STATE_QUICK_STOP_ACTIVE,
    STATE_FAULT_REACTION_ACTIVE,
    STATE_FAULT,
    STATE_HOMING
} DriveState;

I need to make sure everything is seperated into readall and writeall functions.
We rtapi_malloc structured data storage when we loadrt so I hope that will work.

The statusword structure looks something like this so the bit fields are mapped overthe status word
// CiA 402 Statusword union
typedef union {
    hal_u32_t raw;
    struct 
    {
        unsigned char ready_to_switch_on      :1; // 0
        unsigned char switched_on             :1; // 1
        unsigned char operation_enabled       :1; // 2
        unsigned char faulted                 :1; // 3
        unsigned char voltage_enabled         :1; // 4
        unsigned char quick_stop              :1; // 5
        unsigned char switch_on_inhibited     :1; // 6
        unsigned char warning                 :1; // 7
        unsigned char manufacturer_specific1  :1; // 8
        unsigned char remote_cmd              :1; // 9
        unsigned char target_reached          :1; // 10
        unsigned char internal_limit_active   :1; // 11
        unsigned char  opmode_specific1       :1; // 12 (homing attained / target reached)
        unsigned char  opmode_specific2       :1; // 13 (homing error)
        unsigned char  manufacturer_specific2 :2; // 14-15
    } bits;
} StatusWord;

When I get a bit further, I'll share via github
  • endian
  • endian's Avatar
Today 06:54
Replied by endian on topic LinuxCNC S-Curve Accelerations

LinuxCNC S-Curve Accelerations

Category: General LinuxCNC Questions

The pins already exist:

joint.N.vel-cmd - velocity command per joint
joint.N.acc-cmd - acceleration command per joint
joint.N.jerk-cmd - jerk command (useful for S-curve)

These are updated every servo cycle after cubic interpolation, so they represent instantaneous commanded values suitable for feedforward.
For your cia402 component rewrite:

0x60B1 (velocity feedforward) can use joint.N.vel-cmd directly
0x60B2 (torque feedforward) needs joint.N.acc-cmd × inertia, you can do this with a mult2 in HAL or inside your component

No TP changes needed. Just wire the existing pins to your component and map them to the PDOs.

At the moment only joint 0-1-2 jerk-cmd is calculated proper I think, later on we will do all.
 

0x60B1 (velocity feedforward) can use joint.N.vel-cmd directly - is equal of FF1 of PID which already exist and its widely used to compensaty cycle delay ... this stuff is from my point of view useless for now

but I am still taking just about pin which allready read position from allredy presented 50ms buffer .. you are providing us from sTP posCmd(t), velCmd(t) (command speed is compensated cycle with PID FF1 and we do no use 60B1 for now), accCmd(t) and jerkCmd(t) and we need for ethercat posExtraCmd(t+2) for ethercat devices which is running in Constant Synchronized Position mode because of absention PID and therefore FF1 absention too (2 cycle lag present of ethercat) - this is just array position value which allready exist in buffer because of time(you notice 50ms) precalculation ... 

and I know this is topic connected with ethercat but it is directly connected to trajectory planner ... Beckhoff, Codesys, Deltaww it has implemented as I said because their native bus is ethercat ... 
  • NWE
  • NWE
Today 05:49

PLC + LinuxCNC for industrial machine with simple HMI (non-G-code operators)

Category: General LinuxCNC Questions

Some notes on what has been working for me:

Currently my go-to PLC+HMI setup is LinuxCNC+Node Red dashboard. Sometimes also Glade user interfaces.

I use a combination of Mesa Electronics boards and/or Beckhoff ethercat remote I/O at locations on the machine where you'd normally expect to find a PLC. My logic runs on hal + custom hal components coded in basically C.

Non real-time logic, recipe selections etc. can be configured in node-red pretty much without writing a single line of code unless you want customized functions.

LinuxCNC also has a ladder logic PLC built-in but I cannot inform you of its capabilities, having never used it. I don't care for ladder logic in any form. I have spent way too much time trying to automate complicated machine sequences in expensive proprietary PLC ladder programming software that did not always function the way I expected or wanted.

With node-red for the HMI, all the software lives in the LinuxCNC 'server'. The physical HMIs consist of panel mount touchscreen IPCs booting pretty much any os, autostarting a web browser fullscreen, pointed at the LinuxCNC sever's Node Red web page. The hmi is simply a web page(s) in the server. Placing a duplicate HMI at an additional operator station consists of whatever device you wish, running a web browser displaying the server's web page(s)

I think node-red supports multiple user logins, but I have not tried that feature. In the projects I did so far, I am the only programmer, and the operators don't know how to access the programming back end. Everyone is logged in as me.

On a recent project I set up a router blasting WIFI over the premises. The operator driving the payloader can log into the WIFI with his phone and access the HMI to monitor the processes and switch the machines on/off that he is tending. From the payloader cab.

The entire network is air-gapped from public internet except the server has access to ntp time.

E-stop, safety lockouts, etc are all hardwired with physical safety hardware.

With this system an operator station needs the following wiring:
1. A power cord for the pc.
2. A network cable.
3. A 2 to 6 conductor cable for the E-stop circuit.

When I get more time I'd like to provide some documentation on all this, and some example configs. Currently I'm in the middle of several half finished projects like this, plus a customer running a proprietary PLC I programmed in ladder logic is starting to have random crashes of the PLC, so he is due for an upgrade to LinuxCNC with Glade user interface. This is one more basic machine, so I will skip the node-red. The glade user interface is an app that runs on a monitor plugged directly into the LinuxCNC pc. Then there is a sizable project I'm currently drafting a quote for.

node red getting started:
nodered.org/docs/getting-started/local

I use this for installing node-red:
nodered.org/docs/getting-started/raspberrypi
Although it says raspberry pi, it can be used on an x86/64 pc. During the installation it asks whether I want to install Pi specific nodes, I opt out of that because my x86/64 pc is not a Raspberry pi.

I have been using mqtt messaging to communicate between the LinuxCNC program(s) and node-red. That entails setting up an mqtt server, I have been using mosquitto:
sudo apt install mosquitto

then I run a python-hal component to communicate with node-red via mqtt

Doing all the above configuration pretty much requires a a person to first know his way around linux configuration in the /etc directory extensively.
Default installation of mosquitto and node-red I think listen only on localhost for connection.

Wow, I was going to attach a copy of my python-hal-mqtt connector, but my backup of it seems to be missing. I will have to retrieve a copy from customer's machine as soon as I can.
Displaying 1 - 15 out of 19811 results.
Time to create page: 0.311 seconds
Powered by Kunena Forum