×
Test (Today)

test of forum features

About PLC and synchronization (+introduction)

More
02 Feb 2025 20:37 - 02 Feb 2025 20:37 #320446 by o462
Hello everyone,
As it's my first message here, let me first introduce myself.
Feel free to skip this part ;)

So... I'm a 40+ years old electronics engineer. I'm currently self-employed, and in long term partnership with a French CNC/3D-printer vendor. I'm using Linux since kernel 2.4.18 (~20+ years), and currently using Linux exclusively.
Most of the time, I develop custom solutions to specific problems, that includes board design, firmware development, computer software, web interfaces... I also worked on few CNC-based 3D printers. (few keywords for the curious: PIC, AVR, C, C++, python, MySQL, php)
I'm quite familiar with Beckhoff and Bosch-Rexroth, as these are the most common in my area (there's Siemens too, but Siemens being Siemens, I just can't...).

======

Read this as a quite general discussion about PLC synchronization, I'm currently working on a project to eject and replace any closed-source Windows-based software for CNCs (i.e. no more TwinCAT and IndraWorks, for runtime and development), and my feelings are telling me that I can easily replace existing PLC tasks (that are synchronized) with some python script (that won't be synchronized). Note, you may also think of C as a replacement for python, it's not the point here.

I'm planning to use python as a base to write PLC programs, but as I see it, it won't be synchronized with servo-thread.
Does anyone has any arguments on the critical conditions that any PLC program running has to be synchronized with servo-thread, or the opposite ?
As far as I'm concerned, I don't see anything that has any real impact of both the servo-thread and PLC task are not synchronized (read it as: I has no side-effect for the servo-task to get an action from the PLC on next cycle), but I may miss some cases.

Ofc, I don't talk about critical procedures like homing or emergency stop. I'm talking about procedures like, let's say T3 M6, this has no obligation to be synchronized, so having a python task that run independently is fine, as long as it has the correct checks and waits, and acknowledge the procedure after everything is done.
Last edit: 02 Feb 2025 20:37 by o462.

Please Log in or Create an account to join the conversation.

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
02 Feb 2025 20:50 #320448 by tommylight
Replied by tommylight on topic About PLC and synchronization (+introduction)
Welcome,
Just to get this out of the way, LinuxCNC has it's own implementation of PLC called "Classic ladder", in case you missed it, and as far as i know works perfectly fine in regards to synchronization with other real time stuff, but i never used it so i can not insist on it.
And i absolutely agree with you on Siemens. But considering they had 480000 strong work force at one point in time, organizing them is a huge logistical nightmare.

Please Log in or Create an account to join the conversation.

More
02 Feb 2025 20:56 #320449 by o462
Thanks.

Yes, I don't need ladder (not even familiar with it), or even structured text.

I just have some M codes that are really specific and it's just a bunch of 'wait this bit', 'set target position to...', 'wait axis in position', 'set that variable', and I'm unable to think of any reason for that to be synchronized with servo-thread.

Please Log in or Create an account to join the conversation.

Time to create page: 0.117 seconds
Powered by Kunena Forum