question

KJH avatar image
0 Likes"
KJH asked Jason Lightfoot commented

How to send Two dimensional array variable value to opc-ua server?

I'm thinking of a two-dimensional array opcua server that records the coordinate values in order when AGV reaches CP.

cap-2023-09-15-01-34-10-218.png

The server was configured through the kepserver and is shown in the following picture.

cap-2023-09-15-01-33-35-569.pngAGV detects reaching CP, but the server accepts the two-dimensional array as a null value, and the variable value is being updated strangely.



  1. /**Custom Code*/
  2. Object agv = param(1);
  3. Object destCP = param(2);
  4. double pathOffset = param(3);
  5. double agvBodyOffset = param(4);
  6. Object current = param(5);
  7. Variant currentValue = param(6);
  8.  
  9.  
  10.  
  11. Array deepArray = [[[1.3, 2.1], [3.1, 4.1]], [[5.1, 6.1]]];
  12.  
  13. return deepArray;

The custom code is as follows.


Basically, I know that if there is a semicolon or square bracket, it cannot be used as a variable value for the server, but does the output value of the custom code have a semicolon or square bracket, so the variable value cannot be read properly?

How do I write custom code for a server to accept variable values in a two-dimensional array?

I attached the corresponding flexsim model.

*The contents may be awkward because it is written using a translator.

OPC_UA_TEST_2.fsm

FlexSim 22.2.4
emulationopc ua
· 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.

1 Answer

Luciano Cavallero avatar image
0 Likes"
Luciano Cavallero answered
Currently OPC UA Control and Sensor support only scalar values, not array.


5 |100000

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