Cookies are not enabled on your browser.
To learn more: https://www.automationdirect.com/ls-electric-plc?utm_source=jScmB9ZuZ7w&utm_medium=VideoTeamDescription
(VID-XG-0109)
LS XGB Help File Video: LP519
XG5000 V4.77 2024-06-28
To view the LS XGB Help File please visit: https://cdn.automationdirect.com/static/helpfiles/ls_plc/Content/Home.htm
**Please check our website for our most up-to-date product pricing and availability.
Related AutomationDirect.com Part Numbers: N/A
In any motion application, there will be times that things don’t work correctly. The XGB PLC uses error codes to identify issues with the motion system either prior to or during a move. Perhaps the position data table settings are incorrect, or an emergency stop instruction has been called. Whatever the cause of the issue, once it has been resolved, we will need to reset our axis prior to resuming motion. The XGB PLC uses the XPM_RST function block to accomplish this. Let’s take a look at this function block, how to configure it, and how to use it to return our axis to a ready state. In this example, I have the “XEM_Motion_Training” project open. This file is available to download from the XGB interactive guide at AutomationDirect.com. It is designed to allow us to simulate a 3-axis motion control system without having to have any physical hardware attached to the CPU. We are online with the PLC, in monitor mode, and the figurative axes in our project have all been made ready and homed. Let’s take a look at our error reset function for axis 1. If we go to the project window on the left side of the screen and maximize “Axis1_Motion_Program” we can double-click on “Program” to access the ladder logic for this program. We will scroll down to line 17 and we see that anytime the “Axis1_Command.Reset_Axis_Error” bit is true, we will request an axis reset. This axis reset is for Base 0, which our main PLC base, Slot 1, which is our pulse motion controller slot, and Axis 1. The SEL input is a bit value that can be set to true or false depending on whether we wish to attempt to reset common errors or axis errors. In a pulse train motion system this will always be false, as only axis errors are possible. When the reset attempt is complete the “Done” bit will be true. If no error occurred to the instruction during reset, the “Stat” value will be 0. It is important to note that this status value is for the instruction, not the axis. As we can see, the axis error reset function block is extremely simple and straightforward. We can also use system flag variables to know if the axis is in error, what error has occurred, and make logic statements based on this. Let’s go on the left side of the screen to the “Global/Direct Variables” screen. If we then go to the “Flag” tab, select “Positioning” from the “Flag type” drop-down, and then scroll down, we see that we have a Boolean flag variable for Axis 1 error status named “_POS_1_Err.” Let’s add this to the monitor 1 window. We also can keep scrolling down until we get to a Word flag variable for Axis 1 error number named “_POS_1_ErrCode.” Let’s add this one to the monitor 1 window as well, and we will display the data as an unsigned decimal. We see that the Boolean shows false, and the error code is 0 indicating no error with this axis. Now let’s cause an axis error in the system. One of the easiest ways to accomplish this is using the XG-PM software. We can open XG-PM from the XG5000 software by going to “Tools>Position Control.” Once XG-PM opens we will open “Xem_Motion_Training_XGPM” which is the XG-PM file associated with the “XEM_Motion_Training” project. If we go online with our motion project, go into monitor mode, and then open the system view it will show us live status for all 6 axes in the motion controller. If we look at Axis 1, we see error code shows “0” for “no error.” Let’s trigger an emergency stop from the software, and we now see error code shows “481.” If we look at the “Error Status” tab of the “Message” window we see that code 481 corresponds to an “Internal emergency stop error.” Since we manually triggered the error, no further resolution is needed. If an actual axis error had occurred, we would need to troubleshoot the problem before continuing. The “Error Status” tab also has an “Error Fix Description” column that often can help us with diagnosing the issue. Once the issue has been resolved, the axis is still in error and needs to be reset. Let’s go back to XG5000, and we see that the error status bit shows true now, and the error code is 481, which matches our XG-PM error code. If we go to line 17 of our Axis 1 program and make the “Axis1_Command.Reset_Axis_Error” bit true, we see the instruction “Done” bit go false during the reset and then true again once the reset has occurred. We also see our axis 1 error bit go false, and the axis 1 error code value go back to 0. We can return to XG-PM and further verify that the error code is back at 0, indicating our axis is ready to operate again. Unfortunately, we cannot always prevent axis errors, but when they do occur, resetting them is simple and straightforward using the XPM_RST instruction for the XGB PLC.
Safe &
Secure
Voted #1 mid-sized employer in Atlanta
Check out our
job openings