lamboom

Big Tricky Omron NJ Question - RESOLVED

15 posts in this topic

Hi
Here's a question I'm about to ask Omron.. as soon as I can figure out who to ask.. It's complicated asking support.. their web email form doesn't make complex questions easy.

Here's the question: Can the NJ CPU program a LinMot linear motor to make the "Random Sea"?

The NJ has a mixed protocol.. Ethernet/IP and EtherCAT (CoE),  and claims to be a "Motion Controller".    I doubt Motion Control is available on it's Ethernet/IP line.. but the EtherCAT might be another story.   Certainly The Omron NJ is a Motion Controller for Omron NJ series drives.. However, how well does it work with LinMot?

Here's the curve.  Imagine a LinMot Linear motor continuously moving, never really stopping, following a real-time, mathematically generated curve, moving positive then negative, at random frequencies and random amplitudes. Almost never repeating a motion sequence. looks something like this:
57f11adad5a86_Plotof6wavesphasedat70Vand

Yet, after a while the motion history fully represents the spectral distribution of energy on the surface of the ocean. Spectrum analyzers can display it, and mathematics can define it.. 

57f12145a92b0_JonswapvsPierson-Moskowitz

I just have to make that sea in a model scale… :-)   (Time scales by the square root of the scale factor)

And keep the water in the tank:

https://www.youtube.com/watch?v=SQd6YzBWVvI


The big question is: Can the Omron NJ get a LinMot Linear Motor to do this? … LinMot thinks YES.. but, isn’t sure.

Yes there are ways to “connect" LinMot to The NJ.. EtherCAT (CoE), Ethernert/IP but… there is nothing in the LinMot drive that can create or store a predesigned Random Sea .. Only a Motion Controller, generating real time motion commands, by running  mathematical equations, "on the fly” can do that.   If the NJ is a true “Motion Controller”, and the LinMot C1250-DS-XC is implemented as an “axis” by Symac Studio, which it is… :-)      Then, there may be hope.

Closed loop, PID feedback remains with the LinMot drive, with special settings in LinMot Talk … Homing might have to be done with the NJ .. or by Digital I/O’s

What do the Omron experts out there think?  Can this be done?

Thanks much, Regards, Michael

Edited by lamboom

Share this post


Link to post
Share on other sites

Hello,

it's indeed an interesting topic, but first of all I want to know what are you trying to achieve exactly? What purpose will these random waves used for?

Back on your question, NJ indeed has a Motion Controller inside, but you shouldn't forget that it's purpose is for Machine Automation. It has no advanced mathematical functionality. Your project for a pseudo-random frequency generator is indeed an advanced mathematics :D

One way you can try to achieve this is by using the Cam Table feature, although it's not really random since the sequence will repeat exactly the same.

Other way I can think of but might become more complicated is by linking NJ to MatLab using SimuLink PLC Coder on MatLab. This way MatLab can be used to create the random spectrum (if you know how to do it with SimuLink, to which I'm not), then sends the sequence in continue to NJ.

1 person likes this

Share this post


Link to post
Share on other sites

Hello Innoaloe

Thanks for the reply, and your interest in the "why" of this project.  The "Random Sea" is only a small part of the requirements for a model ocean simulator.  usually, these tanks of water are quite large.. holding millions of gallons.  However, in museums, and educational environments where marine science is explored, smaller wave tanks, or "wave flumes" are used to study physical oceanography,  motion dynamics of floating structures, and coastal/ocean interactions.. such as tsunamis.

The waves are often generated by a moving structure, such as a hinged flap, or bouncing wedge, or moving wall.  Most of the time a simple sine wave is all that is needed to produce waves of  precise amplitude, and frequency.  When a model of a floating  structure is placed in this environment, and if it has been made following modeling laws of mass distribution, and dimension .. the model will behave precisely the way it would in the real world.    These wave flumes are common in universities for study,  and are found in some museums to display floating structure stability, and instability.. and even make model tsunamis.

As for the NJ's ability to create this "random curve" ... it might not be impossible.. At smaller scales, and for demonstration purpose, the "randomness" may not be required .. However.. One would expect to see a "Rogue Wave" now and then .. created exactly the same way nature does it .. the brief, simultaneous combining of several waves, at one moment in space and time.

I am new to Omron Sysmac Studio ..  I believe there are function block like features, within the ladder logic, which can be mathematical expressions that you write, and if the NJ is a true "Motion Controller", it should be able to provide position voltage, as a function of that mathematical equation, on the fly, recalculated each cycle time.  .. or Not :-)

The NJ may not have a "random number" generator available to modify an equation .. and that would result in a some "sequence repeats" ... which would be kinda OK, as long as there were many sinusoidal components ... so many, that repeats would not be noticeable.    The result would be a spectra of many spikes, rather than a smooth curve like the red one above.

It's interesting that one could link the NJ to Matlab.   I wouldn't know how to do that, and it might not be necessary.  The "equation" for the "look" of the random sea is simply a summation of sine waves.  A good random sea for model studies requires a little more sophistication.   However, I'm thinking the NJ ought to be able to solve a 10 wave series of sines, phase locked and create position control from that sum in real time... for a LinMot EtherCAT drive, within the cycle time of the CPU.  

 

 

 

 

Edited by lamboom

Share this post


Link to post
Share on other sites

The NJ is called a machine automation controller, not just a motion controller.  It offers 2 communication networks by default, EtherNet/IP and EtherCAT.  This is not a 'mixed' protocol, but 2 separate networks, each for a specific purpose.  EtherNet/IP is used for high level communications like between PLCs or to a computer.  EtherCAT is used for the lower level communications, such as distributed I/O, safety, and motion control.  You are correct the motion control function blocks all connect to axes which are connected to the EtherCAT network.

The NJ when used with the G5 or 1S series servos can in fact do something called 'cyclic synchronous positioning' where the position of the motor is updated each PLC cycle based on a live value.  But the math you are going to have to do to generate your number may in fact me a bit much for a machine controller.  I do not know if any testing has been done controlling LinMot devices.

You have a very specific application which is most likely going to require a PC based controller, not a factory automation device.  Factory automation programs are designed to do the same thing over and over.  Your custom wave form is quite a bit more complex than that.  Perhaps Delta Tau (recently purchased by Omron) would have something you could use, as they do much more specialized motion control devices. 

Share this post


Link to post
Share on other sites

Hi Crossbow .. I like your cat

Your take on this is much appreciated.   At this time I am only interested in the possibility of the Nj being able to do this.. in some acceptable fashion.  As you can see from the two videos in my post, the means to control a LinMot linear motor in order to make waves in a model test environment is known, and works very well.  I should mention that the Red Lion G3 HMI communicates well with Delta Motion's RMC75E series motion controller via Ethernet/IP.  LinMot has only one (perhaps 2) drives which can interface directly with Motion Controllers.  Here, the B1100-VF-HC is being controlled by Delta Motion, which is generating the random sea curve.  Closed loop feedback is provided by Delta, using LinMot's Hall effect position sensor.

The NJ looks very state-of-the-art.  And, Linmot has designed a drive just for the NJ (C1250-DS-XC) which is recognized as an AXIS in Sysmac Studio.  I'm not well versed in Automation Engineering, just enough to get in trouble... and over the years, I have failed to appreciate the limitations of linear systems and their control ability.  It's hard to know who to ask at Omron if this can be done.  Support is wonderfully easy at Red Lion, Delta and LinMot.  You send an email with a question.. and they answer it.  Not so easy at Omron.. so, I'm betting on this forum and the guys that actually work with these units.  Thanks again for your input.

Share this post


Link to post
Share on other sites

Hello lamboom,

well... from your explanation clearly this project is not what NJ is intended to be, as Crossbow mentioned :

Quote

You have a very specific application which is most likely going to require a PC based controller, not a factory automation device.  Factory automation programs are designed to do the same thing over and over.  Your custom wave form is quite a bit more complex than that.  Perhaps Delta Tau (recently purchased by Omron) would have something you could use, as they do much more specialized motion control devices. 


For this thing you pointed out :

Quote

I am new to Omron Sysmac Studio ..  I believe there are function block like features, within the ladder logic, which can be mathematical expressions that you write, and if the NJ is a true "Motion Controller", it should be able to provide position voltage, as a function of that mathematical equation, on the fly, recalculated each cycle time.  .. or Not :-)

NJ Motion Function Blocks basically need an input of target position relative to the Axis coordinate (can be degree, millimeter, micrometer, depending on the Axis setting). Combining with your compound Sine function would mean that the Sine function output will be inputted to the Motion Function Block as a new target position periodically.
 

Quote

The NJ may not have a "random number" generator available to modify an equation

Indeed it doesn't have one. But a Random Number Generator is never really random anyway since there is certain logic behind it :D
Lot's of Random Number Generator algorithm available on the net and can be applied inside NJ aswell

One rough way to emulate the Sine as I mentioned before is by using the CAMTable function (see picture). Basically you can make a Virtual Axis inside NJ that moves from 0 to 360 degree (that's one period) as a Master Axis. The LinMot will act as a Slave Axis and synchronize it's position relative to the Master Axis position based on how you set it. The only problem with this approach is that you cannot input actual Compound Sine Function. There are several Curve Method inside CamTable that you can use to mimic how the Compound Sine works, e.g. Parabolic function.
By this approach as I mentioned before, each cycle will always be the same. "Rogue Wave" can be created as how you see fit.

CamTable.JPG.6121e6b208226925b5c4828e430

 

Better approach might be to create the actual Compound Sine Function. In NJ you can mix program between Ladder Logic and Structured Text. For mathematical equation a structured text should be an easier approach. If I got your idea right about summation of sine waves, example below should do the job. A better precision can be achieved by changing how the iteration works, e.g. using 0.5 increment of angle.

ST.JPG.dc88fcc64fb932739280f6859c023ce5.


MATLAB connectivity might be an approach you want for a better and fluid Sine control, although I agree that it might be too sophisticated for this project. But just to give you an outlook and references, you can refer to the article below (It's in Japanese, but Google Translate should do the job). Basically MatLab Simulink is used to create a model of inverted pendulum. No matter how you move the base, the feedback control will keep the pendulum from falling down.
http://monoist.atmarkit.co.jp/mn/articles/1410/10/news026.html

 

Anyways, either approach you want to try, I wish you good luck! It won't hurt to contact Omron reps in U.S. Normally you can ask to be contacted by phone using the web form should you need more in-depth discussion, especially to learn using NJ.

Edited by innoaloe
Adding some stuffs

Share this post


Link to post
Share on other sites

Dear Innoaloe

You clearly have a fine understanding of the question... and, I suspect your solution will prove successful, utilizing the mix of ladder logic and structured text.  I really appreciate you presenting details as to how the NJ might function to do this.  My original question was "could it do it?"   I detect some minor skepticism on your part as to how well the NJ could perform in a demanding requirement to match the spectra of the Pierson Moskowitz spectrum (my Red Curve) .. But, that's all in the selection of sine wave components, and the time required to compute a solution within one CPU cycle.

By the way.. your Red Curve looks like it might make a fine "Rogue Wave" :-)

Which makes me appreciate the CAMTable function of the NJ all the more.

As for Sine wave additions, your suggestion to create the compound sine function in structured text is spot on..  that's somewhat how it's done in my little Delta Motion controller.

Your example looks like it would work fine for a demonstration wave tank  (once I learn Sysmac Studio programming..)   My example videos were using only 6 sine wave components, and they were all phase locked, at different phase angles.  If the phases drifted slowly, motion sequence repeats would not be noticeable.

Introducing "randomness" into the wave function is tricky.. one doesn't want to create a discontinuity in the function.   Now, 200 wave components would be remarkably continuous; but, I suspect there isn't time to compute that solution in one CPU cycle.

Thanks for the article on MATLAB .. looks fascinating

Share this post


Link to post
Share on other sites

Omron US does in fact have email address for technical support, though I cannot recall what it is right now.  I usually contact people I already know and don't go direct to the tech support email.

Share this post


Link to post
Share on other sites

I just received several very helpful eMails from Omron Support,  and am thinking this may well be worth trying.  Here's an example:

"The NJ does have the ability to calculate mathematical functions SIN,COS,TAN plus their Arcs along with Exponents and basic math and does have one function to generate a random number and you can have it be made within a certain range.

It does have a seed input but if you set this to zero it will crate a random pattern that cannot be repeated.

Please see page 265 of the following manual."

https://downloads.omron.us/IAB/Products/Automation%20Systems/Machine%20Automation%20Controllers/NJ%20Series/W502/NJ-NX_Instructions_RefManual_en_201512_W502-E1-14A.pdf

.. You know you're in trouble when the manual has 1600 pages... :-)

 

 

Share this post


Link to post
Share on other sites
28 minutes ago, lamboom said:

.. You know you're in trouble when the manual has 1600 pages... :-)

I might change this to say, "...You know that you are in trouble when ONE of the manuals has 1600 pages..."  :-)

Share this post


Link to post
Share on other sites
20 hours ago, Michael Walsh said:

I might change this to say, "...You know that you are in trouble when ONE of the manuals has 1600 pages..."  :-)

'Nuff said :D
 

 

21 hours ago, lamboom said:

I just received several very helpful eMails from Omron Support,  and am thinking this may well be worth trying.  Here's an example:

"The NJ does have the ability to calculate mathematical functions SIN,COS,TAN plus their Arcs along with Exponents and basic math and does have one function to generate a random number and you can have it be made within a certain range.

It does have a seed input but if you set this to zero it will crate a random pattern that cannot be repeated.

Please see page 265 of the following manual."

https://downloads.omron.us/IAB/Products/Automation%20Systems/Machine%20Automation%20Controllers/NJ%20Series/W502/NJ-NX_Instructions_RefManual_en_201512_W502-E1-14A.pdf

.. You know you're in trouble when the manual has 1600 pages... :-)

 

 

Been 1,5 years using NJ and this function missed from my sight (=_=)

I always looking up for it on the Instructions section. Turns out the Random Generator is a Function Block, which looks kinda similar in programming.
Nice finding there.

Last thing to confirm is connectivity with LinMot. As you mentioned LinMot have CoE EtherCAT models so shouldn't be a problem since NJ EtherCAT runs with CoE.
Ethernet/IP should be secondary option compared to EtherCAT if you consider a more "real-time" motion control

Share this post


Link to post
Share on other sites

I think I'm "good-to-go" with the LinMot connectivity issue .. It has to be the "DS" model..  LinMot makes three (or more?)  EtherCAT drivers.   The C1250-DS-XC (Cia402)(CoE) was recommended .. they also make a C1150-DS -XC  ... which is the one used as an "axis" example in the just published "PLC commissioning" manual for their drivers.   (hmmmm?)

In case you are wondering why the LinMot driver.. well, it's because there are billions of cycles needed... and, I like the idea of using mechanics with only one moving part... :-)

 

Share this post


Link to post
Share on other sites

In NJ, an Axis can be a Servo Drive or Encoder Input. Virtual Servo and Encoder also possible.
The part number you mentioned is a Drive, so I think it should work. Just make sure to get the ESI File from the vendor in order to make NJ recognize it.

Share this post


Link to post
Share on other sites

Thanks Innoaloe .. no problem there, this particular drive is recognizable by Sysmac Studio, the file for the tools library exists... :-)

Now the trick is to generate the random position curve using the NJ.  I'm working on a method that would use a random number generator to control the phases of the wave's components..  If a "seed" can be used.. the trace would be repeatable ..  Perhaps, this is for another Forum.

Edited by lamboom

Share this post


Link to post
Share on other sites

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.

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