Jump to content
OMRON Forums

Axis position report in L variable


Recommended Posts

From the manual, the command "p" is described as
 

Quote

Power PMAC leaves the values for each axis whose position is computed due to this
command in local variable for the communications thread L(256+Sys.MaxMotors+n), where n is
the “axis index” value 0 to 31 (0 for A, 1 for B, etc.)

 

With Sys.MaxMotors=32, I'd expect that the position of axis A would be stored in Coord[x].Ldata.L[288], however the target position (not the current) is present in Coord[x].Ldata.L[512].

It happens in FW 2.5.0.4, cpu PowerPC,APM86xxx.

Is that an error in the manual or am I missing something?
Is there any L variable that keeps the current position for each axis reported like the command "p", or the only way is using the pread and D-variables?

Thanks in advance.

Link to comment
Share on other sites

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

It seems as though the motion program entered a subprogram, thus changing the stack offset, according to the following chart for default settings:

image.png.cb7a35dff42ccf29364747bcff1fc33b.png

 

Is there a Call or CallSub command in the program that's being run?

Link to comment
Share on other sites

Posted (edited)

Actually, as I'm just investigating if it's possible to use the L-variables like the manual says, I have just made a very simple test commanding the movements using the cpx command via terminal.

Is there a call/callsub behind the cpx command?

[Edit]
I have tested with a motion program instead of using the cpx
 

Quote

open prog 1     

    abs  linear     

    tm(Q70) A(Q71);     

    dwell 0;

close

 

And I got the same behaviour:

  • Coord[1].Ldata.L[288] statys as 0, it doesn't matter the value of &1Q71 that use
  • Coord[1].Ldata.L[512] updates to the target position at the moment that I run the program
  • &1p updates with the current value for the whole movement, as expected
  • Using a plc containing the pread is possible to watch the axis A position updating
Edited by leandro.martins
Link to comment
Share on other sites

The motion program that I'm using to test
 

open prog 1
	abs
	linear
	tm(Q70);
	A(Q71);
	dwell 0;
close

Running from the terminal
 

&1 Q70=1000 Q71=100 b1r Ldata.Lindex

I got Ldata.Lindex=0

Also let Coord[1].Ldata.Lindex in the watch table and getting 0 as well.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...