I'm thinking of a two-dimensional array opcua server that records the coordinate values in order when AGV reaches CP.
The server was configured through the kepserver and is shown in the following picture.
AGV detects reaching CP, but the server accepts the two-dimensional array as a null value, and the variable value is being updated strangely.
/**Custom Code*/ Object agv = param(1); Object destCP = param(2); double pathOffset = param(3); double agvBodyOffset = param(4); Object current = param(5); Variant currentValue = param(6); Array deepArray = [[[1.3, 2.1], [3.1, 4.1]], [[5.1, 6.1]]]; 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.