Jump to content
OMRON Forums

Threads: Motion prog with CommandTS


gmschoon
 Share

Recommended Posts

Within a thread I have sucessfully used CommandTS to phase a motor and enable closed loop operation, however when I attempt to fill a motion buffer and assign it to a CS, the assignment fails.

 

CommandTS("&1 #1->x open prog 1 linear x100000 close")

 

In task manager, program #1 is created, however is assigned to CS#0 (default) with 0 motors. Using the terminal or cmd"" from a plc creates the motion prog correctly using the same command structure.

 

Any ideas as to why this might be failing?

 

Thanks

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

The code "open prog 1 linear x100000 close" is making a motion program. It does not run it or assign it to a coordinate system. This motion program can be run in any coordinate system you want, even multiple at once.

 

Lets say you want to run program N is coordinate system M.

 

Terminal:

&MBNR

&M START N

 

 

To run the program from plc:

START M:N

Link to comment
Share on other sites

The code "open prog 1 linear x100000 close" is making a motion program. It does not run it or assign it to a coordinate system. This motion program can be run in any coordinate system you want, even multiple at once.

 

Lets say you want to run program N is coordinate system M.

 

Terminal:

&MBNR

&M START N

 

 

To run the program from plc:

START M:N

 

Indeed, that command string only creates and fills a motion program buffer, the issue is that following such a command, the motion program detail in task manager shows "CS = 0" & "# of motors = 0" instead of "unassigned". As you say when issuing an online command or script command like start/begin, a CS is pointed to a prog number.

 

I would like to know why the default CS 0 appears to be pointed to the motion program before I have issued any commands that would create such association, particularly when the exact same command string works fine in either a plc or terminal?

 

Thanks

Link to comment
Share on other sites

I am unable to duplicate the "assignment" of CS0 to a program without a command pointing the CS to the program.

 

It is easy to do inadvertently because the default addressed coordinate system is CS0 -- I have done this many times.

 

Even if some quirk caused this assignment without your command, it is of no consequence. It does not inhibit you from pointing another CS to this same program.

Link to comment
Share on other sites

  • 2 weeks later...

I am unable to duplicate the "assignment" of CS0 to a program without a command pointing the CS to the program.

 

It is easy to do inadvertently because the default addressed coordinate system is CS0 -- I have done this many times.

 

Even if some quirk caused this assignment without your command, it is of no consequence. It does not inhibit you from pointing another CS to this same program.

 

Bit of a late update, but I think the root cause was failing to properly close/clear buffers before attempting to write. I have not had any problems since and precede all motion program char strings with "close"... Command("close &1 ..."). I am also clearing all axis definitions with "undefine all" before creating new associations.

 

However, it seems that the motion buffer cannot be opened and filled over multiple consecutive Command(), but instead requires that the prog buffer be opened, filled and closed, all in a single Command() call.

 

I am not sure how the command parser sees the string sent via Command() or GetResponse(), but I had thought this would be similar to the terminal; allowing the prog buffer to be opened, filled over multiple commands and finally closed.

 

Any insights are much appreciated. Thanks

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share


×
×
  • Create New...