Fanuc Macro B

0 views
Skip to first unread message

Torie Crivello

unread,
Aug 5, 2024, 6:35:35 AM8/5/24
to trudimanpen
IfI assign one to a DI, does that mean whenever I get that DI it calls that program? Like could I assign a GO_TO_MAINT program to a DI and when ever the robot receives that DI it goes to maintenance position? Does a macro input tender always run in the background?

often times i used macros with no group selected to operate stationary cameras running vision processes while the robot it off doing something else. maybe find the next part to pick up before the robot even gets there.




If I assign one to a DI, does that mean whenever I get that DI it calls that program? Like could I assign a GO_TO_MAINT program to a DI and when ever the robot receives that DI it goes to maintenance position?


Yes you can do this. I am using macros to control my conveyors as well as start a vision system program I have. When the DI = ON it runs the program that it is mapped to. You can set the macro to run on a few different inputs such as TP key, operator panel button, or input signal (DI,UI, ect).


Moosehorns, I am in the same camp as you, we don't want people other than programmers or maintenance touching the pendant. Also, we provide an HMI for a user interface. So in my situation Macros have no benefit. I can accomplish anything required using a combination of regular programs and BG Logic.


I find it funny that you say Fanuc is proud of the macro, when I find BG Logic infinitely more useful, but you never hear Fanuc talk about BG Logic. It isn't even taught in their Advanced programming course.


At my facility we use aux axis for dial tables and trunnions. We put the positions in the macro table and call the program via DI. This way the arm can be off doing something else, and the Aux Axis and get into its operator load position.


I use macros for some of my more elaborate EOAT setups. Multiple actuators with 2 or 3 brief WAIT instructions. Pack it all into one MACRO so each time I need to pick up or drop off, it is one line to call the appropriate MACRO instead of 5 of 6 lines of code.


Does the fanuc macro language have a MOD Division function? If not anybody have any ideas how I can determine if a passed variable is an even or an odd number? The passed value is always going to be between 1 and 8 inclusive.


Matt, The book I have ( FANUC custom macros ) does not even mention MOD division. I did not want to have a confusing program as it's bad enough already.That is why I did not want to test for every value 1-8


LinkedIn and 3rd parties use essential and non-essential cookies to provide, secure, analyze and improve our Services, and to show you relevant ads (including professional and job ads) on and off LinkedIn. Learn more in our Cookie Policy.


I often write code for Orthopaedic Taps and Screws. Quite a few of these have flutes running thru the threads as one would expect. As I set my macro for a family print of 6 or more sizes, one thing I need to consider is how to tackle the way my code handles roughing passes as diameters change and flute dimension moves in the Y axis. FIX, FUP, and ROUND allow me to handle this with relative ease.


FUP will round to the next whole number, away from 0. FUP[3.1] = 4. FUP[-3.1] = -4. This is very handy when coding rough passes. Take the total distance needed divided by your DOC and FUP will make sure your 1st pass isn't too heavy.


Round is exactly what we think it is. It is going to round to the next number, up or down. ROUND[3.1] = 3. ROUND[2.9] = 3. This can be dangerous if not handling it correctly. Some macros will end up taking heavier cuts than desired, unless adding more logic to prevent it.


This is what I am currently using in a Tap program. I have 6 Taps that have the Major and Radial Flute in Y change per size. Notice in #139 that I have a -1. at the end. If you do not do this, the 1st pass will be air. FUP calculates # of passes and rounds to next integer away from 0. So this will add an extra pass.


Description:The Custom Macro Programming course provides practical instruction in the development and troubleshooting of macro programs. The fourth day provides enhanced troubleshooting scenarios and programming exercises.Topics covered in this course include:




Course Benefits:

At the conclusion of the course, students will be able to develop Custom Macro programs to reduce cycle times, increase automation and improve efficiency of programming. They will also be able to read, troubleshoot and simplify existing programs.


This is a kind of loop and is best explained in an example. My example is a macro that will drill a grid of holes. The user states the spacing in X and the spacing in Y. Also the number of holes in each direction.


My advice with all programming is to break the program down into small manageable chunks. Make simple little programs of each part and prove them till they work. You can the piece your program back together.


Hey so recently we gave a demo on Fusion 360 for Turning and the program that is getting generated in this is very long and not a Canned Cycle program - G70 and G71 .. the program should contain these codes



Kindly give us a post processor .cps file for FANUC turning which has the ability to generate the program with a canned cycle strategy ...



Also please watch the screencast video in the below link where I have explained about the problem that I am facing . please see the video with the audio output






I'm no expert of current offerings as there are so many CAM Systems. And there might be one. But what I can say is FANUC isn't the only ones with decent CAM Turning cycles. Okuma and Mazak are both examples. And the problem I always heard cited was the methodology is different enough between them that a CAM System would have way too many variable to try to accommodate them all. I'm not saying it can't be done. I've just not seen it with the ones I've used Fusion 360, MasterCAM, UGII, ProNC, CAMAX SmarCAM and Anvil


When I go visit my customer (old employer), I will inquire to see how Esprit handles lathe. I know they have some really sharp people making their posts and software (not at all knocking the HSM team, not one bit)


There are 000 of fanuc canned cycles and macro b, on the web for all most everything out there, most controllers have written some where, what the system is based off, that helps knowing that first, it's usually fanuc or haas . haas is there own style what is similar to fanuc


The search for symbol and label references is global (workspace) if the definitions are included by a definition file .def, otherwise the search is limited to the current file scope. Sequence numbers only can be found within a file scope (there is currently no function scope available).


Out of the box the extension supports semantic highlighting for >Labels, @Symbols, M/G-Codes and, Variables. Sometimes it could be useful to change the default highlighting for a particular symbol or for a type like a macro variable.Such a customization can be achieved by adding custom keyword items to the configuration property macro.keywords in the user/workspace settings:


The field nodeType defines the related type in the macro program. If the field is empty, a keyword item affects all symbol occurrences regardless of the symbols type. E.g. if you want to add a hover text to a particular P-Code variable, an item could be structed as follows:


These scopes are used internally and are responsible for the symbol style which depends on the chosen color theme like Noctis. To override the style just add rules to the editor.semanticTokenColorCustomizations configuration property.


The building process can be performed by using an external script or the internal system. If an external script is used,just set the path in macro.build.makeFile. If a clean script in the same directory exists, it is used for the cleaning process.The following parameters are passed to the external script:


A convenient way to compile 16 bit macro programs if the host system doesn't support it, is to use Dosbox.Below an example task definition which executes dosbox and passes the build script as command line argument.


Reads the custom macro variables specified by the starting number, "s_no", and number of variables, "*num".

In this function, when you read the macro variable No. #500-#549, the macro name can be read together. In other variable numbers, NULL is read to the name.

It is not influenced by setting of cnc_setmactype function.


General workpiece program appoints G code and ship distance with numerical value directly; for example, GO1 and X100.0. When user macro is used, numerical value can be appointed directly or by variable. When variable is used, variable value can be changed by program or operation in MDI panel.


Local variable is only used to store data in macroprogram, such as operation outcome When power is cut, local variable is initialized to empty. And when macroprogram is called, independent variable assign local variable.


The operations listed below can be executed in variable. expression at the right of operator can include constant and variable composed with function or operator. Variable #j and #k can be assigned by constant. the left variable can be assigned by expression.


A numerical control device (102) having an NC processor (102a) for executing numerical control processing on the basis of input numerical control information, said NC processor numerically controlling a machine tool (103), the numerical control device comprising:


B) said processor (102c) is an editing processor for reading, from said external storage unit (201), machining data which is composed of a combination of shape elements selected from a predetermined plurality of shape elements, in accordance with a part code entered by the operator from said input means (202),


C) said display unit (203) is connected to the editing processor (102c) for displaying the selected combination of shape elements on the screen and requesting the operator to enter by the input means (202) numerical values assigning dimensions to the shape elements, which values, when combined with the shape elements by the editing processor, create said numerical control information defining the shape and dimensions of a part to be machined, and

3a8082e126
Reply all
Reply to author
Forward
0 new messages