Jump to content
OMRON Forums

Where should virtual motor configuration code reside?


zros

Recommended Posts

I am new to the Power PMAC and it's IDE (version 3). I've read a lot of manuals and forum posts, but I'm confused on where some of the configuration code should go.

 

I'm trying to create several phantom motors (software only) in accordance with the posts on this thread: http://forums.deltatau.com/showthread.php?tid=193&highlight=virtual+motors

 

Specifically, the second method referred to in the linked document or the last thread post by Sina.

 

Where is the 'right' place for these definitions in code? Reading the Program Development pdf, it states that “global definition.pmh” should contain all your global variables (global, csglobal, ptr and #define). But, configuration items should be in the 'Configuration' folder since if I put the configuration items in the 'global definitions.pmh', then they would be effectively loaded twice.

 

Do these virtual motor definitions go in the pp_disable.txt file, since this is run first upon a new download? If so, I haven't been able to find an example of this type of configuration code in the pp_disable.txt file.

 

I'm sure there is a 'best practices' on where this should go. I'm not a huge fan of doing all this configuration through a GUI tool if I can simply script it.

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Generally, all "setup" code should go into the Global Includes folder in PMAC Script Language. It wouldn't necessarily need to go into "global definition.pmh", just any .pmh file in that folder. I usually make one file just for my clocks and general system settings, one for my channel specific settings, another for motor setup, one for encoder conversion table settings, one for digital I/O, etc.

 

The main use of pp_disable.txt is to stop any sort of motion or actions for safety purposes before downloading the rest of the project. Generally, this is either left blank or, at most, would contain code such as:

 

&*A //Abort all Motion Pgorams

disable plc 0..31 //Disable all Script PLCs

#*k //Kill all motors

clear all buffers //Clear all buffers

 

That way, the PMAC isn't doing anything as the rest of the project loads.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...