question

Apollo S avatar image
0 Likes"
Apollo S asked Ryan Clark commented

How to get an array from opcua server in Emulation

5.png

FlexSim 21.2.4
emulationarrayopcua
5.png (218.4 KiB)
· 3
5 |100000

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

Ryan Clark avatar image Ryan Clark commented ·

Hi @Apollo S,

It's hard to know how to help without looking at your model. To receive a more accurate solution, please post your model or a sample model that demonstrates your question.

Proprietary models can be posted as a private question visible only to FlexSim U.S. support staff. You can also contact your local FlexSim distributor for phone or email help.

0 Likes 0 ·
Apollo S avatar image Apollo S Ryan Clark commented ·

1-3.png1-4.png


The picture below is the result that I have tested. I only want to read all data in the "table" array and print them in Output Console. But in my code, it doesn't work.1-1.png1-2.png1-5.png

0 Likes 0 ·
1-3.png (31.8 KiB)
Ryan Clark avatar image Ryan Clark commented ·

Hi @Apollo S, was one of Ryosuke S's or Ryan Clark's answers helpful? If so, please click the "Accept" button at the bottom of the one that best answers your question. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·
Ryosuke S avatar image
0 Likes"
Ryosuke S answered Apollo S commented

I think its a matter whether FlexSim's OPC UA Client support array datatypes. I never met 3DSimulator which supports arrays. Nothing is mentioned in FlexSim online manual.

If array is not supported, you will need to breakup the array to datatypes(bool, integer, etc.) within OPC server and then send to FlexSim.

· 1
5 |100000

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

Apollo S avatar image Apollo S commented ·

Good Solution!

0 Likes 0 ·
Ryan Clark avatar image
0 Likes"
Ryan Clark answered Apollo S commented

Hi @Apollo S,

The print() command doesn't print to the little output field in the script console. That is just for the return value from the code. The print() command prints to the Output Console. Have you checked to see if the array is replicated there?

I hope this helps! Let us know if you have further problems/questions!

· 1
5 |100000

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

Apollo S avatar image Apollo S commented ·

I have checked. The Result in Output Console is 0. I can't get the array.

0 Likes 0 ·

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.