Jump to content
OMRON Forums

PPnc executes NC file normally for the first time, and becomes abnormal when executed


Recommended Posts

PPNC downloads and executes the NC file, and executes the first file to make it run normally, the running time is 45 minutes. After modifying, downloading and executing the NC file parameters again, the NC execution line has not completed the current line, but jumped to the next line for execution (two lines of code were executed at the same time), which caused an accident.

In the attachment, G01 Z [#301] F0.5 is running, and the trajectory has not been completed. The speed is not the specified speed. G04 X1 has been activated. The trouble is that these two codes run at the same time.

When the NC file does not complete the current line and enters the next line for execution, there is another problem with the axis speed setting, which is not what I expected. The motor is in the trajectory I specified, has accelerated to a speed (much greater than the specified F), and then started to decelerate to 0 and completed the trajectory at the same time.

I asked all possible questions, but no results. I hope I can get help in the DT community. Due to this problem, the device has stopped functioning.




Link to comment
Share on other sites

  • Replies 8
  • Created
  • Last Reply

Top Posters In This Topic

Eric, thank you for your reply. [#301]-Through the monitoring window of the IDE, the assignment of the P variable is correct. [#301] represents the stroke of the Z axis. In the currently executed NC machining program, the value will not change with the cycle.

Even so, the motion program executed 2 lines of motion at the same time.

I am looking for errors caused by sys or coordinate system variable assignment errors, or improper set values. However, I can't find any hints of the error.


please help me .thanks.

Link to comment
Share on other sites

After sending the program to PMAC through the IDE you should be able to see it's program number in the task manager (see attachment). Please issue "list prog [number]" in the IDE terminal and share the result (or the relevant part if it's too long). I want to see what PMAC is actually trying to run.


Link to comment
Share on other sites

Eric, thanks.

List subprog5000, the parsed NC program is no problem. (See attachment for details)

Input LIST PC, the instruction is wrong. I currently cannot see the program currently being executed.

Can I view the current line of the NC code executed by PMAC? Then find the cause of the advanced execution of the N20 code?




The following is the NC program:

#100=0 //




#202=0.5 //




G90 G26



M04 S10

G04 X25 //

WHILE[#100 LT #101 ]DO1

G54 G00 X0.5 Z-0.5 B0 F10//

G04 X2 //3s

G03 X[#200] Z0 R[#202] F0.25//

G04 X1 //3s

G01 Z[#301] F0.5/

G04 X1 //1s

G01 X1 F1 //

//G55 G00 X0.5 Z[#401] B0 F10//

//G04 X10 //3s

//G02 X[#200] Z[#301] R[#202] F1//

//G04 X10//3s

//G01 Z0 F25








G04 X25 //




Link to comment
Share on other sites

I added Coord[1].Nsync to the IDE monitor window.

When the N19 line of code is executed, Coord[1].Nsync=19, F specifies 0.5mm/s, but at this time the Z feed speed exceeds the set value, and it continues to accelerate. When Z reaches about half of its stroke(the Z maximum speed is 6MM/S), The speed starts to decrease. At the same time, Coord[1].Nsync =20. the N20 code is executed. Z axis is still decelerating and N19 has not ended.

This is the case when an exception occurs. Coord[1].Nsync counts in advance, and linear motion is like PVT, only acceleration and deceleration motion, no uniform motion and more importantly, it exceeds the speed specified by F.

There are two issues involved. The first one is motion advance (Coord[1].Nsync count changes). The second is abnormal linear motion.

Which variable settings will cause these situations to happen?

Link to comment
Share on other sites

Are you sure that P5301 remains the same value the entire time the program is running? I could see lookahead reading the value before it was changed pretty easily. I would suggest plotting P5301 in the IDE while the program is running.


Does the N19 move reach a max speed of 0.5 mm/s as expected in the good case?


Is the list response the same in the good and bad case?


What can you do to get past this issue? Can you edit and then reboot the system?

Link to comment
Share on other sites

Eric, thanks for your reply.

In the past week, I have done many tests, and I have tested all the coordinate system variables. I didn’t continue to use macro variables, and used certain values to write NC.

1) The system has four motors, motor 4 is a main shaft (also with C-axis function), motor 6 is a turntable, and motors 1 and 2 are two linear motion axes.

2) When aligning the workpiece for processing, use C—>S, and motor4 moves at jogspeed.

Then, the motors 1, 2, and 6 start to move in continuous jog mode, and then move in incremental mode. Finally stop the spindle movement s—>C and start to execute NC. During the execution, the first execution of the motion program is always normal. The problem started the second time.

3)I did a different test again, just let the spindle rotate, instead of continuous jogging, incremental jogging. Then switch to the C axis.

After running the NC system, the problem disappeared.

I searched for the logic problem of continuous jog operation and incremental motion program, but did not find the problem. I am very confused.

Eric, I cannot upload my program in the attachment. I will send my program and configuration file to your email address. Please check it carefully.

thank you for your help

Link to comment
Share on other sites

  • 3 months later...

This issue was solved over email.


noLookAheadSupression has a default value of false, when it is changed to true there will be an issue with lookahead.


This issue can be corrected by changing the jog move commands used in PLCs on PMAC from native jog commands to command quote jog commands. Examples are shown below.


Original Commands -> New Commands
Jog+1 -> Cmd “#1j+”
Jog/1,2,3 -> Cmd “#1..3j/”
Jogret1,2,3 -> Cmd “#1..3j=”

Link to comment
Share on other sites

This topic is now closed to further replies.

  • Create New...