question

sunlight avatar image
0 Likes"
sunlight asked sunlight commented

sampling interval of opc ua control variable not working

Hello,

I created an OPC UA Control Variable and set the sampling interval to 10 ms(OPC UA Server updates the variable value every 10 ms).

However, when I print the time out in the "Action," I noticed that the variable updates approximately every 500 ms, even when I set the sampling interval to 1000 ms.

I'm not sure where I went wrong. Please help me resolve this issue. Thank you very much.


emulation.png


FlexSim 22.2.4
opc uasampling interval
emulation.png (28.0 KiB)
· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Luciano Cavallero avatar image Luciano Cavallero commented ·

Hi @sunlight , the "Sampling Interval Time" is how often FlexSim check for values BUT values changes depend from the "Publishing Time" ( 'Update Cycle of underlying system in the picture) of the OPC UA Server.
1695108384465.png

May be that you OPC UA Server has a publishing time of 1000ms so it publishes new values with this interval.
If you check every 10ms you will not see new values for 100 sampling.

The "Emulation Module", available for FlexSim 2023, introduced for OPC UA a "Poll For Changes" option to exceed this problem:

1695108773604.png



0 Likes 0 ·
1695108384465.png (104.6 KiB)
1695108773604.png (63.0 KiB)
sunlight avatar image sunlight Luciano Cavallero commented ·

Hi Luciano Cavallero , thank you very much for your response. The Publishing Time of the OPC UA server is 10 ms, and I can see in UaExpert that the values are updated every 10 ms.

The Emulation module for Flexsim 2023 requires a separate license, so for now, I can only use the Emulation module for Flexsim 2022.

Attached are my FlexSim model and the Python program that serves as an OPC UA server.OPC UA Server.py & sampling interval.fsm.zip

0 Likes 0 ·

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.