Author Topic: Test for position stored in POSE file  (Read 254 times)

0 Members and 1 Guest are viewing this topic.

Offline jstolaruk

  • Jr. Member
  • **
  • Thank You
  • -Given: 3
  • -Receive: 4
  • Posts: 61
Test for position stored in POSE file
« on: November 08, 2017, 09:26:40 PM »
Is there a way to test for the presence of a stored position in a POSE file?  For instance, I want to know if P[3] is stored in P1000.

Offline bsrr

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 9
  • Posts: 60
Re: Test for position stored in POSE file
« Reply #1 on: November 14, 2017, 11:08:03 PM »
You will need to store Zero value in P[3], like P[3]=(0,0,0,0,0,0)

You can then maybe have Program like below
REM "Pose File"
DIM Prog1000_posn[3] As POSITION
L1% = 0
USE 1000
*CONTINUE
L1% = L1%+1
POSE2POS 0,P[L1%],Prog1000_posn[L1%],0,1
OPEPOSE 0,P[L1%],V1!,1,0
IF V1!<0 THEN *STOP ELSE *CONTINUE
*STOP
STOP

Offline jstolaruk

  • Jr. Member
  • **
  • Thank You
  • -Given: 3
  • -Receive: 4
  • Posts: 61
Re: Test for position stored in POSE file
« Reply #2 on: November 15, 2017, 04:12:54 AM »
Thanks, but I can't see how this gets what I was looking for.

As an example, lets say file 1000 has the points P[1], P[5], P[10] in it.

If I play this:

USE 1000
LET P1001, P[1]
....
LET P1001, P[5]
....
LET P1001, P[10]
....

everything works fine because the points exist in file 1000

But If I play this:

USE 1000
LET P1001, P[3]

the robot gets stuck and hangs up on the LET statement.  It doesn't even cause an error as far as I can tell.  So it would be nice to know if P[3] actually exists before trying to use it.

Wouldn't the POSE2POS statement hang also?

( this is an FD11 controller )

Offline bsrr

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 9
  • Posts: 60
Re: Test for position stored in POSE file
« Reply #3 on: November 15, 2017, 05:59:55 AM »
What is Function Number used for LET P1001,P[1]

Yes,Controller does not like if a Pose is called for, which has not been defined 
« Last Edit: November 15, 2017, 06:11:10 AM by bsrr »

Offline jstolaruk

  • Jr. Member
  • **
  • Thank You
  • -Given: 3
  • -Receive: 4
  • Posts: 61
Re: Test for position stored in POSE file
« Reply #4 on: November 15, 2017, 12:20:04 PM »
FN634 is LET