You are here: Advanced Topics > Motion Techniques > Practical Applications - Camming > Cam on the fly

Cam On The Fly

In addition to creating and modifying a Cam Profile using the IDE"Integrated development environment" An integrated development environment is a type of computer software that assists computer programmers in developing software. IDEs normally consist of a source code editor, a compiler and/or interpreter, build-automation tools, and a debugger, an application programmer can also create or modify a new Cam Profile directly from their application. This allows new Cam Profiles to be defined while the application is still online, without stopping the machine to load a new application. An application programmer might use this feature to modify their application at runtimeIn computer science, runtime (or run-time) describes the operation of a computer program, the duration of its execution, from beginning to termination (compare compile time). Within KAS, runtime also refers to the virtual machine that manage the program written in a computer language while it is running to adjust their Cam Profiles for varying product shapes and sizes.

The following steps will guide you through creating and building a new Cam Profile on the fly.

  1. Before the motion engine is started, reserve memory for the profile that will be created on the fly. This is done using MLProfileCreate.
  2. Define the profile properties and profile data points. This can be done at any time but must be done prior to calling MLProfileBuild. See Example of How to Use MLProfileBuild.
  3. Build the profile with MLProfileBuild. This takes a number of cycles and the profile will note be ready until the "Done" flag is set to TRUE.
  4. The newly created profile can now be used exactly like a profile built in the IDE; it can be used in any number of camming relationships using any of the PipeNetwork and PLCOpen Cam Profile functions/function blocks.

Once you have created a Cam Profile using MLProfileBuild, if you need to modify that Cam Profile you must first release the existing Cam Profile. The following steps will release the Cam Profile.

  1. Ensure the profile is not in use (Deactivate the existing profile). In Pipe Network perform a MLCamSwitch on an active Pipe to a different Profile or deactivate the pipe. In PLCOpen, perform an MC_CamOut on the profile or abort a profile move. See MLProfileRelease for more details.
  2. Call MLProfileRelease with the desired ProfileID as its input to release the profile so it can be modified.
  3. When the "Done" flag is set, the ProfileID will be free. Modify the existing profiles data and then rebuild the profile MLProfileBuild.

An application is limited to 256 Cam Profile IDs. If additional profiles are desired, an existing profile can be released with MLProfileRelease. This frees its ProfileID so it can be used in the construction of a new profile. Releasing a profile is simple, and is performed with the following steps.

  1. Ensure that the profile is not in use (Deactivate the existing profile). See MLProfileRelease for more details.
  2. Call MLProfileRelease with the desired ProfileID as its input to release the profile so it can be modified.
  3. When the "Done" flag is set, the ProfileID will be free and the old profile can be used for a new profile, calling either MLProfileInit or MLProfileBuild.

 


Stay Connected with Kollmorgen

Copyright © 2015 Kollmorgen™