In the previous post, we configured two virtual
servo motor axes to simulate one axis in rotation and the other in
translation. In this post we will make a program with two rotating axes in
RSLogix5000 and use the available Motion Control commands. As we are using
axes whose Data Type is VIRTUAL_AXIS, with no real hardware present, the
available commands are limited. Virtual axes can be used in a project for
several purposes, such as synchronizing axes, multiplying input and output
ratios (virtual gear box) and even to do virtual tracking of objects in
applications in motion.
Testing
Motion State and Motion Move commands via Motion Direct Commands:
Error
16 # 0026 is due to the fact that it is a virtual axis. Even without all
the commands available, it is possible to make a program and test important
points.
Motion
State commands available: MASD, MASR
Motion
Move commands available (all): MAS, MAH, MAJ, MAM, MAG, MCD, MRP
- The program structure is
made using EQU - MOV rungs, which is a simple way of representing a
sequential system, such as GRAFCET, in LAD language. The transition
from one stage to another, is done with the validation of State Bits that
confirm that the current stage has been completed.
- In the example below, a
virtual axis is jogged, with the possibility of updating the running
speed. The axis is stopped with the MASD command, and MARS resets
after MASD. The first movement is a Homing operation to the
established Home position.
A
UDT was created with the main commands and is instantiated as Axis1_CMD:
The
MAJ command makes the jog and the MCD update the speed:
Visualizing
the Trend with the current position and speed of the axis and simulating a
speed change from 100 degrees / s to 150 degrees / s:
There
is also the possibility to synchronize the second virtual axis and to change
the virtual gear box between these two axes. Dynamic results are
represented with Trends that help in visualization.
Proposed sequence of actions / transitions could be:
- Reset from Shutdown or Fault: MASR/MAFR (NEQ .AxisFault, XIO .ShutdownStatus)
- Homing: MAH (.PC transition)
- Move to specified position: MAM (.PC transition)
- Jog: MAJ (.IP transition as no .PC when jogging)
- Change dynamics (e.g. change speed) on MAM/MAJ: MCD (executes when MCD.EN edge falls and edge rises)
- Stop: MAS (.PC transition)
- Shutdown: MASD (.ShutdownStatus)
Axis commands On/Off (MSO, MSF) are not available for virtual axis, but typically the axis is turned Off then On after resetting and before homing.
Worth checking out the instructions help for these commands to see in more details the configurations and possibilites.
No comments:
Post a Comment