lamboom

MrPLC Member
  • Content count

    185
  • Joined

  • Last visited

Everything posted by lamboom

  1. In Part One of the Question: "Can the Omron NJ CPU make the Random Sea?"     There were some fine opinions about that.   This example is what it looks like using Red Lion, Delta Motion RMC75E and LinMot:  https://www.youtube.com/watch?v=SQd6YzBWVvI Recent edit:  The "Big Trycky Omron Question was asked many, many times not shown on this Forum.   I had a very difficult time getting a straight answer from many people at Omron and LinMot.  Probably because they really never tried to do it.  By  the end of THIS thread ( part2 ), Thanks to innoaloe I know that the NJ can generate the position signal, as streaming position data with no time limit, and produce a "randomly" generated model of the ocean's surface.  The "random" part isn't added yet, but, it will work... and the LinMot part isn't added yet .. and it is still unknown if that will work.            
  2. Gadzooks!   you're up at midnight +   it's 9:28 AM here.. ooops.. I just noticed you sent this 44 minutes ago... (I've edited my reply) Observations:  Program is working (sort of) .. and It's interesting what is happening. 1) There were only 2 warnings for your program, after I added the HMI: I made them Global Variables, an that made Sysmac happy. 2) I've noticed the TON is active all the time, starting with P_On, and so CSine is always changing value, before one activates the axis: 3)  activating the axis can be tricky.. with CSine not at zero.. a discontinuity can be large enough to cause an error when Axis is activated..   I added a "Axis_Activate" to the input line on both TON and the ST below it.. Works great now.. However, when random phase drift is added.. the output "CSINE" must be at zero, and slowly ramp to full Amplitude in about 3 seconds. That way starting discontinuities are never a problem.  Also, there is the necessity to manage the final output amplitude, with a percentage modifier, slide or input on the HMI ... which will make quick changes to the average amplitude of the Sea, without adding any changes to the component's relative amplitudes.  FYI: The amp/per component relationship is critical to the authenticity of the Sea state... nice to have an FFT component on the HMI too. 4)  I'm curious why we don't see any information in any of the other boxes (notice the exclamation marks)   Also, in the picture, the CSine on the left side of the final equation is equal to the CSine on the right.... I guess things are happening so fast, they don't register at all?    It looks like CSine is changing by magic... With the inputs as follows: The motor is making a nice sine summation response ... Congratulations! By the way.. watching the seemingly random way the TON is working ..  and this program is working .. I still have very little understanding as to why it is working .. I must play with the Data Trace feature of Sysmac...    I get the feeling that the NJ is either brilliant, or excessively complicated  .. to be continued. GADZOOKS! .... as i look at this thread.. it's enormous ...  I'm thinking of removing much the problems.  unless you like it as is... ?  
  3. Hello again inno  -  I'm so happy that you appreciate looking at this project.   It's been a goal for me since mid 2010 ...   I helped design this "tsunami" tank for the Museum of Science and Industry .. in Chicago, Illinois    https://www.youtube.com/watch?v=crKNeA2pg-s They only wanted a few different waves to inundate two shore designs.  I was hired by the company tasked with building the tank, to do the engineering, and design of the wave maker, tank and shore designs.  I built many models of the shores.  At first the museum didn't want the water to splash the back of the tank, so the shore models were a little longer, and more complicated, with various land formations, and objects that would mitigate flooding, yet permit a very large wave to hit.  When they saw how big the wave could be made (The largest wave took about 800 pounds of force to generate)  They loved the big splash at the back.  However, that's not a Tsunami.. it's just a "big wave"  A tsunami is a very "long" wave with a period in the 10's of minutes.   I managed to talk them in to having many  normal "regular" waves, which could be made at the highest possible amplitude the laws of physics would allow... and yet none of these waves would inundate the shore models.  The cliff model even had islands, a cave.. and a "blow hole" .. but, the museum thought that was too complicated for young minds trying to contemplate tsunamis... so the shore with a cliff became only 2 dimensional, and simple ... I also wanted them to show the "Random Sea" when no one was using the tank.. just to have the normal ocean ... that way, kids could see how waves travel at different speeds, and form up now an them as "Rogue waves"   The tank is 33 feet long! ... plenty of time for that to happen... again.. too complicated... sigh!  Anyway...  Once again, you significantly show the possibilities of Omron's NJ to do this job...  There's no big money here .. in fact, there's probably none.  I'm just trying to make a system that is affordable to schools, and museums.   (the wave tank at MSI was enormously expensive!) 1)  I tried other buffer modes,, but not that one.. I find the manuals somewhat overwhelming .. but, there's always some good stuff there if you keep reading them.. over an over.. 2)  I should have caught that too.. for now, one sine wave was enough.. if that worked, then on to 10 .. or more. 3)  Yup... 4)  Yup... 5)  Sounds complicated.. but I appreciate where you are going with this. 6)  I didn't try to run your original program.. I can't, because my CPU is a NJ101-1000, and using the G5 motor & drive  (I'm already set for 8388608  where did ya get 1048576) ... I changed to 1048576.   works OK. 7)  I made Pi := LREAL#3.14159    what's with this 22/7 stuff? I really like ST... I only shifted the FB out to look at it better .. Remember.. I'm the ultimate nubie .. you probably shouldn't be seen talking to me... By the way... I am amazed by your "Data Tracer"  above.. GADZOOKS! ... is that something in Sysmac? Bye for now.. off to explore your work... Thanks again.   Michael PS:  You will notice my MC axis is Ax0 .. that's from the program that Michael Walch gave me for homing the G5 incremental motor .. I was just adding your program to his for testing.  
  4. News Flash:   innoaloe  Replied to a message I sent him which summarized this thread .. well , it's not really a thread unless someone other than me comments on it.. From innoaloe : Thanks for contacting. Sorry, I'm not really checking on the forum these days. Got some projects going on ATM. Good thing that you've solved the homing issue.   Regarding some of your questions : I'm not really sure what went wrong with the FOR instruction in my previous example. Regardless, I attach here a new sample code (Sysmac Studio *.csm2 file). Just for simplicity, make the workaround with arrays for simpler code I didn't consider the MC_SyncMoveAbsolute function before. Indeed as Walsh mentioned it will be a better option. So velocity limit will be controlled directly from the axis setting, and no velocity input is required. I had given also example in the attached code. Regarding Frequency/Period, my previous example was using Angle as the input of the Sine function. In theory the Angle has relation to Frequency/Period as in Angle = 2.(PI).Freq.time or Angle = 2.(PI).time/Period. So in my original code, I didn't consider the current time. Basically it will continue to the next angle on each CPU cycle What I'm concerned about is the usage of Cycle Time as the "time" argument that you intended to use. There is this instruction to get the Task Period / Cycle Time of the CPU called GetMyTaskInterval, but the thing is it can randomly changed. We can put a maximum limit of Cycle Time, e.g. 1 ms, but should the execution takes shorter than 1 ms, the Task Period will change also. Let's say the cycle time is always 1 ms, putting that into the previous equation will result into a constant Angle. Because Freq/Period is also constant. That means the resulting wave amplitude will also stuck into the same value, to which no sine wave will be generated. So my suggestion is to make a preset Timer, e.g. 1000 ms, then we use the timer current value of the timer as the "time" argument. The Timer will be auto-reset after reaching 1000 ms. I put this in the sample code also. Though, please modify the Axis Setting based on your application. I might be misunderstood about point 4 and 5 though. Regardless you can review the sample should it suitable or not. Oh, and you can call me Inno. Hope your project going down smoothly, Michael. SineControl.csm2 I replied: Hello inno .. What a wonderful reply! ...  I suspected you were very busy.  It's a fine thing you do on the Forum.  I may have said before that I'm not an automation engineer, or designer of motion control systems; however, I do know enough to get in trouble.  I'm only working on "one" project .. don't expect to ever work on another ..     It's been a long process.   Started with linear actuators that could make sine waves (S-curves) but not enough power, or velocity ..  Then, I discovered LinMot ... an awesome linear motor,  Billions of cycles, 1 moving part, very powerful, very fast, accurate, and ... their servos, along with their communication software:  "TALK",  had built in curve design functionality,  storage for 100 curves, I/O's for simple non-PLC  control, and yet, would work easily with PLC's, and motion controllers in networks. When Omron came out with the NJ, with a Motion Control module, two network ports .. I had to find out if it could make the Random Sea.   I'm still not convinced that it can. Thoughts about your welcomed comments and suggestions: 1) I messed up the FOR instruction because I used the wrong data type for "angle" (REAL) .. also I didn't see an "increment" part of your FOR instruction .. if angle was going to go from 1 to 360  ..how fast was that going to happen?  so I added 1 .. which wasn't very smart, because it would only take 360 CPU cycles .. which would happen in only 360 ms!  to complete one sine sequence.. and then would stop.    I should have used an increment of .001  (will try it this morning just for fun if I can figure out the data type) 2) My frequencies (actually inputted as periods).. ocean waves have periods, never frequencies fortunately, nothing should change fast enough to cause a position error/fault in one cycle time (1.0 ms) 3) I should go back to your original plan to see how that would work.  It looked to me like all three waves would be the same period, just displaced in phase. 4) & 5) Yes.. We couldn't use task period cycle time (or task interval).. But, I understand the CPU cycle time is constant, and can be set for 1ms, 2ms or 4ms.  which is fine.  I was actually going to use WaveTime := Wavetime + Cycle time  at the end of each loop, so the only thing that changes in my large summing equation is time by, 1ms.     By the way.. there has to be some amplitude control.  I would put a "percentage" multiplier at the head of the summing equation that could modify the position result from 0 to 150% Also, to prevent violent starting, splashing, and discontinuities at the beginning.. especially when phases are being used, a ramping function for the first 3 seconds of wave calculation would be necessary.. perhaps something like:   //Notes:     //Phx is in degrees     //WTime is in seconds     //CxPer is in seconds     //CxAmp is in inches     // M_Pi  is Pi (3.34159)     //Percent    (inputted as: 0 to 150)     //Height     (0 to 1.5)   equals Percent factor, multiplying the summing position result.                CycleTime:= INT#0.001? This data type is wrong.. but I can't remember at this moment what it should be.. DUH     Num := INT#0     WaveTime:= 0.0 // Assume Percent is equal to 25 .. Height must grow from 0 to 1 in 3 seconds from start_wave. or 3000 cycles // The following is a 3 second ramping time for the variable “Height", making it go from 0 to "Percent" in 3 seconds.           Num:= INT#0           REPEAT           Num := Num + INT #0.001 (must fix data type)           UNTIL  Num > 3       // it will take (3000) 1ms cycles to reach 3 seconds           END_REPEAT;         Height := Percent * Num / 3.0;         WAmp := Height * ( C1Amp * SIN( 2.0 * M_PI / C1Per * WTime + Ph1 * M_PI/180.0) +                         C2Amp * SIN( 2.0 * M_PI / C2Per * WTime + Ph2 * M_PI/180.0) +;                               C3Amp * SIN( 2.0 * M_PI / C3Per * WTime + Ph3 * M_PI/180.0) +;                               C4Amp * SIN( 2.0 * M_PI / C4Per * WTime + Ph4 * M_PI/180.0) +;                               C5Amp * SIN( 2.0 * M_PI / C5Per * WTime + Ph5 * M_PI/180.0) +;                               C6Amp * SIN( 2.0 * M_PI / C6Per * WTime + Ph6 * M_PI/180.0) +;                               C7Amp * SIN( 2.0 * M_PI / C7Per * WTime + Ph7 * M_PI/180.0) +;                               C8Amp * SIN( 2.0 * M_PI / C8Per * WTime + Ph8 * M_PI/180.0) +;                               C9Amp * SIN( 2.0 * M_PI / C9Per * WTime + Ph9 * M_PI/180.0) + ;                               C10Amp * SIN( 2.0 * M_PI / C10Per * WTime + Ph10 * M_PI/180.0));        WTime:= WTime + CycleTime; // the servo position calculation continues until stopped, with the WaveTime incrementing each cycle time of 0.001 seconds           Yes ... I think the NJ doesn't calculate sines this way... I will have to adapt...    Hopefully, your example will help. Thanks so much for an example code....  I'm going to owe ya big time 6) PS:   We should keep this on the Forum.. for the members benefit.  Although, I suspect position as a function of time is not often a factor in machine design. He Then replied: Hi Michael, it's about midnight in my place now, so I'll look more into your algorithm later on :D   I still had a little doubt though about the idea to use 1 ms as increment value by depending only with the CPU cycle time. As I stated before, even though we set up CPU cycle time to 1 ms, it may goes faster than that if the whole program execution doesn't need that much time. Let's say the actual cycle is only 0.5 ms, you'll still adding 1 ms to the sine wave time counter, which will cause the sine to progress faster than it actually is. You can check the actual/minimum Cycle Time from the Task Settings. I attached an image to find where. So if you need to really kept the increment time to 1 ms, it's better to use the TON function that I provided before on the sample with Set Time to 1 ms. Regarding *.csm2 file, it is a compact version of Sysmac Studio project file which only contain programs and hardware setups. The *.smc2 file will also contain Data Trace Logs (yes, Sysmac can do that, you can check whether your sine goes correctly by simulation first) and Event Logs. This usually takes 2 MB file size at minimum. On the contrary *.csm2 files would goes around hundreds of KB at most. Since you're the topic owner, feel free to share this thoughts on the forum :D Cheers, I'm gonna hit the sack atm
  5. NJ501-1300 Ethernet/IP configuration

    Hi Jpratik92 .. I feel your pain..  I had the same /similar problem.  Network Configurator is a nightmare for me..  Not only am I a newbie on the Forum, but also a real Nubie when it comes to Automation Engineering with networks.. so, I can't help you .. yet.     However, if you do find help here, and I think you will, I will be watching ... for my own education.. Good Luck! 
  6. OK... The  FOR loop runs .. (had to see that work...)  But  It really can't do this job .. at least not the way I have it:                                                 When I look at this .. It doesn't look to me like this will make a sine wave .. If it did, it would be faster than the servo could follow...  Ya gotta have time in there somewhere.  The CPU is going to cycle every 1ms ... 360 ms later, the FOR loop would have completed...  This is not the way to make sine waves... unless you're working with radio frequencies or are Tesla. I'm starting to think the FOR loop is not even necessary for this... I'm going back to square one.. an' just do it with the main equation, using cycle time .. standby..    
  7. Hi... Trying to keep it simple: Want to make a G5 incremental motor wiggle, CW/CCW in a sine wave motion, Thought this might work:                                                   The variable,  "Angle" is REAL, Phase1 is REAL, AMP1 is LREAL, CSINE is LREAL .. Sysmac doesn't like "Angle" in the FOR statement .. Anyone know why..? Thanks Much, Regards, Michael
  8. Wow!   Thanks all for the great input.  I suspected something was goofy with the data types...          Berti Baker - I could swear I read the data types for FOR had to be "REAL"  ..  I'm gonna go back and find  it again...Thanks         BobB - I thought that too.. so I changed it to Just "A" .. an' got the same result .. (again wrond data type)  .. back to the books...thanks         Michael Walsh - again, you have made my life happy... Thanks...       again ...   PS;   Is this really the best way to create a sine wave motion?    methinks, it's over when we get to 360  ... what if I would like it to continue forever?  
  9. Thanks Crossbow - always a big help  
  10. Hi .. A small issue you might run into..   I just ran the Sysmac Auto Update program and  there was one file listed, version 1.17   … hmmmmmm, I thought it was strange because I already had updated to V1.17 not long ago … well, perhaps this one is actually 1.176 … or something like that?… so, I checked the box, and selected “install”     After about 45 minutes .. the window changed and suggested a “restart” to enable the update to take effect… so I clicked “Restart” ( in that window) .. computer then shut down.. didn’t restart!   So, I started it up… and waited ‘till all was good to go…. clicked on Sysmac icon…. got the “do-ya-want-this-program-to-make-changes-to-this-computer” window… I clicked “YES”  .. and, the window went away…  and, nothing else happened…   All attempts failed to get Sysmac to launch… even disabled the security system that pop’s up that “Do-ya-want…”  .. no positive effect.  I tried everywhere in the PC where that Application Icon was...same problem ... Sysmac fails to launch.  So, I’ve reinstalled Sysmac, and am starting over.   Methinks this new “update” called V1.17 , is defective.. be careful….
  11. Actually.. everything is not working properly .. recently, the Auto-Updater , or someone else wants to "Configure" Sysmac.. actually, it's Windows that wants to make some sort of adjustment to Sysmac every time I launch a project:                                                  I let this window have it's way.... once ... even tho it took a long time to fill up .. then, it asked me to load the DVD.. Which I did.. then it took even longer .. and finally changed the window to 60 Min. Remaining... then after a minute .. 70 Min Remaining .. when it got to 112 Minutes remaining.. I clicked "Cancel"  ... It went about undoing itself.. then started again from the beginning... I Canceled again.. it launched a third window starting again.. and I Canceled again...   It only does that routine 3 times... I checked with Auto Installer.. and get this:                               After loading data, this window pops up stating that Sysmac is Up-to-Date ... Really... then what's going on with "Windows Configuring Sysmac Studio????      
  12. Thanks... You're a wonderful person... don't ever change....
  13. I would like to use the actual Cycle Time (in seconds) of the NJ101 CPU in a Structured Text  math equation.  You might also call it the Task Period... However it's called, It needs to be the amount of time that has elapsed from the last calculation of the ST math equation.  It must be a variable that also satisfies this looping equation: Time:= Time +cycle time .. so that the master equation, which is calculating position information, based on TIME .. is up to date with each calculation in the loop. How do I insert that cycle-time, which might not be identical for each loop, (or, is it) ?  Thanks, Regards, Michael  
  14. Hi Crossbow... I'm Joking!.. I always assume I'm not being insulted ('tho I probably deserve it) .. And.. Yes it should be in the manual...   There's a lot that should be in the manual...  But.. It's a good manual ...    I'm always afraid the members are going to think.. why doesn't this nube use the manual ...  sooooooo .. I was just accepting a perceived challenge to "find it"         Please take no offense .. I love you ... really!    
  15. I just don't want to break it.. and I can't find anything in the thousands of Omron's manuals that say how to remove it.. using a screw driver?.. squeeze something?  Expiring minds need to know,  thanks... Regards Michael
  16. What are you saying here Crossbow.... ?  Did you mean to say: "It should be mentioned in the safety section... but it isn't."   ... Or,  If I had looked, I would have found it in the safety section of the manual. ?      Sounds like you may be impugning my ability to find specific information in the hundreds of thousands of Omron's pages.   I admit it ... sometimes, it's all I can stand, I can stands' no more.  when it comes to "finding" things in the Omron manuals ... The search function is a life saver... In this case, it didn't help.   I might go look again, if this is a challenge.. I accept it!
  17. Hi Crossbow...  Thanks... Actually, I think I do need to see it... or at least a cycle count that increases with each count by 1*CycleTime...   Time is an element in the equation.  Without time, the Frequency or Period of a sine wave could not be constructed.  Time must be in the calculation.  Is it perhaps just a system global variable?   Easily, called, normalized to zero, and modified by each "cycle time"? Perhaps I won't care about the "Process Time"... because it must fit inside of the cycle time...  If the cycle time is 1ms,  Time would start at zero with the first cycle, and increase by 1ms for each additional cycle.. until the sequence is stopped.? OK .. I get it.  The cycle time is fixed. (1ms, 2,ms or 4ms) but, Omron doesn't count the cycles, I'll have to.   Thanks again.
  18. hI.. I've asked for this in the past and, so far, haven't been very lucky.  Most of the projects I run into have 4 or 5 axis, lots of analog and sensor input.. or don't have the HMI part of the "Machine" I have a nice NJ 101-1000 with the NA 7 inch HMI.. along with a R88BD-KNA5L-ECT servo and a 50W  G5 motor.. type  R88M-K05030H-S2.  All On a nice rack with power supplies and some EtherCAT I/O  (It all functions .. even "MC Test Run" gets the motor to jog ..    But.. no way to "home" it.... The motor is in "rotary mode"   but... it's NOT got an Absolute encoder.. it's a incremental... sniff!     I just want it to stop on zero ..Or anywhere, and call it zero ... and make moves plus an' minus in degrees, that's all....  I assume I have to send it some signal (push button) while it's spinning that tells it it's in "Proximity" to home and it then it does something which makes it end up on zero.    I've homed a lot of linear motors (LinMot) an' they are very easy to work with.    But, Omron has 10 different homing modes .. and they aren't very well explained.  Well, they aren't explained at all in that 502 page user manual... you have to already know how to do it, in order to understand the explanation... Example:  Take the "Home Proximity Input Signal"  .. I can imagine what it might do, to help control a move to home.  I can even imagine what's making the signal .. and that somewhere there is a place where the homing parameters are set... like the "axis setting table"  .. but, it's not a Global Variable, or a Data Type .. I could imagine it gets into the system from the CN1 I/O connector? or some I/O somewhere? But.. I grow weary of imagining how this system actually works..  Building a simple working project, from a tutorial, or even downloading a simple working project (.smc2 file) and making the minor adjustments to fit my equipment ... would make all the difference in the world.   I've searched Omron's Libraries of .smc2 files.  Haven't found any yet that aren't on the level of "Top Gun" (a seriously complicated project for a 1-week training class) ... Oh there are several.. related to IAG object files .. but those Library files are not "working projects" intended to serve as a Tutorial.. they are limited projects, ready to be configured with IAG Object files, and "your" programming ... So that you can write the programs you need "faster"... which is nice... but, no help here. Somewhere out there.. is a nice simple .smc2 project file where you get to control a simple motor from the HMI  ..Preferably using an NJ CPU and a NA HMI .. home the motor.. jog the motor and input a few "go-to" positions... sigh!..   Like you would do in a One or Two Day class...   This kind of thing should be already be available in the Sysmac Library ... Thanks much for listening..  sorry about the rant.  
  19. Crossbow ... yes... I've read about that.. then they recommend that a Omron engineer comes out to your factory and does the upgrade for you .. because if you screw up.. you now have a nice doorstop ..or "brick"  which is what they used to call a failed BIOS update... on a PC    
  20. Tom_b_ie -- Hi..  I wish I did.. Looks like a great source for everything!   I'll see if I can find them
  21. Michael- Thanks for the info Someday.. I may have the guts to attempt a firmware upgrade of the Nj101 -1000  .. I hope it will be good enough to test the final project for what I need.  
  22.   Hi Michael ...  Having a great time building the HMI and CrossBow's IAG objects...    Added Jogging an' the Start Moving button .. and linking everything I can to CrossBow's lamps Started to synchronize an' install into my system.. and, shock and horror ! ... your project is V1.13 ...  an' my Nj is V1.1 ... hmmmm...     Now that we're on that subject.. I've never been able to understand what's going on with the version selection when creating a project...   ...  I changed the version to 1.1   .. Still wondering what the point of the project version setting is..  Seems like .. Sysmac ought to know what the version of all the devices is .. and automatically adjust what ever it needs to be able to work with them....
  23. Michael - Thanks again.. you have made it very clear.  The Manual (W507-E1-14) does a reasonably good job with the homing of an Absolute G5 .. I suspected I could use the Home Proximity (toggle switch) .. click it while the motor was searching... then it would go to where ever the z-pulse was.. an I would call that Home.   But I didn't see any place to put the proximity signal .. Your comment in the ladder program .. basically said the home position would be where ever the motor was when powered on...     Which is fine...    I just didn't appreciate how to use the "home proximity signal" .. if I wanted too  (kinda still don't understand how to use it)    Does that "input" show up on the input side of the "Home" function block .. If you chose something other homing mode?       Because, I just don't see where the "signal" connects to the Function block for homing .. or... perhaps it doesn't .. it connects to the servo drive?... hmmmmmm.
  24.   Michael-  Sorry I didn't remember your comment about the incremental motor..  you did say this project was for the absolute encoder... I didn't know what it had until just before I sent you a message.  I would like to talk about the options for using "incremental"... the end position isn't so important ... it could home anywhere...  I just need a "initial position".. called zero .. that the motor could move CW and CCW from a streaming solution of a random position signal.. which is the summation of many sine waves.