Check if there is eob sign ( after every block. Even the Last one except for %
First of all i use Solicam (inside Solidworks) for my CNC jobs. The machine is a First MCV1000 with Fanuc 0i-mate controller.
Problem is that whenever a job has more than one different operations that require a toolchange, the machine stops with alarm 5010.
Alarm 5010 = END OF RECORD.
Seems like the program has no more lines but that's not true.
Let me give you an example of what Solidcam gives as a G-Code before and after the toolchange.
N138 G02 X155.4116 Y30. I0. J-0.5003
N140 G01 Y0.
N142 G02 X154.9113 Y-0.5003 I-0.5003 J0.
N144 G01 X77.4557
N146 G03 X71.4557 Y-6.5003 I0. J-6.
N148 G01 X77.4557
N150 G00 Z50.
N152 M05
N154 M01
N2 G90 G17 G40 G80 G00
N156 M06 T2 () <------
N158 (FM-facemill1)
N160 G00 G54 G90 X-48. Y26.6666 S3500 M03
N162 G43 H2 Z70.
N164 Z50.
N166 Z2.
N168 G01 Z-0.75 F300.
The toolchange is completed as normal (see the red arrow) and then immediately i get the alarm 5010.
This forces me to enter the program in parts which is time consuming and very frustrating.
It seems that the controller don't like something on the next line.... N160 G00 G54 G90 X-48. Y26.6666 S3500 M03
NOTE: Due to lack of system memory i recently erased ALL the saved programs which unfortunately let me unable to make a toolchange. The hidden program O9001 has been deleted. I loaded manually the program and now the toolchange is working.
Maybe there was another macro (hidden program) that is missing?
Any help will be greatly appreciated!!!
Similar Threads:
Check if there is eob sign ( after every block. Even the Last one except for %
UPDATE
The toolchange subprogram i loaded to the machine ends with M99 which i think forces the controller to loop and start the program again from the beginning.
But the main program starts with the symbol %.
Maybe this is the problem?
Do you think my problem will get solved if i remove the M99 command from the O9001 subprogram?
No there is not EOB sign at the end of any block. Programs are working OK except until a toolchange occurs.
I will post here the O9001 subprogram i loaded, maybe it will help.
I notice that it ends with M99 which will force the controller to begin the main program?
%
O9001
#3003=1
#3004=1
IF[#4120EQ0]GOTO99
IF[#500EQ#4120]GOTO99
G91G28Z0
G91G30Z0
M19
M55
M56
G4X0.5
G91G28Z0
T#4120
M57
G91G30Z0
M58
G4X0.5
M59
N99#500=#4120
#3003=0
#3004=0
M99
Hello TeoDR,
Are you assuming that the Main Program (the program from which the Tool Change Subprogram is being called) is starting from the beginning when control returns from the Tool Change Subprogram, or is that actually what is happening? The Tool Change Subprogram MUST end with M99 and it simply instructs control to return to the Program from whence the Subprogram was called, to the Block immediately following the Subprogram Call Block; it shouldn't return to the Start of the Main Program.
Given that your Tool Change is generally working, I assume that you have the numeral "6" registered in parameter 6071. This will instruct the control to call Subprogram O9001 when M06 is executed. The difference between a Macro Program (Called with G65) and a Subprogram (Called with M98) is that arguments can be passed to a Macro Program, but not to a Subprogram. Not that I believe that it has anything to do with your issue, but when calling a Tool Change Program as a Subprogram, its better form to specify the Tool Number before the Subprogram Call. With the numeral "6" registered in parameter 6071, executing M06 is equivalent to M98 P9001. Accordingly, the two following Blocks will be equivalent:
M06 T2
M98 P9001 T2
M06 T2 would be the appropriate Syntax when calling a Macro Program and therefore, passing the Tool Number (T2) to the Local Variable #20 in the Macro Program. As it is with your Tool Change Subprogram, the System Variable for the Last T Code (#4120) is being used to identify the Tool to change to the spindle. T2 M06 would be more appropriate when the Tool Number in the Subprogram is identified by the System Variable #4120 (provided that the machine is not able to call the Next Tool to a Ready Position).
P/S 5010 is raised if an attempt is made to execute % when M02 or M30 is not placed at the end of the program. The only easy way that can occur is if either M02 or M30 is omitted from the end of the Program, but clearly your program is not getting to the end of the program. To narrow down on where the problem is actually occurring, take the program where the problem happens and delete the Tool Change Call Block to see if the next Block in the program executes successfully. If it does, then it would seem that the issue is with your Tool Change Subprogram and you can start focusing on that program to find the problem.
You say "It seems that the controller don't like something on the next line.... N160 G00 G54 G90 X-48. Y26.6666 S3500 M03". For the problem to be caused by that Block, a "%" character would have to be present.
Regards,
Bill
Last edited by angelw; 12-17-2017 at 03:03 PM.