question

David Seo avatar image
0 Likes"
David Seo asked Jason Lightfoot edited

A script ? when many quantities of control and sensor variables in OPC UA ...


I am making a model connected with OPC UA and needed to be set about 1000 controls and sensors Varaibles used in 200 AGVs like captured image.

emulation-varaibles.png


The test model has 100 AGVs but the real project has around 200 AGVs to have 5~6 data/variables to be connected with OPC UA server.

I want to know how to set the control and sensors variables using flexsim script when making or modifying the model.

I attach the test model.

AGV_DigitalTwin_Test1.fsm

FlexSim 22.2.2
emulationscriptingopc ua variablescontrol and sensor variables
5 |100000

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

1 Answer

Jason Lightfoot avatar image
2 Likes"
Jason Lightfoot answered Jason Lightfoot edited

Can you not use the instance specifier of process flow variables and reference it with %s in the tag address/nodeID?


1665478172488.png


"Tag Instance Specifier - The tag instance specifier is most useful when the variable is set to the Local type. The string defined by this box can be inserted anywhere in the Tag ID box by using %s in the Tag ID string."


If the objects were created as instances in OPC your NodeIDs might then take a format similar to this (where the important part is the AGV array access at the end):

ns=4;s=|var|WAGO 750-8100 PFC100 2ETH ECO.Application.GVL.myAGVs[%s].stopSensor

1665478172488.png (6.6 KiB)
5 |100000

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