Signal Lag while data transfer to local kepware server from OPC UA protocol

Signal Lag while data transfer to local kepware server from OPC UA protocol

ajay13101997
Not applicable
32 Views
16 Replies
Message 1 of 17

Signal Lag while data transfer to local kepware server from OPC UA protocol

ajay13101997
Not applicable

[ FlexSim 22.1.4 ]

When we transfer the data every second from flexsim to Kepware on local system, there is the lag in the signal transfer of one second i.e., the signal takes 2 seconds to get reflected in Kepware rather than 1 second.

Ideally the signal transfer should be without any lags i.e., signal transfer every second should get reflected every second.

0 Likes
33 Views
16 Replies
Replies (16)
Message 2 of 17

ajay13101997
Not applicable

The signals from flexsim are transferred every second from 30 stations simultaneously to Local Kepware server

0 Likes
Message 3 of 17

joerg_vogel_HsH
Mentor
Mentor
@TheHero , what are your network settings? For example Baud? If you have set it up with a slow speed all your traffic gets queued up and it feels like a lag.

Can you report back, how does individual runtime reflect to behavior you see on your OPC Server end or in FlexSim program side?

0 Likes
Message 4 of 17

ajay13101997
Not applicable

can i know how we can check behaviour in OPC server end or flesim program side?

Because what i see is the flexsim model run time halts every second for very small time and then moves ahead

0 Likes
Message 5 of 17

jason_lightfootVL7B4
Autodesk
Autodesk

What the ping time between the two devices?

0 Likes
Message 6 of 17

ajay13101997
Not applicable
The refresh rate at kepware tags is 1000 ms.

The kepware and flexsim is installed on same system and data is transferred to local host

0 Likes
Message 7 of 17

bgunnYSPQ
Explorer
Explorer
A very useful free tool for this sort of analysis is WireShark. There is a little bit of learning curve, but watching basic OPC-UA packets being sent and seeing the timing of packets and responses will be the first basic step I'd take.

Depending on your network architecture, you may have more tools available to you, for example if you use managed switches you might be able to prioritize some traffic.

Reducing the number of involved computers/switches/etc. and slowing down the overall rate will make it far easier to understand. For example, if you can set up a test system with one model and one kepware server, directly connected, you can basically eliminate the network itself as the problem, and then only be looking at the two apps.

For the cost of a free registration, you can also get UAExpert which you can use as a client for browsing the OPC-UA server, and I think it has some tools in it with high resolution timestamps so that you can see the traffic that way. you could test the kepware server and UAExpert together without flexsim involved (and also use Wireshark to measure) to see if the problem can be replicated there as well. UA Expert can be set up to cyclically read/write data.

Message 8 of 17

ajay13101997
Not applicable

Thanks for your reply, i have been working with Wireshark and will soon check if I find anything.

0 Likes
Message 9 of 17

ajay13101997
Not applicable
I have tested in wireshark and it was found that even the signal is supposed to be released on first second, All the 30 signals are not sent on single second, but they have 275 milliseconds difference between each signals. Is means flexsim is not pusing the data on single second.


0 Likes
Message 10 of 17

jason_lightfootVL7B4
Autodesk
Autodesk

Can you try adding this to a run start trigger and see if the issue persists?

runspeed(1,RUN_SPEED_HIGH_PRECISION)  //1 represents realtime

You may find that you need the updated emulation library which you find in FlexSim version 23.

0 Likes
Message 11 of 17

Jeanette_Fullmer
Community Manager
Community Manager

Hi @TheHero,

We haven't heard back from you. Were you able to solve your problem? If so, please add and accept an answer to let others know the solution. Or please respond to the previous comment so that we can continue to help you.

If we don't hear back in the next 3 business days, we'll assume you were able to solve your problem and we'll close this case in our tracker. You can always comment back at any time to reopen your question, or you can contact your local FlexSim distributor for phone or email help.

0 Likes
Message 12 of 17

ajay13101997
Not applicable

Thanks for sharing, i have been using latest flexsim emulation library but still there also i am facing same lag.

When i have read/write test with group writing write interval of 500ms i get this results.
But i don't know how to read it.


1682414401059.png

0 Likes
Message 13 of 17

jason_lightfootVL7B4
Autodesk
Autodesk
Did you add the runspeed() call?
0 Likes
Message 14 of 17

ajay13101997
Not applicable

yes

but it still has the same issue.

Also please find the system console error.

1682417456759.png

0 Likes
Message 15 of 17

jason_lightfootVL7B4
Autodesk
Autodesk

@Luciano Cavallero, @Tancredi Canonico, @Fiorenzo A, can you please take a look at this emulation-related question?

0 Likes
Message 16 of 17

lcavallero
Explorer
Explorer
@TheHero , hoping to be still helpful.

In my experience Flexsim + Kepware Server on same machine have a small lags.
So a couple of question: how many signal are you exchanging with OPC UA server? Which are the specs of your machine?

0 Likes
Message 17 of 17

julie_weller
Not applicable

Hi @TheHero,

We haven't heard back from you. Were you able to solve your problem? If so, please add and accept an answer to let others know the solution. Or please respond to the previous comment so that we can continue to help you.

If we don't hear back in the next 3 business days, we'll assume you were able to solve your problem and we'll close this case in our tracker. You can always comment back at any time to reopen your question, or you can contact your local FlexSim distributor for phone or email help.

0 Likes