Jump to content
OMRON Forums

Multiple coordinate systems


vignesh90

Recommended Posts

Hello!

 

I am new to PMAC so pardon my ignorance.

 

I need to assign different axes to multiple coordinate systems - X axis to C.S.1 and Y, U and A axes to C.S.2. I need to do this because I have to run X axis in linear mode and the other axes in PVT mode, all synchronized to start at the same time.

 

A part of my code is below: (I have other prog to run motion programs for Y, U and A axes).

 

CLOSE

END GATHER

DELETE GATHER

DELETE TRACE

 

open prog2

clear

ta 100 // set acc time to 100 ms

ts 100 // set s-curve time to 100 ms

f 200 // set feedrate to U*1000 units/s

linear

abs // absolute mode

I68=1

UNDEFINE ALL

&1

#1->240X

&2

#2->500Y

#3->666.667U

#4->138.889A

X7500

close

 

When I run this with "B2R" there's an error that says

Line: 17, "&2;17"

Error 0x3, Data error or unrecognized command.

 

All the axes get assigned to C.S.1. It will be great if I could get some help on how to fix the code.

 

Thanks!

Link to comment
Share on other sites

  • Replies 8
  • Created
  • Last Reply

Top Posters In This Topic

Review the documentation and make sure you understand the difference between *online* coordinate system commands and *motion program* commands.

 

Also, I think you will make your life easier if you let one coordinate system do everything. Why does X-axis have to been run in linear mode? PVT mode can make any move that linear can.

Link to comment
Share on other sites

The following commands will not execute from within a program file, neither motion nor PLC, at least not in the context you are intending. The &2 for instance can be used in a PLC to switch focus between coord. systems.

UNDEFINE ALL

&1

#1->240X

&2

#2->500Y

#3->666.667U

#4->138.889A

Typically, these commands are part of the 'Online' set of commands and execute immediately when they are encountered during download.

A typical download file will consist of a section where a user buffer is declared, axis definitions are made and coordinate systems are declared, followed by Ivar settings, Mvar definitions, and any other card level setup things are done.

This can be followed by PLC files and then Motion files.

A useful template can be created by using the backup tool in executive to create a file that has all the card setup in it. You can edit this file to build your own projects and to get a good overview of PMAC structure.

One other comment: With multiple coordinate systems, you must specify which CS you are running a program in or it will simply assume whatever was set last. So

B2R would be better written as

&2 B2R for example. When used in a PLC to start a motion program it is usual to embed it in a Command like

CMD '&2 B2R'

 

Another commenter suggested understanding the difference between 'online' and 'program buffer' commands - good advice. Many are similar but context matters.

Also look specifically at the 'Command" command.

Link to comment
Share on other sites

I checked the manuals and found &1, &2 etc. are mentioned as commands to activate co-ordinate systems. I understand this works as online commands but I found some motion program examples where this is used as well.

 

How do I go about assigning different axes to multiple co-ordinate systems in a motion program?

 

The X axis needs to run the entire length at a constant velocity while the other axes perform complex looping motions. I thought it would be easier to program X in linear mode instead of splitting the motion piece-wise. It would be great if this can be done easily on PVT, please let me know how. For example, X needs to run 7500mm at 100mm/s while Y, U and A perform sinusoidal motions.

 

Review the documentation and make sure you understand the difference between *online* coordinate system commands and *motion program* commands.

 

Also, I think you will make your life easier if you let one coordinate system do everything. Why does X-axis have to been run in linear mode? PVT mode can make any move that linear can.

Link to comment
Share on other sites

Hi mbalentine,

I understand the difference between 'online' commands and 'motion program' commands. I'm trying to assign different axes to different co-ordinate systems in a motion program. WHat would be the command to activate co-ordinate system in a motion program (if it is even possible)?

 

I have no idea about PLC so don't want to spend time on that at this point. It would be great if I can use 'motion programs' to achieve what I want.

 

Thanks for the tip about specifying the CS to run program in. Say I activate CS 1 and 2 in prog2 and define different axes. Will I be able to run the same program in two co-ordinate systems with the commands &1B2R and &2B2R ?

 

The following commands will not execute from within a program file, neither motion nor PLC, at least not in the context you are intending. The &2 for instance can be used in a PLC to switch focus between coord. systems.

UNDEFINE ALL

&1

#1->240X

&2

#2->500Y

#3->666.667U

#4->138.889A

Typically, these commands are part of the 'Online' set of commands and execute immediately when they are encountered during download.

A typical download file will consist of a section where a user buffer is declared, axis definitions are made and coordinate systems are declared, followed by Ivar settings, Mvar definitions, and any other card level setup things are done.

This can be followed by PLC files and then Motion files.

A useful template can be created by using the backup tool in executive to create a file that has all the card setup in it. You can edit this file to build your own projects and to get a good overview of PMAC structure.

One other comment: With multiple coordinate systems, you must specify which CS you are running a program in or it will simply assume whatever was set last. So

B2R would be better written as

&2 B2R for example. When used in a PLC to start a motion program it is usual to embed it in a Command like

CMD '&2 B2R'

 

Another commenter suggested understanding the difference between 'online' and 'program buffer' commands - good advice. Many are similar but context matters.

Also look specifically at the 'Command" command.

Link to comment
Share on other sites

A few points:

 

1. If you are not changing your axis definition assignments in the middle of the application, they should simply be part of the saved configuration for the PMAC.

 

2. Achieving full coordination between programs running in different coordinate systems is difficult. The whole point of the coordinate system concept in PMAC is that you put axes you want to keep coordinated in the same coordinate system.

 

3. You can use the PVT mode to get the motion of a linear-mode move -- you just have to break up the move into its individual parts (e.g. accel, slew, decel) and command each individually. This may be an easier way to do what you want.

 

4. If you really need to change your axis definitions from within a motion program, you should use the CMD"" functionality to execute the on-line commands from within the program, with the on-line commands within the quotes. Two recommendations for doing this: First, address your coordinate system in each command. Second, put a short DWELL in between each command to make sure they get executed from the internal buffer. For example:

 

CMD"UNDEFINE ALL"

DWELL10

CMD"&1 #1->240X"

DWELL10

CMD"&2 #2->500Y"

DWELL10

CMD"&2#3->666.667U"

DWELL10

CMD"&2#4->138.889A"

DWELL10

Link to comment
Share on other sites

Thank you curtwilson! This is helpful.

 

A few points:

 

1. If you are not changing your axis definition assignments in the middle of the application, they should simply be part of the saved configuration for the PMAC.

 

2. Achieving full coordination between programs running in different coordinate systems is difficult. The whole point of the coordinate system concept in PMAC is that you put axes you want to keep coordinated in the same coordinate system.

 

3. You can use the PVT mode to get the motion of a linear-mode move -- you just have to break up the move into its individual parts (e.g. accel, slew, decel) and command each individually. This may be an easier way to do what you want.

 

4. If you really need to change your axis definitions from within a motion program, you should use the CMD"" functionality to execute the on-line commands from within the program, with the on-line commands within the quotes. Two recommendations for doing this: First, address your coordinate system in each command. Second, put a short DWELL in between each command to make sure they get executed from the internal buffer. For example:

 

CMD"UNDEFINE ALL"

DWELL10

CMD"&1 #1->240X"

DWELL10

CMD"&2 #2->500Y"

DWELL10

CMD"&2#3->666.667U"

DWELL10

CMD"&2#4->138.889A"

DWELL10

Link to comment
Share on other sites

From the Software Reference Manual for I68:

 

"A coordinate system must be activated in order for it to be addressed and accept commands..."

 

Are you sure I68 is not set to 0? If it is 0, then &1 commands are legal, but &2 commands are not.

 

Try increasing I68.

Link to comment
Share on other sites

Got it, thanks! Set I68 > 0 and it worked.

 

From the Software Reference Manual for I68:

 

"A coordinate system must be activated in order for it to be addressed and accept commands..."

 

Are you sure I68 is not set to 0? If it is 0, then &1 commands are legal, but &2 commands are not.

 

Try increasing I68.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...