s1fis

CJ2M with NA & NB ethernet network lags

16 posts in this topic

Hello everyone.

I'm working on a project which contains one CJ2M-CPU35, two 15" NA and thirteen 5" NB HMI's.

I will try to be simple and comprehensive. The PLC has 320 dig in, 112 dig out, 104 analog in (total analog points are 250) and 4 SCU for 6 networks with othern CP1L and two dot matrix printers. The user alarms on NA contains around 1500 alarm with events and subroutines to run in every alarm for the printout via PMCR.

When I run both NA alone or with a couple of NBs, the performance is good. Not perfect, but good. At the mean time I select for all the variables 100msec update rate. Before I had some tags with 500msec, some tags 1sec, others 5 sec, etc. but the performance was really bad. Now, as I said is good. I changed most of the variables in array set up but I didn't observe any difference. Now I am working to make all the variables in array.

From NA I use FINS/UDP to talk with the CJ2.

The issue I am currently facing is that when I switch on the half of the NB's, the NA - which is the most important for the operators - starts to lag, i.e. it takes several seconds since I press Ack and print until you are able to use the touch again. It freezes for these seconds.

 The NBs are used only as repeaters for the alarm list (around 1000 alarms here), some group alarms and a few indications. I am using timers for data transmission but I didn't see any improvement.

I think the project is heavy for some reason. It takes a few minutes to start up, until it loads all the user alarms, data log, pages (more than 60), etc. I think I understand that.

Another thing is if the system is running and I stop and run the plc, then the NA it takes........I think never starts again. After 7 minutes I just restarted it and every time I download a program I restart it immediately. 

My question (actually I have a lot of questions) is if this behaviour is normal for this equipment. How can I improve the performance?

Thank you very much everybody!

Joseph

Share this post


Link to post
Share on other sites

Are you running those NBs over Daisy-chain network or a Star network?

Daisy-chaining will most of the time cause lags the more additional Network Switches you add

Share this post


Link to post
Share on other sites

From the CJ2 there is an ethernet industrial nonmanaged switch for the 2 NA and then after 30-40 meters there is another switch for the first 6 NBs and then another switch for the rest 7 NBs. Star network from every switch is implemented.

Thanks for your interest.

Share this post


Link to post
Share on other sites

As you said you are using Star Network, then topology should not be a problem.

Then I guess it comes down to the fact that we are using FINS/UDP. As it uses UDP, all packets will be broadcasted to literally all connected devices. Although the device that is not the target will reject the transmission, it still takes a lot of bandwidth.

In my opinion you can still save the NA from lagging by using CIP communication instead of FINS, because the CIP method uses TCP connection that ensures each NA only talks to the PLC and not broadcasting the packet elsewhere.

Share this post


Link to post
Share on other sites

That sounds good. 

The truth is that I've never use before the CIP and my question is if I change it do I need to rename the variables or something? Anyway I will try to figure it out.

Thanks again. 

Share this post


Link to post
Share on other sites
22 hours ago, s1fis said:

That sounds good. 

The truth is that I've never use before the CIP and my question is if I change it do I need to rename the variables or something? Anyway I will try to figure it out.

Thanks again. 

You don't need to rename them, but you need to register the memory as a Network Variable.
This can be done in CX-Programmer Symbol Table. For example you register the word area D0 as a symbol "Counter" with type of Network Variable selected.

This Network Variable table can exported from CX-Programmer and then Imported to Sysmac Studio NA-HMI editor.

Share this post


Link to post
Share on other sites

Yes, I found the way and I did the conversion successfully.

Unfortunately, the NA was lagging more than before but this time without the NB on the network. Only with one NA.

Now I have downloaded my last working program and after fixing almost all the tags in array, the performance of both NA is excellent but without the NBs on the network.

And even the lightest program to load at the NBs the result is the same. I don't know what else to do.

Could it be a hardware issue? But at the same time the NBs are responding very well! Of course the project there is very light. But what will happen when I connect all the 13 NBs?

Share this post


Link to post
Share on other sites

I think it's too many Ethernet connections to the CJ CPU at the same time, and the CPU is having trouble answering all the requests.

Perhaps adding a CJ1W-EIP21 module and moving some connections onto the second Ethernet port is an option?  I am not sure, as I am not familiar with NB screens and very limited familiarity with the CJ2M.  Mostly a Sysmac guy.

Share this post


Link to post
Share on other sites

The other thing you could do is increase the "Peripheral Service" time on the CJ2. This is the setting that allocates the MAX amount of time given to service the communications. Default is 10% of scan time. On some of my projects when I have problems with screens not refreshing variables from a PLC in a timely manner by setting this up I can increase performance.

 

Untitled.jpg.ceff2fddf859a2bef6bfeb7618f

Share this post


Link to post
Share on other sites
2 hours ago, b.k.n. said:

The other thing you could do is increase the "Peripheral Service" time on the CJ2. This is the setting that allocates the MAX amount of time given to service the communications. Default is 10% of scan time. On some of my projects when I have problems with screens not refreshing variables from a PLC in a timely manner by setting this up I can increase performance.

 

Untitled.jpg.ceff2fddf859a2bef6bfeb7618f

It looks it works!! I will revert later with the results! 

Dear Crossbow, I am already on board and I don't think I can manage to work with this solution. Thanks anyway. I will keep that in my mind for another project.

Share this post


Link to post
Share on other sites
2 hours ago, b.k.n. said:

The other thing you could do is increase the "Peripheral Service" time on the CJ2. This is the setting that allocates the MAX amount of time given to service the communications. Default is 10% of scan time. On some of my projects when I have problems with screens not refreshing variables from a PLC in a timely manner by setting this up I can increase performance.

 

Untitled.jpg.ceff2fddf859a2bef6bfeb7618f

This is one of the feature that will be typically overlooked... Never set this one before. Nice find @b.k.n..
Though I think the longer we set this of course PLC cycle-time overall will be increased by this value.

Share this post


Link to post
Share on other sites
1 hour ago, innoaloe said:

This is one of the feature that will be typically overlooked... Never set this one before. Nice find @b.k.n..
Though I think the longer we set this of course PLC cycle-time overall will be increased by this value.

you are absolutely correct it will increase cycle-time overall if it needs those extra ms to process communication on the port.

Share this post


Link to post
Share on other sites
On 23/3/2018 at 0:19 PM, b.k.n. said:

The other thing you could do is increase the "Peripheral Service" time on the CJ2. This is the setting that allocates the MAX amount of time given to service the communications. Default is 10% of scan time. On some of my projects when I have problems with screens not refreshing variables from a PLC in a timely manner by setting this up I can increase performance.

 

Untitled.jpg.ceff2fddf859a2bef6bfeb7618f

Hi there! I have good and bad news. The good news is that when I set the peripheral service time in 100 and the communication between cj2m, na and nb was almost flawless! Very satisfied! Thank you about this tip!!!

But then I realized that the host link network with the cp1l from the scu31-v1 (pmcr) is dead!!! I cannot receive any data. 

FYI I have 3 scu31-v1 and 63 cp1l with cif11 devided by 6 networks. 

If the peripheral time is default or max 10x0.1ms the host link is OK but the NA are lagging too much! 

I am reading the manuals now to see if i can figure out what else I can do. Any other idea?

For a start I will increase the send and receive wait times in cx protocol. Now they are 0.3sec.

Share this post


Link to post
Share on other sites

Not real experienced with PMCR I have used it like one time. In CX-Protocol there is an option to configure number of retries. You could play with that. Have tried setting your Peripheral Service time to a value some where in the mid range?

Share this post


Link to post
Share on other sites

I am going to try with the retries too. 

I tried also in a mid range but without success. Above 10 the host link dies.

I will play with the cx protocol now

Share this post


Link to post
Share on other sites

Finally, I changed the way of the execution of the pmcr. In the beginning the execution was done by ASL from the logic port. Also the slave address was shifted from the logic port. In this way I observed that it was like too fast and it could not store the data due to higher peripheral time. Then I changed the ASL execution from the logic port with a constant 0.2sec flag and it worked fine!

Now all the communications are very very good and fast! 

The other thing is that the pc online is faster than before and the online editing is very fast too.

For the history the avg cycle time is increased 3 to 5 ms. 

b.k.n. Thank you very much!!!

I think my issue has been solved. Thank you guys. 

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