MrPLC Member
  • Content count

  • Joined

  • Last visited

Community Reputation

2 Neutral

About lamboom

  • Rank

Profile Information

  • Country United States
  1. 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     
  2. Tried some other options .. also didn't work well .. one thing for sure,  the equation for FSine_Tsunami is correct provides a new position every 1.0ms to the LinMot Drive.. That part is working well.. just things go badly after the position equals (2*Amplitude) .. the peak to peak value of the 1/2 cosine plot. Using an IF-THEN to jump out of the position calculation.. Turn off the ST (which is not a good idea.. but, what else)  The T-Hold starts a timer for 4 seconds, below: Turning off Tsunami_Run also kills Delay_Timer.Q .. which powers off the MC_SyncMoveAbsolute with brute force .. probably should use MC_STOP,  but that brings problems too. This causes the linear motor to jump a little in the negative direction, but 4 seconds later the MC_MoveAbsolute fb kicks in and the position ramps to zero or Offset, if an offset is selected.   After the return to zero, MC_STOP is activated by TON: MC_Stop is reset by TON:   This still doesn't work... because there isn't a way, known be me.. that will permit this sequence of moves to be done in 3 stages.  Omron doesn't have stages.. but, it does have tasks... perhaps, i should look into that more closely... to be continued..          
  3. 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 has over 2200 views .. and, I did get some good help there (equation (6) for example .. unfortunately methinks there are no Omron engineers visiting 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)        
  4. Hi Michael ...  Glad you are still out there... When you can.. this is what I've got so far:     Line  6 generates the cosine curve, and makes all points positive because of the + TsunamiAmp at the end  (help from "Dirt" from Stockholm, on ... I tried an inverted "Stop_Tsunami" to turn off the MC_SyncMoveAbsolute Fb.. but.. it didn't work... Interesting that there doesn't appear to be a way to jump from an ST line to a ladder rung...  or from an  IF   FSine_Tsunami => 2*TsunamiAmp  (or PeakToPeak) THEN stop calculating FSine_Tsunami and hold at that last position...& start a timer ...  how hard could it be... I'm trying to jump out of the ST when the cosine wave is finished, and hold for 4 seconds This program almost works .. The cosine wave starts at zero (+ a small offset) and, I believe reaches the max positive (2 * TsunamiAmp) .. The GE instruction (Greater than or equal to) should go true when the peak positive is reached..  But, this probably isn't the correct way to stop an hold a position when using a MC_SyncMoveAbsolute. The TON is intended to hold for 4 seconds, then trigger a MC_MoveAbsolute from wherever the hold position is,  back to the offset. instead, when the cosine move should stop ....  the motor quickly moves negatively to the hard stop, way past the offset, or zero position.  sigh! Ya think this has something to do with pulling the plug on the ST that's running the position stream to the MC_SyncMoveAbsolute?   That function block is still on, and generating position data... but, the data isn't changing .. it should be: Offset+ TsunamiSine , which should be Offset + (2 * TsunamiAmp) .. The last calculation of that ST line (6) would be the max positive position (2*TsunamiAmp)      
  5. Doesn't look like anyone is gonna comment on this post ..  I guess this Forum is mostly for the professionals .. That's OK..  I'll keep reading the manuals .. Looks like this should be done in three rungs of the ladder .. I'm close to figuring out how to make the Cosine position curve above.. Got some good help on Forum working now on the way to "jump" out of the calculation for the curve when the amplitude equals 2 * Amp..  .. Sure, might use an IF Amplitude < (2 * Amp) THEN quit calculating the cos curve, and hold for a while (go to a TON,, then after a few seconds.. use a MC_MoveAbsolute to get back to zero... but, ya can't use a "Jump" in an ST IF-THEN expression. Even  if one could use a "Greater than or equal to" FUN in Ladder ... How you would stop the position equation at a paticular point ,   continues to elude me...    Later.  
  6.   Thanks... I'll give it some thoughts ... What you are saying, is exactly what is happening now with the running of the Random Sea, which is one heck of a lot more complicated than a single simple "S" curve.  I might be wrong but MC_SyncMoveAbsolute doesn't care about velocity or acceleration as an input.  It's just going to a new position every 1.0 ms, an' it's going to do what ever it takes to get there in 1.0 ms ..    So, it's really all about position as a function of time.  A position is determined mathematically every 1.0 ms (CPU  Cycle) .. The resulting curve will be a Cosine .. some of the points will be closer together, others will be farther apart.   If the curve lasts 0.5 seconds, there will be 500 points defining that curve.   I've written the code to make sine waves (cosine waves.. same thing just 90 degrees out of phase with sines)  .. Now to make the code that creates just a part of a sin/cos wave .. the part that goes from -1 to +1  ... How hard could it be?          ....well... it's very hard for me.... sigh! Pay no attention to the glitch (arrow): The perfect sequence (without the glich)
  7. YUP... an' that's the problem.. will have to learn how to do that .. I know enough to keep trying...    Thanks
  8. Thanks Crossbow...  When ya have a moment:  
  9. Hi again... more information about the objective. Wanted to explain the problem better: Imagine this Sequence: A typical "S"curve ... generally starts from zero accelerates by a specified amount, then moves at a constant velocity until nearing the end point of the move, where it decelerates by a selected amount and stops at the "end point" .. a distant positive value. Then after a few seconds, another move, slower than the first slowly ramps at a constant speed back to zero... and, awaits the next move programmed and launched by a NA HMI That sequence is what I'm trying to do. In Ladder (Omron), you would probably use the MC_MoveAbsolute function block to make this move. Very easy, and almost intuitive... But.. what if that "curve has to be a "cosine wave"? It starts at zero and moves to the positive end position, and only the "path" is programmed, not the velocity or the acceleration. Now you would have to use the MC_SincMoveAbsolute fb. And the "path" would be calculated in ST .. with the only inputs from the HMI as "Amplitude" and "Period". The final positive end position (amplitude), and the time (in seconds) it would take to get there.  As we are not moving in a complete cycle, only a half cycle ... the "time" could be thought of as half the period. This is some brute force programming, I cannot do .. yet I can generate a sin or cos routine in ST (With some help from Tyler Corbett): (1) Pi:=3.141592; (2) SampleTimeSec:=TOLREAL(TimeToNanoSec(GetMyTaskInterval()))*1e-9; (3) SinTime:=ModReal(SinTime+SampleTimeSec, Period); (4) FSin:=(Amplitude * SIN( 2 * Pi * SinTime/Period); (5) Sine:= Sine + Fsine The global variable Sine is sent to the Position input of the MC_SyncMoveAbsolute (or some Final_Move sequence in ST) Now, The trick is to use 1/2 a Cosine wave (a 90 degree phase shift of a sine wave), and only use the first 180 degrees of the wave.. where it goes from zero to maximum positive (yes, it really goes from -1.0 to +1.0 .. but.. there will be an final rung for OFFSET (6) Final_Move:= Offset + Sine so that all moves are positive) This equation must run only once, unlike the above example which would run forever. After doing that one move.. there is a time delay (TON) then the position ramps slowly back to zero .. and waits for another run. I'm asking for any programming ideas that would control the equation for using only a half cycle.. which starts at zero and moves positive to the input: Amplitude. I don't expect the actual program.. just some text explaining a good method to control the process. Please. I assume the COS instruction would work just as well .. I just don't know how to use the best instructions to control the position equation... Thanks Much, Regards, Michael PS:   The equation (4)  isn't the problem.. to be clear ... My problem is in managing the equation in ST or Ladder programming .. something most everyone here is well versed in.. 'cept me. I'm imagining IF-THAN, and other expressions that will start and stop that equation's position feed to the ME_SyncMoveAbsolute function block which is talking to the LinMot drive via EtherCAT. The perfect sequence (with out the  glitch)                           There are 3 moves: the cosine SyncMoveAbsolute, the Delay and hold, and the MoveAbsolute back to zero  
  10. Hi Crossbow... Thanks for the reply.   Cause I'm an idiot ..      I figured it out .. and posted a last sentence above in an edit...  It must be frustrating trying to help people who are not well experienced in this science.   I am truly sorry I am quite limited in understanding Omron programming, and Sysmac ... The manuals are very confusing as tutorials .. they seem to be mostly "references" ..  I do appreciate "all" of your comments...  REALLY! ...     Check this out:;controls=0&amp;showinfo=0
  11. I see there are some nice math instructions in the NJ's menu.    I can't use a MC_MoveAbsolute.  It must be a Cosine position curve running from zero to a positive max end position. I imagine I can use an offset to start the curve at zero, as the COS instructions produce a wave from -1 to +1 and back again.   The trick is to start the curve at -1 and end it at +1 ... If you know an easy way to do that, please share..     Regards, Michael   PS:   This may seem silly .. but, after finding it so easy programming a Delta Motion RMC75E motion controller to due exactly what I'm asking above... I am surprised as to the degree of difficulty dealing with Sysmac & the NJ ...  The level of complication is excessive, if one tries to go beyond the available Function Blocks, Functions and packaged math expressions.    Sure it's easy to do a trapezoidal move from one position to another.  But, I want a cosine curve (or, if you like, a sine curve) .. they are somewhat the same ... but not exactly the same .. and they are certainly not a trapezoidal move component.       I know The NJ can do sine waves ... Check this out:;controls=0&amp;showinfo=0 Perhaps, this video will help illustrate the problem.  Regrettably, it may require some innovative programming on a complex level ... such work is often done for the programmer by other manufactures of Motion Control modules...  it is certainly beyond my experience, and ability.  Any suggestions, short of actually writing the program, would be a big help in my learning curve... Thanks much.
  12. HI I have 4 small ladder programs ... In 4 different .smc2 files.  Each program uses similar FB' & ST's and FUN's .    I would like to combine all four, each with their own page on the NA HMI.  My attempts haven't been working well .. The HMI is doing everything I wanted.. no problems there.    But, even tho I use different variables in the 4 programs, there are "warning's" that I'm using identical instances .. which is true ..   .. and, programs don't run ..  'tho, they each run quite well, when there is only one of them.   The problem is, I haven't been able to figure out how to isolate, and prevent conflicts between the four programs.  They all control one linear motor, and have it do different things. There never is more than one of the four running at any time I know I can create (list in the multiview explorer) many programs (ladder & ST); also, each can have many sections.    Please suggest the best way to manage four programs, within a single file.. in general.       I've done a lot of reading of the NJ manuals, and can't take the Omron programming class; however, have learned a lot on YouTube .. and on this Forum, ... so I'm not totally dim. If you think it would take too much time to answer this question, please point me to a good reference ... I'm familiar with W502-E1-18 NJ Reference, W508-E1-14 MC Reference, W501-E1-16 NJ Software, W507-E1-14 Motion Control ... so if you are going to suggest using those.. please suggest the page number..      Thanks much, Regards, Michael PS:    It's like having (4) MC_SyncMoveAbsolute fb's in the same ladder prog (not on the same rung)  they all control the same axis, but only one at a time....   OR, perhaps there's only one MC_SyncMoveAbsolute .. and it gets different position information, from 4 different sources ... one at a time?  .....................................................  RESOLVED: It was the last point I thought of above... that approach kinda worked .. an' for now "kinda" is good enough.
  13. The final answer to "The Big Tricky Omron NJ Question... is "YES"     The Random Sea can be created "on the fly" by the NJ.. and control the LinMot "DS" Cia402 EtherCAT drive with precise precision, and power,  matching random wave profiles found on the surface of the worlds oceans.
  14. Hmmmm.... Well... actually I did .. hasn't got back to me yet ... He's far, far away...  Thanks for the info... i searched, but didn't see any info on the latest versions .. guess I coulda activated the "Auto updater" ... what could possibly go wrong... Thanks again....
  15. I have version 1.17  .. and when I tried to import a file from a friend, I got this instead: Is there anything higher than V1.17?