![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| Fanuc Discuss Fanuc controllers here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
Hello, I would like to know how it is possible to change a variable by MDI; for example: N100 print "variable #1 is equal to?" --> this msg can be read on the screen The operator insert "250" And so now #1 is = 250. A sort of "scanf" or "cin" for fanuc Thank you very much |
|
#3
| |||
| |||
| Audoru...CNCrim is correct you just go into MDI and type #1=250->EOB->INSERT->cycle start. Now #1=250. One thing to keep in mind on the Fanuc controls #1-#33 are your local variables and will clear to null if you press reset or at program end with M30. What model Fanuc are you using? Stevo |
|
#4
| |||
| |||
| Thank you, but it's possibile that i didn't explain it well enough: I know that i can set a variable by mdi, but the problem is that i would like a sort of M00 with condition.... For example: i have a program in execution and i want on block N100 a sort of: print "set you variable to 1 or 0" and put the 1 or 0 inserted by operator by mdi into a variable, and then if #my_variable it's equal to 1 the program can continue, else the program will stop by an M30. |
|
#5
| |||
| |||
| Hmmm ok I am a bit more clear on what you are looking to do but not quite 100%. First off you cannot have the program stop to display what the value of #1 is equal to. You can have the program stop and have the operator view it through the settings screen. You can also have him change it through the settings screen by pressing 1 or 0 then “input”. Now with that being said you can have the program stop with a M0 and have the operator input the proper number (1 or 0) into #1 then continue the program. Now you can write the code to have the program end with M30 or continue machining based on what #1 is set to. I believe this is what you were trying to explain. Now in the code below the operator will enter what he needs into #1 when the M0 is read, either 1 or 0. The program will continue and when it reads the "IF" statment and if #1 is set to 1 it will skip the M30 and go to the N100 and continue machining. On the other hand if #1 is set to 0 it will not go to N100. It will just proceed to the next block which is M30 and the program will end. … M0 (INSERT 1 OR 0 IN #1) … … IF[#1EQ1]GOTON100 M30 N100(CONTINUE MACHINING) … Stevo |
| Sponsored Links |
|
#6
| |||
| |||
| Thank you very much Stevo, last ( I hope ) question is: between M0 and if condition how is possibile to save the number that operator enter into variable #1? What is the command that i have to insert into the program to set this variable as the operator want? Thank you |
|
#7
| |||
| |||
| Ask all the questions that you want to. That’s what we are all here for. You can very easily save this value that is input into #1. As a quick reference #1-#33 are your local variables and will clear to null at reset or program end. #100-#199 are you common variables and will clear only at power down of the machine depending on if you have a parameter to allow or disallow them to clear. However it is most common they clear at power down. #500-#999 are you permanent common variables which will never clear unless you program them to change or clear. So you can save what #1 is set to by writing it like below. Use #100-#199 if you don’t care that the value will clear at power down, or use #500-#999 if you don’t want the value to clear at all. Make sure that the variable you choose is not being used for something else. These are commonly used for tool changes or macros. … M0 (INSERT 1 OR 0 IN #1) #500=#1 … IF[#1EQ1]GOTON100 M30 N100(CONTINUE MACHINING) … What exactly are you trying to do? I am just wondering if there is a easier or less operator interface way of doing what you need done. You can have conditions before hand that can maybe set #1 so the operator does not have to and the program will machine accordingly. You may also want to change #1 to #100 or #500 as long as those variables are not being used for something else. Stevo |
|
#9
| |||
| |||
| If you are using MDI programs too often, you may find the following information useful: The default setting for the MDI mode is such that the program gets erased automatically, after its execution is complete. This means that the program would require to be typed again, for a subsequent execution. This makes trial and error impractical in MDI mode. However, if parameter 3204#6 (on 0i control) is set to 1, the MDI program is retained even after its execution is over. The RESET key will, of course, erase it. If it is desired to retain it even after pressing RESET key, set parameter 3203#7 to 0. An MDI program, however, cannot be permanently saved with a program number, for a future use. Switching off the machine erases it permanently. |
|
#10
| ||||
| ||||
I once squashed a job with the spindle nose on an Acramatic by accidently starting an MDI program instead of MEM program. Both screens looked virtually identical. I therefore prefer MDI to clear after performing required action... DP |
| Sponsored Links |
|
#12
| ||||
| ||||
| No, but you can do what I did and forget which mode you are in. The control I was using was virtually all touch-screen, no mode setting dial or switch, and the display barely changed from MEM to MDI. As I recall, on Acramatic you could write your entire program in MDI, re-run it and ultimately save it. My MDI program was simply a move to XY-zero then down to clock location boss on fixture. It was never meant to be run with a component sitting in the way.... ![]() DP |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| EMC2 variable pitch / variable diameter threading. | samco | General Metalwork Discussion | 0 | 03-09-2008 01:40 PM |
| variable to change tool offsets in auto cycle | dalvinder | Machine Problems, Solutions , Wireless DNC, serial port | 0 | 09-04-2007 03:45 PM |
| How to change Tool change position(About MAZATROL T1 control) | liushuixingyun | Mazak, Mitsubishi, Mazatrol | 5 | 07-07-2007 02:58 PM |
| variable speed dial reconnection, or drive belt change? | klysons | Tree | 1 | 06-29-2007 09:30 PM |
| IF variable = bla THEN do this ELSE do that ? | iMisspell | G-Code Programing | 21 | 07-30-2006 10:57 PM |