2

I have a 3-axis system, which resembles the CNC-axis, and a PowerPanel from B&R. Now I plan to execute the g-code, which I read from a file, which is fe located in the Downloads folder. This will be done with fbs from B&R Automation Studio.

I got confused with the help, since it says in drive engineering/mapp Motion/technologie/function block/mpcnc3axis/description the part of moveProgram, where it redirects you to MC_BR_MoveProgram \ description. There stands that you can start the program with [Program name prefix] [File device name:] [Path] Program name syntax. Now I am not sure how to include this with my MpCnc3Axis code or if I can use the syntax also in MpCnc3AxisParType ProgramName part to start the program from fe Downloads Folder, since it didn't work with McPrgAdvParType InitProgramName.

Any links to related material would be appreciated.

I would also accept a solution with C, if it is easier.

eglease
  • 2,445
  • 11
  • 18
  • 28
Andreas
  • 89
  • 1
  • 11
  • Links i already checked and read: https://github.com/gnea/grbl https://forum.arduino.cc/index.php?topic=546230.15 https://forum.arduino.cc/index.php?PHPSESSID=rv8ju9l35dg2tmkrhnorrdu8s2&topic=397237.15 https://stackoverflow.com/questions/13207459/executing-assembly-code-in-c https://stackoverflow.com/questions/5131568/using-inline-assembly-in-c-c https://www.codeproject.com/Articles/15971/Using-Inline-Assembly-in-C-C – Andreas Dec 19 '18 at 18:42
  • This questions are too broad to answer on this site, we can help with a specific problem if you provide the code. – Osiris Dec 19 '18 at 18:48
  • my biggest problem is on how to execute the g-code with c, like the asm command for assembler, just for g-code instead would be what i need. – Andreas Dec 19 '18 at 19:05
  • There is not enough information here. You basically have to translate g-code to hardware commands. These are going to vary greatly and depend on your specific hardware and machining setup. This is also not something I'd recommend doing yourself if you're asking this kind of question. – Shawn Dec 19 '18 at 19:11
  • ok, then i will just close the question when there isn't enough information regarding this question – Andreas Dec 19 '18 at 19:18

1 Answers1

2

Depending on if you are willing to buy software licences from B&R, running a CNC system is more or less easy.

The state of the art implementation is with mappMotion. It requires software licenses and gives you ready to go FUBs to execute nc files, jogging, direct movements, etc. This works the same way for different robot types and CNC kinematics. I recently uploaded a small implementation of a robot on GitLab: https://gitlab.com/kirni/bur_robotic_sample

The alternative is the old ARNC0 approach. No more new features are implemented, but it is free - as long as you do not need any functions that require a Dual Use agreement (i.e. 5 Axis CNC, etc.). The implementation is rather complex and is definitely to extensive to be answered completely at stackoverflow.

However Automation Studio ships with a sample for a two axis CNC. In the logical view you can add a new object Library Samples which opens a dialog where you can select Samples/Motion/CNC system (2 axis)/LibARNC0_Basic_ST.zip. This would be the best starting point, which is also documented in the help in MotionControl/ACP10 ARNC0/Examples/CNC or guid: 4620bb1c-8694-4f27-87d0-805686d7c0c8 as of AS 4.4.4.64.

I hope this helps!

kirni
  • 121
  • 6
  • I do have the licenses for mapp technology and everything else I need already. My problem is that I am not sure if cncParameter.MoveProgramOptions.InitProgram:= '[] [D:] [\Downloads\] CncProg'; is able to read the program from this directory. Since the help says that you can transmit extra program options with MoveProgramOptions where you are able to see that there are more options for the programme where you can select the path. Now I am not sure if it searches there for the main programme. This is where I am currently stuck and not sure on. Mapp and ARNC0 won't work together. – Andreas Mar 04 '19 at 18:00
  • Launching the main program, which is written inside Automation Studio is no problem, just not sure if this works, since I got there a bit confused with those redirecting over and over. Will probably test it tomorrow if I got time. – Andreas Mar 04 '19 at 18:16
  • Which exact mapp components do you use and which versions? Also yes, it is not possible to mix ARNC0 and mapp motion. Did you create a filedevice in the sysconfig? – kirni Mar 04 '19 at 20:28
  • mapp view (.4), cockpit (.2) and motion (.3) and the 5.3 version of each. I did create a filedevice, since it already worked before without opening it from a different path. – Andreas Mar 05 '19 at 14:06
  • Can you share the project with me? It is much easier for me to check directly what might be wrong. At least the configuration files of the mapp components and the code where you call them. – kirni Mar 05 '19 at 17:03
  • the part that confused me was in drive engineering/mapp Motion/technologie/function block/mpcnc3axis/description the part of moveProgram, where it redirects you to MC_BR_MoveProgram \ description. There stands that you can start the program with [] [:] [] syntax. Now i am not sure how to include this with my MpCnc3Axis code or if I can use the syntax also in MpCnc3AxisParType ProgramName part to start the program from fe Downloads Folder, since it didn't work with McPrgAdvParType InitProgramName. Cant send programs on here. – Andreas Mar 05 '19 at 18:03
  • Ah ok. So just for moving a program, the MpCnc3Axis is all you need. MC_BR_MoveProgram is optional and I do not see a reason to use it. MpCnc3AxisParType ProgramName part is fine! – kirni Mar 05 '19 at 19:02