Jump to content
OMRON Forums

The problem of Coord[x].TPData[i].Pos[j]


shane

Recommended Posts

Now,I need to kown the target position of next move. but Coord[x].TPExec.Pos[j] only include the destination presently executing .so I consider Coord[x].TPData.Pos[j], but it's value do not match the description in pmac software manul.

 

Coord[x].TPData[0].Pos[j] only represent the first line of prog, not the presently executing move ,and

Coord[x].TPData[1].Pos[j] the second line,

Coord[x].TPData[2].Pos[j] the third line ,and so on .

 

How i can I get the next move target position behind the prensently executing move?

20180417235534.thumb.png.78c2d2a8c64baba2048c153958fe0dd8.png

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Set up reporting by setting Coord[x].TPCoords to specify which axes to report and Coord[x].TPSize to the number of moves ahead you need to report. Then just use "t" to show the current target position.

 

If you want the next target position, just query Coord[x].TPData[1].Pos[j]. Per the software reference manual, page 819, i = 0 is always the currently executing move, so i = 1 will always be the next move (i.e. while the moves are executing). Querying them after all the moves are done will not produce meaningful information.

Link to comment
Share on other sites

Set up reporting by setting Coord[x].TPCoords to specify which axes to report and Coord[x].TPSize to the number of moves ahead you need to report. Then just use "t" to show the current target position.

 

If you want the next target position, just query Coord[x].TPData[1].Pos[j]. Per the software reference manual, page 819, i = 0 is always the currently executing move, so i = 1 will always be the next move (i.e. while the moves are executing). Querying them after all the moves are done will not produce meaningful information.

 

did you see my attached pic ,the move are executing.from the Coord[3].TPExec.Pos[6]

,shows the current target position is 100, but the Coord[3].TPData[0].Pos[6] is 300.

P.S:Coord[x].TPCoords and Coord[x].TPSize all have been set

Link to comment
Share on other sites

The Coord[x].TPData sub-structure is intended for internal use, just to buffer the move data from calculation time to execution time.

 

It is a rotary buffer with "i" ranging from 0 to Coord[x].TPSize-1. The data for each new move is placed in the next sub-structure, rolling over to the first sub-structure after it has written to the last.

 

(The manual is incorrect about how the indices are maintained.)

 

Because this structure was intended for internal use, it does not provide an easy way for the user to monitor the state of the structure. If you want to do this, you would probably be best off putting a "synchronizing label" (Nxxx) on each move line, and monitoring the Ncalc elements. Coord[x].TPExec.Ncalc will show you the value for the currently executing move -- you will want to look at Coord[x].TPData.Ncalc values for the next higher value.

 

Remember that PMAC only calculates the next move or moves ahead if it is blending moves together. Your G00 (rapid mode) moves are not blended, so during their execution, you will not have the destination positions of the next move.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...