Use of STEP-NC with LinuxCNC

More
01 Nov 2015 05:28 #64563 by AtinA
Dear Members.

Greetings. First post ever on LinuxCNC forum! I am relatively new to machining, so kindly condone my lack of knowledge in the area.

I would like to implement STEP-NC format on LinuxCNC. I have found a toolkit online (code.google.com/p/iso-14649-toolkit/ ) which allows me to convert STEP-NC to canonical machining commands (CMCs) directly. Is it possible for me to use these commands to drive a CNC machine? From what I have understood so far LinuxCNC needs G-code as an input to drive the CNC machines .

Thanks a lot!

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

More
01 Nov 2015 18:47 #64573 by BigJohnT
You are correct LinxuCNC uses G code as an input.

JT

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

More
01 Nov 2015 18:54 - 01 Nov 2015 18:59 #64575 by ArcEye
Replied by ArcEye on topic Use of STEP-NC with LinuxCNC

I would like to implement STEP-NC format on LinuxCNC.


Linuxcnc uses ISO 6983/RS274D G-codes, so without rewriting the entire parser / interpreter you cannot.

If you have a lot of STEP-NC code you wish to use, the best you could do would be to write a conversion program that turns the ISO 10303 STEP code back to RS274, but thereby losing all the advantages of the former.

I have found a toolkit online (code.google.com/p/iso-14649-toolkit/ ) which allows me to convert STEP-NC to canonical machining commands (CMCs) directly.
Is it possible for me to use these commands to drive a CNC machine?


Undoubtedly, but you will be writing your own controller, not using Linuxcnc.

It is an interesting toolkit which I must look at properly, but what it is giving you

2. A parser for STEP Part 21 files.
3. A simple stand-alone parser/printer.
4. An ISO 14649 interpreter for 3-axis machining.


are C++ classes to build a controller, not anything that will assist you use Linuxcnc, unless you use them as the basis for a complete rewrite (and it certainly needs it).
The project is archived and has not been added to for 6 years, so unsure of the usability of it.

I don't know if there are any open source STEP software controllers out there, suspect not.
The industrial implementations are Siemens, Fanuc etc.

The big question is "do you need STEP-NC to make whatever you intend making"?
Probably not.
It may be the current top of the range machining standard, but unlikely to hit mainstream amateur milling and lathe work any time soon

regards
Last edit: 01 Nov 2015 18:59 by ArcEye.

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

More
01 Nov 2015 19:02 #64577 by cncbasher
what is your reason to use step nc ? , is it to interface from a cad system ? if so which specific one .

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

More
02 Nov 2015 05:26 #64596 by AtinA
Replied by AtinA on topic Use of STEP-NC with LinuxCNC
Hi all

Thanks for replying. It is for a masters project. There is a budget of around $10000 for the same. We were thinking of development of a Linux based CNC machine which would use STEP-NC as an input.

what is your reason to use step nc ? , is it to interface from a cad system ? if so which specific one .


We would like to move away from G-Code, as it doesn't give a lot of flexibility in terms of feed rate optimization or storing shop-floor level changes during the manufacturing process. STEP-NC seems to an interesting format, in that it allows the use of a single file across the CAD-CAM-CNC chain. The primary advantage being the ability to use multiple CAM software on the same part and capturing different ideas on toolpaths for development of a specific feature. At the shop floor the appropriate strategies could be selected to make the best part possible, resulting in reduced planing time and costs.

The big question is "do you need STEP-NC to make whatever you intend making"?


As written above, it is for a project. The idea for the project over the next 2 - 3 years is to develop an OS where people could write apps for interacting with CNC machines.

ArcEye: You noted correctly that the toolkit gives C++ classes to build a controller. Could you expand on what that means? My knowledge is woefully inadequate right now on the topic.

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

More
02 Nov 2015 15:33 #64603 by ArcEye
Replied by ArcEye on topic Use of STEP-NC with LinuxCNC

ArcEye: You noted correctly that the toolkit gives C++ classes to build a controller. Could you expand on what that means? My knowledge is woefully inadequate right now on the topic.


It just means the classes should provide a means to build a simple STEP-NC controller.

That would be a replacement for Linuxcnc, rather than an augmentation to it.

At the very least it should be useful to study the parsing and interpreting side, to see how code is converted into machine movement instructions.

It would be a useful exercise to build modules 2 and 3 and get a print from a STEP-NC input, to demonstrate the output.
Would be similar in some ways to the lex / yacc bits of compiler parsing

regards

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

More
02 Nov 2015 16:36 #64604 by cmorley
There is a stand alone interpreter interface in linuxcnc - not sure if it still works or not.
It work take basic machine movement commands.
maybe you could feed it NC-step converted commands.
I'm looking for a reference...

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

More
02 Nov 2015 19:07 - 02 Nov 2015 19:11 #64608 by andypugh

Is it possible for me to use these commands to drive a CNC machine?


Undoubtedly, but you will be writing your own controller, not using Linuxcnc.


That isn't quite true. He would be writing a new interpreter for LinuxCNC. The motion controller from LinuxCNC, HAL and the GUIs could all remain unchanged.

There has been discussion of "pluggable interpreters" in the past and I believe that Machinekit already allows for it.

The existing LinuxCNC interpreter has sections that look like this:
 544 int Interp::convert_arc2(int move,       //!< either G_2 (cw arc) or G_3 (ccw arc)    
 545                         block_pointer block,    //!< pointer to a block of RS274 instructions
 ...
 586   ARC_FEED(block->line_number, end1, end2, center1, center2, turn, end3,
 587            AA_end, BB_end, CC_end, u, v, w);
 588   *current1 = end1;
 589   *current2 = end2;
 590   *current3 = end3
...
 598   return INTERP_OK;
 599 }

The ARC_FEED function queues the move to the realtime layer, where it gets converted to motion. A STEP_NC interpreter would need to use the same motion primitives from STEP_NC.

The place to discuss this is not the forum, it is the developers mailing list (look at the "Community" link at the top of this page). The folk who understand this are not very active on the forum.

It is actually possible to add canonical motion commands to the queue from the Python interface, and that interface provides a convenient list of the canonical motion commands available:
git.linuxcnc.org/gitweb?p=linuxcnc.git;a...7d0908c8f5b7e9d1#l78
However a lot more detail of each command here:
git.linuxcnc.org/gitweb?p=linuxcnc.git;a...01ba7d0908c8f5b7e9d1

[Edit] Note that canon.hh was written by Thomas Kramer and the STEP_NC code you found was written by Thomas.K....
Last edit: 02 Nov 2015 19:11 by andypugh.

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

More
02 Nov 2015 19:41 #64609 by ArcEye
Replied by ArcEye on topic Use of STEP-NC with LinuxCNC
I have just built the modules from the toolkit on Jessie with g++-4.9

The iso14649parser.cc file requires an additional include of

#include <string.h> to get it to build.

I assume the header files for strcmp etc. have changed at some point over the years since it was written.

A lot of it is essentially as I said, lex and yaccs like parsing of STEP code, which allows for writing out in a format more useful for machine control.

andypugh wrote:

That isn't quite true. He would be writing a new interpreter for LinuxCNC. The motion controller from LinuxCNC, HAL and the GUIs could all remain unchanged.


Well yes.
However I don't get the feeling that your masters will be in software design from previous questions and was heading off the "How do I do that".

You will still be writing your own controller, just re-using relevant bits of Linuxcnc and getting them to mesh.

How successful you will be merging proper C++ code with the code Andy once characterised as Fortran++ is another matter :laugh:
Depends upon the modularity of each stage.

Good Luck with it.

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

More
02 Nov 2015 19:48 #64611 by andypugh

You will still be writing your own controller, just re-using relevant bits of Linuxcnc and getting them to mesh.


I was rather hoping that they might end up with an alternative interpreter _for_ LinuxCNC.

Give the author overlap (Mark Pictor was also a LinuxCNC developer, or at least user) is there any evidence that the STEP-NC output calls and LinuxCNC input calls match in name and format?

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

Time to create page: 0.205 seconds
Powered by Kunena Forum