Sign in to follow this  
Followers 0
cdroot4383

servo motor stops indexing

20 posts in this topic

Hi, I've started a new job and i am currently in the process in trying to figure out why a servo motor just stops working for a given amount of time. After analyzing the program, i noticed that there was a particular bit (D260) that would get to a number close to 999,999 and then just freeze. When this value in the program is reached, the servo motor will not operate at all. As soon as the power is cut off to the PLC, this value resets and everything works fine. I've already tried to reset this address by tying a reset command to an operation that repeats every cycle. Before i got here, they tried to use a gear reduction and a different servo amplifier and that didnt help either. thanks in advance, chris

Share this post


Link to post
Share on other sites
I assume you mean a word, as a D indicates a data register (16 bits). Your number (999999) is too big to store in one word, so it's actually a 32-bit word using D260 and D261. Any command you use will have to work with double (32-bit) words. Instead of a reset of D260, you could try writing DMOV K0 D260 or you could use ZRST D260 D261. But what is that number supposed to store? And are you sure that erasing it will not affect some other part of the process?

Share this post


Link to post
Share on other sites
I've tried the reset before and it did actually did the same thing when i tried the DMOV KO D260. This value appears to just accumulate the amount of pulses sent to the servo. When i tried the DMOV command, the D260 register would reset to 0 at every cycle, but when D260 would start to accumulate again, it would not start counting at zero, but at the last value before the K0 was moved into D260. Within the Medoc program, when it is running in live mode, on the actual logic, the D260 value is not highlighted in green, so i thought it wouldnt be activated, however on the bottom of the screen when analyzing D260, it is highlighted and this is where the value eventually overflows and once it reaches around 999999, the servo motor stops moving. The only way we've found to reset the D260 register is to turn off the plc. I wasnt able to find a D261 value anywhere within the program, could that be the problem? thanks in advance, chris

Share this post


Link to post
Share on other sites
You do not have to find D261 in your program. if a double word is use the value is automatically stored in d260 and d261. You monitor the value of d261 and check if it changing value even though it is not written in your program. if it changing value that means it has been used somewhere in the program. That can be as part of a double word instruction. Have you try using the ZRST instructions as Chris Mention ????

Share this post


Link to post
Share on other sites
I've tried every suggestion so far and still seem to have the same problem. this time i tried a ZRST D260 D261. when this happends it will reset to zero however, once the cycle starts back again, it reverts to the value right before the ZRST function has started. To me, it appears that this value can only be erased when the power is shut off. is there a command in MEDOC that is capable of simulating this scenario to trick a particular bit or value to thinking that the power is shut off so the program would automatically cycle again. thanks in advance, chris

Share this post


Link to post
Share on other sites
are you sure this value is not read from servo while it's running? if you clear it when servo is not running, it will do just what you describe (be updated next time servo is running). to reset it, you have to reset it in the motion controller. what type of motion controller and serve we are talking about? are you sure this value is not soft limit or overtravel limit programmed into your servo? how is servo initialized? by plc program? can you post your plc program?

Share this post


Link to post
Share on other sites
Motion Controller - FX2N-1PG PLC - FX2N-48MR Servo Motor - HC-PQ23K-UE Servo Amplifier - MR-C20A1-L-UE HMI - E200 series terminal How do you reset the motion contoller? I am not sure if there is a soft limit or overtravel limit programmed into the servo. I didnt know if the E200 was capable of having logic stored into the program, however on the panel is where the user is capable of controlling distance traveled. If it would help, i will try to post the HMI program, but i havent found the software to program the terminals at work. In the manuals it talks about resetting and having the servo return to the home position. Does it matter that the servo motor always travels in the same direction so that it seems it doesnt ever reach the home position? I found out that the pulse generator unit has an over travel limit built in. Is there a way to disable this feature? thanks in advance, chris servo.zip Edited by cdroot4383

Share this post


Link to post
Share on other sites
It seems like your FX2N has one special function module (an FX2N-1PG) which is situated at position 0. The Code in the software shows the following, relating to that module: LD M8000 (Always ON) DTO K0 K19 K4000 K1 Writes a value of 40000 to Buffer Memory 19 of the FX2N-1PG TO K0 K25 K4 M200 K1 Writes a 16 bit binary word stored in the Memory addresses M200 - M215 inc into Buffer Memory 25 of the FX2N-1PG FROM K0 K28 K3 M220 K1 Reads 12 binary bits from the FX2N-1PG and stores them at addresses M220 - M231 inclusive DFROM K0 K26 D260 K1 *****Reads a double word (32 bit word) from the FX2N-1PG Buffer Memory 26 and writes it onto the 32 bit data register occupying D260 and D261. ****** D260 (and D261) is showing you the value in the FX2N-1PG. If things are stopping when this exceeds 999,999 then you need to check the FX2N-1PG manual to find out what Buffer Memory 26 actually means, then work out what to do about it. Bear in mind that this is being reported to the PLC FROM the special function module. Have never used one before, I'm afraid. Cheers

Share this post


Link to post
Share on other sites
Thanks for the explaination of the different commands being written to the pulse generator. From manual number JY992D65301 pg 5-1 to 5-2 I guess it represents the current position and has automatic writing -+2,147,483,648. After looking below to bit#28 there is a current position value overflow. The manual states the the only time the BFM's data is cleared is when the power is shut off. Is it safe to assume that this particular servo will always overflow because it always travels in the same direction?

Share this post


Link to post
Share on other sites
Not sure .... never used one. One thing I would look at though, is the operation of address M208. By definition, M208 is the "Single Speed Positioning Start" bit which your programme writes to the FX2n-1PG. It is shown as M8 in their example on Page 10-6, and is operated by the their timer T0 on page 10-7. Seems like that bit could be a reset bit, as it's the only Command Bit that your programme seems to write. Try turning it on from Medoc and seeing if the value in D260 resets. If it does, then it could be the code that operates that bit which is faulty .... or something attached to it. It's only shown as a PLS element, meaning that it is only there for one cycle scan. I'm only guessing here ......

Share this post


Link to post
Share on other sites
I tried using the M208 bit and it did nothing. from the JY992D65301 manual on page 5-13 on section [b6] it does state that this bit is resetted when returning to the home position is completed or when the power is turned off. i was going to try and write a new home position once the overflow flag has been reached, and hopefully be able to reset the D260 bit and before the next cycle starts, reset the home position back to 0 again. thanks in advance, chris

Share this post


Link to post
Share on other sites
The home position idea did not work at all. Has anyone else ever had an overflow problem like this one and came up with a clever solution. I would think there has to be a way around this problem. Does the problem exist within the servo motor and are there some motors that dont have this buffer memory problem? chris

Share this post


Link to post
Share on other sites
There's a question that needs answering: Has this system ever worked properly? If it has, and the software hasn't changed, then you stand a chance of finding the answer, even though the code has no comments or name file. If it hasn't, then you've got a big problem. I've had another run through the code and there is another place where data is written to FX2N-1PG, look for the value D262 in the attached text file. Best of luck. SERVO2.txt

Share this post


Link to post
Share on other sites
The system has always caused the servo to stop indexing. I wished that the one who programmed this left comment notes on what was going on. I started to piece everything together and if it would help, i'll post the comments i've added to the existing program. The second special function module isnt used anymore (position1). I'm not sure why this part of the program was not removed, since it was supposed to be a temperature controller and it has never worked properly either. As far as i know D260 is the current position of the servo and D200 is the desired distance for the servo to travel. The D200 is a user input from the control panel. thanks, chris

Share this post


Link to post
Share on other sites
I wanted to say thanks for everyone's help. Myself or the machine maker cannot figure out this problem. We are thinking about using a DC motor with an encoder and use the high speed inputs in the PLC or a freq-to-voltage converter. I guess if you need a motor to move in only one direction for an extended period of time, be wary of the servo motors. thanks again, chris

Share this post


Link to post
Share on other sites
well, if that's what you have to do... i guess you need to make it work one way or another. unfortunatelly i'm not familiar with particular unit and given limited amount of info provided I won't be able to help much. let me try to offer some ideas anyway.... (i have a problem, i just can't accept failure... ) i'm still curious to find out what part of system calls quits since this must be either configuration problem or design flaw. if this is caused by servo drive, you should be able to see err on the drives display... what is the application? is this running continuously in one direction so it always reaches limit sooner or later? what is shown on servo drive display when problem occurs? also did anyone read manuals (i know, i know, sorry, but i have to ask...) and can you post wiring diagram for this servo drive? i'm interested in I/Os since there should be something telling drive to initialize. if nothing else, you should be able to simply tell it to initialize again... this should be controlled by PLC. for more help, look into plc program and servo diagram would be required. also, can you post your drive parameters? according to manual (http://www.meau.com/Files/SH_NA_3167-D.PDF), this could be drive problem since max position number is +/- 999999. that coincides with your description of the problem. you should be able to configure drive so it doesn't use soft limits. same limitation DOES exist in FX2N-1PG pulse generator (http://www.meau.com/Files/JY992D65301-E.PDF ). see page 5-1 and parameter #18 and #22. it would be interesting to see PLC program since FX2N-1PG is controlled entirely by PLCs instructions (TO and FROM). this is very simple system and it shouldn't take long to figure it out. there is not much to read. it looks like J2S servo but much simpler/smaller. if you ask me this would work like charm once configured correctly.

Share this post


Link to post
Share on other sites
the wiring diagram is the same as in the manual from SH(NA)3167-D on page 2-4. Starting parameters on servo amplifier PO1 - 31 PO2 - 450 PO3 - 106 PO4 - 5 PO5 - 100 PO6 - 10 PO7 - 10 PO9 - 100 everything else should be at default On a previous post, i uploaded the medoc program. In our application, we are making bags. The cycle is basically a press will drop on the film, then when the press is released, the servo motor will index to the proper length, and then a blade will come down and cut the bag out and this process will continue. When the servo motor stops indexing, the servo amplifier does not show an error when this occurs. It will actually appear that the machine is still working, because the cutter and press will continue to work, but the film will not index since the servo motor stops moving. How would you configure the drive so that it no longer uses soft limits? thanks in advance, chris

Share this post


Link to post
Share on other sites
on most mitsubishi drives i was working use of soft limits was optional and it was configured by setting one of the parameters. it may be that this drive doesn't have such option. in this case you need to clear position counter (or write some other value to it). it is important to find out what causes the stop. it can be servo drive, pulse generator or both. (you should be able to monitor buffers). also try to look at clear input functionality and P6 setup.

Share this post


Link to post
Share on other sites
do you ever get overflow bit set? according to your program it should be M226. pulse generator error flag is M227. one more thing, looking at the manual of the pulse generator, CP (Current Position) is R/W accessible (read and write). This means you can write to CP using instruction such as DTOP K0 K26 K0 K1 according to PLC code you posted, you only read CP and store it to D260: 84 DFROM K0 K26 Moves Double Word from BFM26 to D260 (+D261) D260 BFM 26 is termed the "CURRENT POSITION" K1 and then send servo to next postion (D262). M228 should be positioning complete flag but i don't see what sets M206 or BFM#13,#14. how do you home this axis?

Share this post


Link to post
Share on other sites
The original programmer of this code came by on friday and was able to fix it. I explained the problems to him and he seemed surprised by the programming mistake. He said this is how he has programmed several machines before and never had this happen to him, but since the machine here at work sometimes runs for days continuously, it aroused here. the only thing he did was set M207 (relative/absolute position) bit to always on and in line 463 got rid of the adding function. And since D200 is the value that servo has to travel, further down the code DTOP K0 K17 D262 K1 was changed to DTOP K0 K17 D200 K1 And now everything works fine and thanks everyone for their help chris

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0