lamboom Posted July 19, 2017 Report Posted July 19, 2017 (edited) Hi.. Still Trying to make this Position curve: Pay no attention to the glitch (arrow) it's a different system (Think of it as inches not volts) .. this pic just shows what I would like to do with the NJ and a linear motor .. It's like 3 parts. first is a cosine move from zero to peak-to-peak (2 * Amplitude) of a position data stream from a MC_SyncMoveAbsolute fb. The position holds for a few seconds .. then an MC_MoveAbsolute ramps the position slowly back to zero. How hard could it be ... Here's where I am so far: set variables and select for an OFFSET if required: Equation (6) generates the cosine position move .. the trick is to stop the equation when the max positive peak is reached. IF-THEN tries to do that (TLim is a small value 0.001mm) to make sure it's possible for FSine_Tsunami to be larger than 2*TsunamiAMP .. T_Hold starts the TON, and TsunamiRun (the command that started the sequence) goes FALSE. Line 10 does stop the equation at the right time ... it's what happens next where all hell breaks loose. The next trick is to HOLD that last position for 4 to 6 seconds. This just won't happen because there is no way to stop line (6) of the ST. No way to freeze a position while still using the MC_MoveAbsolute, stop using it, and transfer control to a MC_MoveAbsolute. This is my Question ... Delay_Timer.Q goes FALSE because Tsunami_Run is now FALSE (Rung 21) This messes up the axis control by the MC_SyncMoveAbsolute fb. and the linear motor jumps negative a little; However, 4 seconds later, the MC_Move Absolute kicks in (RUNG 31) and returns the linear motor to zero (or Offset, if selected): Everything gets Reset by rung 33 & 34 Sooo.. this program doesn't work, and is certainly not the best way to make the position curve.. The one thing I could really use help with, is how to jump out of an ST equation for a Global Variable that's being generated by the MC_SyncMoveAbsolute .. hold the selected last position.. and transfer control to a MC_MoveAbsolute, to ramp back to zero or Offset. Regards, Michael Update: this same post on PLCs.net has over 2200 views .. and, I did get some good help there (equation (6) for example .. unfortunately methinks there are no Omron engineers visiting PLCs.net very often. Most Omron Engineers are very busy, and I can see why. You do have to do some serious training at Omron schools, and years of internship .. there must be very few Omron Engineers out there. I didn't know this, when i started the Omron project... sorry) Edited July 23, 2017 by lamboom
lamboom Posted July 21, 2017 Author Report Posted July 21, 2017 (edited) UPDATE ... This works... Sort of: The ST and the MC_SyncMoveAbsolute fb start at the same time, when the peak + is reached, StateTracker is incremented to #1), Stop_Tsunami goes TRUE, (rung 32), TCosine_Start goes FALSE (rung 29), and T-Hold goes TRUE (rung 30). FB_SyncMove is disabled: After 6 seconds of Hold, increment State Tracker to#2, which enables Tsunami_ReturnRamp Fb, returning position back to zero: Tsunami sequence ends, MC_Stop is activated, and StateTracker is reset back to #0 This works nicely .. but it isn't with a flaw .. somewhere.. For TsunamiPer longer than 0.3 seconds, everything works as it should. Shorter than 0.3 seconds, (higher velocites, and decelleration ... The linear motor's slider, when first stopped at the peak + position ... doesn't HOLD, it moves quickly negative to the hard stop...and there's a FAULT .. Could this be due to the way MC_SyncMoveAbsolute is "Switched Off" ? Here's a trace from the LinMot drive: Not too bad.. 0.4 sec. rise time to peak of 60mm... But look at what happens at an attempt at 80mm in 0.4 sec: It does it... but control fails at the transition to "Hold" ... so much for holding, .... YET, the NJ has no problem keeping control of a 154mm sine wave at 0.4 sec. period ..... To be continued Edited July 21, 2017 by lamboom
lamboom Posted July 23, 2017 Author Report Posted July 23, 2017 (edited) The fix is two fold: 1) the equation for only 1/2 cosine wave, is not practical, in that in one cpu cycle the position can go from + PeakMax to zero... The position equation must have a few extra points past peak + position ... so, this part of the equation: SIN(Pi * Sine_Time .... should be SIN(2 * Pi * Sine_Time .... or at least 1.1 ...Just to let the IF-THEN statement catch the peak, before it drops to zero. 2) Best to use the ST version of incrementing the StateTracker variable rather then ladder in the adding of different cosine waves in series... The ST: Inc(StateTracker) will get you out of an ST series, and into another ST series if needed. But then, you already knew that if you took the Omron classes ... Thanks for looking .... Regards, Michael Edited July 23, 2017 by lamboom
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now